Pergunta

I am trying to add buttons to the bottom toolbar of UIVideoEditorController. Is this Possible? Can I modify/add buttons to this toolbar?

UIVideoEditorController

Foi útil?

Solução

Apple Docs clearly mention

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.

So basically its not possible.

Outras dicas

Here I leave a possible solution, but always keep in mind the warning from Apple. In this case, I'm changing the background color of the toolbar, but it should work with any modifications you want.

 - (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];
    }
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top