Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7167459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:34:55+00:00 2026-05-28T14:34:55+00:00

In a split-view-based iPad app I’m using a custom background image in my navigation

  • 0

In a split-view-based iPad app I’m using a custom background image in my navigation bars and toolbars.
I subclassed UINavigationBar and/or UIToolbar and in drawRect: I have (background-image is rectangular):

- (void)drawRect:(CGRect)rect {
    CGContextRef c = UIGraphicsGetCurrentContext();
    UIImage *image = [UIImage imageNamed:@"background-image"];    

    CGContextDrawImage(c, rect, image.CGImage);
}

Result is
Rounded corners
from which I want to remove rounded corners.

What I’ve tried already:

  1. [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; the same result as above,
  2. clipsToBounds = YES; in my subclasses,
  3. cornerRadius=0.0,
  4. iPhoneOS SDK – Remove Corner Rounding from views (iPad problem)

Problem described in 4. is exactly the same one I’m having. Unfortunately solution described in that question doesn’t work for me. When called from viewWillAppear In Portrait orientation, it hides my navigationItem for some reason. When called from didRotateFromInterfaceOrientation: in Landscape, rounded corners are gone, but at the same time all user interaction is disabled. Additionaly, when rotated back to Portrait, my “Master” view (left hand-side of the split view) is not hidden.

The output that I got using the code from the accepted answer is:

aView: <UIWindow: 0x5e18470; frame = (0 0; 768 1024); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x5e18280>>
subview: <UILayoutContainerView: 0x6942000; frame = (20 0; 748 1024); transform = [0, -1, 1, 0, 0, 0]; autoresize = W+H; layer = <CALayer: 0x6946b30>>
aView: <UILayoutContainerView: 0x6942000; frame = (20 0; 748 1024); transform = [0, -1, 1, 0, 0, 0]; autoresize = W+H; layer = <CALayer: 0x6946b30>>
subview: <BackgroundImageView: 0xbbacf70; frame = (0 0; 768 1004); layer = <CALayer: 0xbbad020>>
aView: <BackgroundImageView: 0xbbacf70; frame = (0 0; 768 1004); layer = <CALayer: 0xbbad020>>
subview: <UILayoutContainerView: 0x69144e0; frame = (321 0; 703 748); clipsToBounds = YES; layer = <CALayer: 0x6946fe0>>
aView: <UILayoutContainerView: 0x69144e0; frame = (321 0; 703 748); clipsToBounds = YES; layer = <CALayer: 0x6946fe0>>
subview: <UILayoutContainerView: 0xbbabc40; frame = (0 0; 320 748); clipsToBounds = YES; layer = <CALayer: 0xbbabc90>>
aView: <UILayoutContainerView: 0xbbabc40; frame = (0 0; 320 748); clipsToBounds = YES; layer = <CALayer: 0xbbabc90>>
subview: <UIImageView: 0x5e178c0; frame = (321 0; 3 3); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xba60d10>> - (null)
aView: <UIImageView: 0x5e178c0; frame = (321 0; 3 3); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xba60d10>> - (null)
subview: <UIImageView: 0xba74010; frame = (317 0; 3 3); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xba62180>> - (null)
aView: <UIImageView: 0xba74010; frame = (317 0; 3 3); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xba62180>> - (null)
subview: <UIImageView: 0xbad0110; frame = (321 745; 3 3); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xba60da0>> - (null)
aView: <UIImageView: 0xbad0110; frame = (321 745; 3 3); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xba60da0>> - (null)
subview: <UIImageView: 0xba60e00; frame = (317 745; 3 3); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xba60e30>> - (null)
aView: <UIImageView: 0xba60e00; frame = (317 745; 3 3); opaque = NO; userInteractionEnabled = NO; layer = <CALayer: 0xba60e30>> - (null)

And quite right there are small, 3x3px, rounded UIImageViews with corners.

Question is: how do I get rid of those tiny rounded corners?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T14:34:56+00:00Added an answer on May 28, 2026 at 2:34 pm

    Solution that worked for me:

    - (void)hideSplitViewCorners {
    // Hide corners of splitview.
    NSMutableArray *views = [NSMutableArray array];
    [views addObject:[self view]];
    
    for (NSUInteger i = 0; i < views.count; ++i) {
        UIView *view = [views objectAtIndex:i];
        [views addObjectsFromArray:view.subviews];
    
        if (view.frame.size.width == 3.0 && view.frame.size.height == 3.0) {
            view.hidden = YES;
        }
      }    
    }
    

    I call it in loadView and didRotateFromInterfaceOrientation: of my subclass of UISplitViewController.
    Note that in the latter I needed to use [self performSelector:@selector(hideSplitViewCorners) withObject:NULL afterDelay:0];.

    Basically, one needs to make sure that hiding of those corners are done after they’re already displayed on the screen.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm porting a fairly simple iPhone Navigation based app to a Split View iPad
I have created split view based ipad app, where master view is table view
I am Started my iPad app using View-Based application. in first two views i
I'm working in an iPad app that has a split view with a navigation
I have a split view controller-based iPad app that uses a Web View to
Solved Hey all, I'm currently working on a Split-View Based Application for iPad. I
I have a split view-based app that presents a master-detail interface, and uses a
I'm new to using the split view for creating iPad applications. When I first
I am trying to develop a splitView based iPad app, that displays the split
Create default iPad split view based apps from template from xcode 4, then we

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.