我正在尝试向UIVideoEditorController的底部工具栏添加按钮。这个是可能的吗?我可以修改/添加按钮到这个工具栏吗?

发布于 2014-03-12 11:07:46
苹果文档明确提到
Important: The UIVideoEditorController class supports portrait mode only. This class is intended to be used as-is and does not support subclassing. The view hierarchy for this class is private; do not modify the view hierarchy. This class does not support modifications to its appearance by use of overlay views.
所以基本上是不可能的。
发布于 2015-10-30 15:08:14
在这里,我留下了一个可能的解决方案,但永远记住来自苹果的警告。在本例中,我正在更改工具栏的背景色,但它应该与您想要的任何修改一起工作。
- (void)navigationController:(UINavigationController *)navigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
[self changeBakcgroundColorOfView:navigationController.topView withColor:[UIColor redColor]];
}
- (void) changeBakcgroundColorOfView:(UIView *)view withColor:(UIColor*)color{
for (UIView *subview in view.subviews) {
if ([NSStringFromClass([subview class]) isEqualToString:@"UIToolbar"]) {
UIToolbar *toolbar = (UIToolbar *)subview;
toolbar.backgroundColor = color;
toolbar.barTintColor = color;
}
[self changeBakcgroundColorOfView:subview withColor:color];
}
}https://stackoverflow.com/questions/22349043
复制相似问题