i am a new iphone programmer
i am making a web based application for that a took one text box (to take web address from user) and a button which will be pressed by user to go to his web address .. Now when user type his url such as http://www.google.com then it works fine but problem is that when user type only google.com or www.google.com it doesn't work.
i know the reason...why this is happening...
for this i decide to add (http://) by programming here another problem was arised... if the user write the whole web address then again it will fail ...
here is my code for button click
-(IBAction)go { NSMutableString *str;
str = [NSMutableString stringWithFormat:@"http://www.%@",name.text];
[webview loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:str]]];
}
here name is textfield ans webview is an object of webView..... it works fine but i want some more as asked above...
please help....