4

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

UIVideoEditorController

4

2 回答 2

4

Apple Docs明确提到

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.

所以基本上是不可能的。

于 2014-03-12T11:07:46.523 回答
0

在这里,我留下了一个可能的解决方案,但请始终牢记 Apple 的警告。在这种情况下,我正在更改工具栏的背景颜色,但它应该适用于您想要的任何修改。

 - (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];
    }
}
于 2015-10-30T15:08:14.063 回答