我正在尝试使用此方法在第一个模态被解除后显示第二个模态......该方法本身工作正常,除了它需要我将对象作为参数传递而我真正想要做的是传递一个UIImageControllerSourceType 代替。我应该使用另一种方法来执行此操作,还是有一种简单的方法可以使 UIImageControllerSourceType 成为对象?我觉得这不应该太难,但我已经挣扎了一段时间了......
- (void)showModalTwoImageSearchViewControllerWithSourceType:(UIImagePickerControllerSourceType *)sourceType {
if (self.modalViewController) {
[self performSelector:@selector(showModalTwoImageSearchViewControllerWithSourceType:)
withObject:sourceType
afterDelay:0.1f];
return;
}
// present second modal view - remembering to deal with cases of camera or photo library
if (sourceType == UIImagePickerControllerSourceTypePhotoLibrary) {
//do one thing
}
// lets assume it was UIImagePickerControllerSourceTypeCamera
else {
// do something else
}
}