The button is first bound to the header file and the implementation file in the Xib file. Add the following code to the new method you created:
UIWebView*callwebview =[[uiwebview alloc] init];
nsurl *telurl =[nsurl urlwithstring:@ "tel:12345"];
[Callwebview loadrequest: [nsurlrequest requestwithurl: Telurl]];
// Remember to add to view
[self. Viewthis addsubview: Callwebview];
if (telurl==nil) {
nsstring *title;
title = @ " the user is not currently tied to the mobile phone number ";
nsstring *message = @ " please remind Ta to bind the phone number oh ";
uialertview *alertview = [[uialertview alloc] initwithtitle: Title
message: Message
delegate: Self
cancelbuttontitle:@ " OK "
otherbuttontitles:@ " Open Address Book ", Nil];
[Alertview show];
}
If determine if the number is empty, you need to prompt the user to open the Address Book, not implemented jump address book.
The Viewthis method is also declared in the header file.
iOS to button binding call function