您的位置:首页 > 移动开发 > IOS开发

151130ios判断是直机还是模拟器

2015-11-30 14:05 411 查看
#if TARGET_IPHONE_SIMULATOR//模拟器

UIAlertView *alert = [[UIAlertView
alloc] initWithTitle:nil

message:@"请在真机上进行此操作!"

delegate:self

cancelButtonTitle:LocalStr(@"CommonTitleCancel")

otherButtonTitles:nil,
nil];

[alert show];

#elif TARGET_OS_IPHONE//真机

imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;

[self presentViewController:imagePickerController animated:NO completion:nil];

#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: