Check if fullURL starts with http:// or https://, if not prefix that.
- (IBAction)btnSearchPress:(id)sender {
[self.view endEditing:YES];
[super viewDidLoad];
NSString *fullURL = [NSString stringWithFormat:@"%@%@%@", _urlPrefix.text,_txtInput.text, _urlSuffix.text];
if ( ! ([fullURL hasPrefix:@"http://"] || [ fullURL hasPrefix:@"https://"]) ) {
fullURL = [NSString stringWithFormat:@"http://%@", fullURL ];
}
NSURL *url = [NSURL URLWithString:fullURL];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[_wbView loadRequest:requestObj];
}