uibutton onclick does not call/open web page
Posted
by
raqz
on Stack Overflow
See other posts from Stack Overflow
or by raqz
Published on 2010-12-29T01:51:06Z
Indexed on
2010/12/29
1:53 UTC
Read the original article
Hit count: 585
i have two buttons defined. one of them when clicked must open a compose mail screen and the other when clicked must call. i have this defined as below. but when the button is pressed, it does not open either
-(IBAction) phoneButtonPressed:(id) sender{
NSString *phoneNumber = [[NSString alloc] initWithString:@"4216483330"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]];
}
-(IBAction) mailButtonPressed:(id) sender{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto:[email protected]?subject=ULS Library"]];
}
© Stack Overflow or respective owner