I am attempting to post data to a database, but the issue is that I cannot seem to obtain text that was entered in the UIAlertView from the user. I have tried many solutions such as subviewing a UITextField, but without luck. Here is my current, simple configuration. Let me know if you need more information.
- (void)viewDidLoad { [super viewDidLoad]; //load site in webview NSURLRequest *siteRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"https://google.com/"] cachePolicy:NSURLRequestUseProtocolCachePolicy timeoutInterval:60.0]; [webview loadRequest:siteRequest]; UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Welcome" message:@"Please enter your email address." delegate:self cancelButtonTitle:@"Submit" otherButtonTitles:@"Skip", nil]; alertView.alertViewStyle = UIAlertViewStylePlainTextInput; UITextField *emailInput = [alertView textFieldAtIndex:0]; [alertView show]; emails=emailInput.text; // NSLog(emails); phone=@"8675309"; [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. }