How to add/modify buttons on the toolbars in UIVideoEditorController?

1.1k views Asked by At

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

UIVideoEditorController

2

There are 2 answers

0
Adithya On BEST ANSWER

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.

0
AudioBubble On

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];
    }
}