- (IBAction)buttonPressed;{
if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tel:65521111"]])
{
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:65521111"]];
}
else
{
message.text = @"Device not on cellular network";
UIActionSheet *sheet1 = [[UIActionSheet alloc] initWithTitle:message.text delegate:self cancelButtonTitle:@"OK" destructiveButtonTitle:nil otherButtonTitles:nil];
[sheet1 showInView:self.view];
[sheet1 release];
}
}
No comments:
Post a Comment