iPhone - 在 UIImagePickerController 上显示模式视图
我有一个 UIImagePickerController,在加载时,我想在 modalView 中显示免责声明。
- (void) viewDidLoad
{
self.picker = [[UIImagePickerController alloc] init];
self.picker.sourceType = UIImagePickerControllerSourceTypeCamera;
self.picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
self.picker.delegate = self;
[self presentModalViewController:self.picker animated:NO];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
DisclaimerController* disclaimer = [[DisclaimerController alloc] init]; // Loads the Xib inside the init method
UINavigationController* controller = [[UINavigationController alloc] initWithRootViewController:disclaimer];
[self.navigationController presentModalViewController:controller animated:YES];
}
但它没有显示出来。
而且我不想在免责声明显示或稍后显示时关闭选择器,因为有些处理需要一些时间,并且用户阅读免责声明的时间会阻止他在关闭免责声明后等待太长时间。
I have a UIImagePickerController, and while it's loading, I want to display a disclaimer in a modalView.
- (void) viewDidLoad
{
self.picker = [[UIImagePickerController alloc] init];
self.picker.sourceType = UIImagePickerControllerSourceTypeCamera;
self.picker.cameraCaptureMode = UIImagePickerControllerCameraCaptureModePhoto;
self.picker.delegate = self;
[self presentModalViewController:self.picker animated:NO];
[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:UIStatusBarAnimationNone];
DisclaimerController* disclaimer = [[DisclaimerController alloc] init]; // Loads the Xib inside the init method
UINavigationController* controller = [[UINavigationController alloc] initWithRootViewController:disclaimer];
[self.navigationController presentModalViewController:controller animated:YES];
}
But it doesn't shows up.
And I don't want to dismiss the picker while the disclaimer is showing or show it later, because there are some treatments that takes some time and the time the user reads the disclaimer would prevent him to wait too long after closing the disclaimer.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会使用 AlertView 来解决它。
但如果您更喜欢使用您的方法,也许这会起作用
尝试这个:
I would solve it using an AlertView.
But if you prefer using your method maybe this will do the trick
Try this: