Archive

Archive for August 14, 2010

Making a Call From Your Application

August 14, 2010 Leave a comment

As far i know in earlier version of iPhone (before iOS4), your application will terminate before making a call. Because it doesn’t support multitasking. But iOS4 support multitasking. So don’t afraid now. Just follow the code

-(void)callButtonClicked{
NSString *makBoneyphnNo = @"+8801717011014";
NSString *phoneStr = [[NSString alloc] initWithFormat:@"tel:%@",makBoneyphnNo];
NSURL *phoneURL = [[NSURL alloc] initWithString:phoneStr];
[[UIApplication sharedApplication] openURL:phoneURL];
[phoneURL release];
[phoneStr release];
}
Categories: iPhone, Objective-C Tags: , ,
Follow

Get every new post delivered to your Inbox.