gpt4 book ai didi

objective-c - UIImagePickerController 如何隐藏翻转相机按钮?

转载 作者:太空狗 更新时间:2023-10-30 03:59:37 24 4
gpt4 key购买 nike

有没有办法在 UIImagePickerController 中隐藏翻转相机按钮?

感谢阅读!^_^!

最佳答案

我最终使用 UIImagePickerController 的自定义子类来解决这个(和其他)问题:

#import "SMImagePickerController.h"

@implementation SMImagePickerController

void hideFlipButtonInSubviews(UIView *view) {
if ([[[view class] description] isEqualToString:@"CAMFlipButton"]) {
[view setHidden:YES];
} else {
for (UIView *subview in [view subviews]) {
hideFlipButtonInSubviews(subview);
}
}
}

- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];

hideFlipButtonInSubviews(self.view);
}

@end

关于objective-c - UIImagePickerController 如何隐藏翻转相机按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9525736/

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