未分類

openURL 用法

openURL 用法

 [[UIApplication sharedApplication] 
    openURL:[NSURL URLWithString:@"http://www.google.com.tw"]]; 

 [[UIApplication sharedApplication] 
    openURL:[NSURL URLWithString:@"tel://0920123123"]]; 

 [[UIApplication sharedApplication] openURL:
    [NSURL URLWithString:@"sms:0920123123"]]; 

 [[UIApplication sharedApplication] 
    openURL:[NSURL URLWithString:
    @"mailto:emailAdress?subject=Hello&body=user@mail.com"]];