首页 > 其他 > 详细

拨号应用返回问题

时间:2014-06-30 22:10:17      阅读:334      评论:0      收藏:0      [点我收藏+]
- (void)CallOtherPartWithTelNumber:(NSString *)telNumber andType:(NSInteger)type
{
    
    switch (type) {
            
        case 1:
            //  可以返回应用
            telNumber = [NSString stringWithFormat:@"telprompt://%@", telNumber];
            LMLog(@"打电话调用最后组合好的号码:%@--<<", telNumber);
            
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:telNumber]];
            break;

            
        case 2:
            //  可以返回应用
            telNumber = [NSString stringWithFormat:@"tel:%@", telNumber];
            
            LMLog(@"打电话调用最后组合好的号码:%@--<<", telNumber);
            
            if (_webView == nil) {
                _webView = [[UIWebView alloc] initWithFrame:CGRectZero];
            }
            
            [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:telNumber]]];
            break;
            
        case 3:
            //  不能返回应用
            telNumber = [NSString stringWithFormat:@"tel://%@", telNumber];
            LMLog(@"打电话调用最后组合好的号码:%@--<<", telNumber);
            
            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:telNumber]];
            break;
            
        default:
            break;
    }
    
}

  

拨号应用返回问题,布布扣,bubuko.com

拨号应用返回问题

原文:http://www.cnblogs.com/wuwangchuxin/p/3816101.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!