How to remove top bar

I cannot seem to find a way to remove the top bar (the one that normally has a title on it) from my app. Is there any way to do it?

1 Like

I used below code - it removes only next/previous buttons I want to remove full top bar.

- (void)removeBar {
UIWindow *keyboardWindow = nil;
for (UIWindow *testWindow in [[UIApplication sharedApplication] windows]) {
    if (![[testWindow class] isEqual:[UIWindow class]]) {
        keyboardWindow = testWindow;
        break;
    }
}

for (UIView *possibleFormView in [keyboardWindow subviews]) {
    // iOS 5 sticks the UIWebFormView inside a UIPeripheralHostView.
    if ([[possibleFormView description] rangeOfString:@"UIPeripheralHostView"].location != NSNotFound) {
        for (UIView *subviewWhichIsPossibleFormView in [possibleFormView subviews]) {
            if ([[subviewWhichIsPossibleFormView description] rangeOfString:@"UIWebFormAccessory"].location != NSNotFound) {
                [subviewWhichIsPossibleFormView removeFromSuperview];
            }
        }
    }
}

}

3 Likes

Thank you very much.