IOS 判断设备是否可以打电话

View Code
 NSString *deviceType = [UIDevice currentDevice].model;
            if([deviceType  isEqualToString:@"iPod touch"]||[deviceType  isEqualToString:@"iPad"]||[deviceType  isEqualToString:@"iPhone Simulator"]){//
                UIAlertView *alert=[[UIAlertView alloc] initWithTitle:@"提示" message:@"您的设备不能打电话" delegate:nil cancelButtonTitle:@"好的,知道了" otherButtonTitles:nil,nil];
                [alert show];
                [alert release];
                return;
                
            }

 

posted @ 2013-04-28 13:48  菜鸟程序猿  阅读(1586)  评论(0编辑  收藏  举报