Example for setting up a name input field to serve high scores on an iPhone?

Does anyone have an example of creating a text box where users can enter their name and / or email address to submit it online to a high scores database? I would like it to be similar to the form that appears when you try to download something from the AppStore, where you insert your email address and password, then you can click OK or Cancel. I can handle all of the submitting and server side processing code on the website, but it just happened to be time for me to set up the textbox and buttons correctly.

Thanks in advance!

0


source to share


1 answer


This will show dialog, but I'm not sure how to make it responsive:



[dialog setDelegate:self];
[dialog setTitle:@"Enter Name"];
[dialog addButtonWithTitle:@"Cancel"];
[dialog addButtonWithTitle:@"OK"];
UITextField * nameField = [[UITextField alloc] initWithFrame:CGRectMake(20.0, 45.0, 245.0, 25.0)];
[nameField setBackgroundColor:[UIColor whiteColor]];
[dialog addSubview:nameField];
CGAffineTransform moveUp = CGAffineTransformMakeTranslation(0.0, 100.0);
[dialog setTransform: moveUp];
[dialog show];

      

+1


source







All Articles