更新时间:2023-11-09 23:22:34
我最终使用UIImagePickerController的自定义子类来修复这个问题和其他问题:
I ended up using a custom subclass of UIImagePickerController to fix this (and other) issues:
#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