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
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