gpt4 book ai didi

ios - UIImagePickerController : is it possible to set overlay view only in editing mode after capture?

转载 作者:行者123 更新时间:2023-12-01 19:26:29 25 4
gpt4 key购买 nike

我将 AllowEditing 设置为 true,并且在捕获图像后,我想在编辑屏幕中提供额外的说明以裁剪图像的一部分。那可能吗?

最佳答案

UIImagePickerViewController实际上是 UINavigationController .这使您能够跟踪您在 UINavigationViewController 中的哪个步骤,因此您只能在到达第二个 View Controller 时设置覆盖 View 。

简单来说:
- UIImagePickerController.delegate = self
- 使自己符合 UINavigationControllerDelegate 协议(protocol)
- 实现下一个方法:

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
if ([navigationController.viewControllers indexOfObject:viewController] == 1)
{
// If second UIViewController, set your overlay.
}
}

关于ios - UIImagePickerController : is it possible to set overlay view only in editing mode after capture?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7227054/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com