8

This might be a little bit picky, but in the iPad SplitViewController setup, there are 2 views. Each of the views has a very small black corner rounding. (This is probably the same with iPhone apps too).

This rounding is visible in the image below. What I would like to do is remove the black rounding, so the UI doesnt get these two little bumps along the bottom. Has anyone done this, or know how to? -Its surely possible.

Hopefully some one has seen this before.

Thanks

Image Link Mirror

alt text http://img19.imageshack.us/img19/7297/screenshot20100413at102.png

oberbaum
  • 2,451
  • 7
  • 36
  • 52

2 Answers2

13

Add the following to your app delegate:

- (void) fixRoundedSplitViewCorner
{
    [self explode:[[UIApplication sharedApplication] keyWindow] level:0];
}

- (void) explode:(id)aView level:(int)level
{
 if ([aView isKindOfClass:[UIImageView class]]) {
  UIImageView* roundedCornerImage = (UIImageView*)aView;
  roundedCornerImage.hidden = YES;
 }
 if (level < 2) {
  for (UIView *subview in [aView subviews]) {
   [self explode:subview level:(level + 1)];
  }
 }
}

In your DetailViewController of the UISplitViewController add:

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
 [yourAppDelegate performSelector:@selector(fixRoundedSplitViewCorner) withObject:NULL afterDelay:0];
}
abs
  • 176
  • 4
  • Yeah, that looks to be the go! Fantastic Thanks. The code only executes when I press a tablecell in the MasterViewController, or i guess until DetailViewController is refreshed. I have tried calling fixRoundedSplitViewCorner from every viewDidLoad but I cant get it to work on first load. Can you give the last piece of the puzzle to? The above code is fantastic so far! – oberbaum Apr 16 '10 at 12:19
  • You only need to call fixRoundedSplitViewCorner when the device gets rotated. Add the didRotateFromInterfaceOrientation as posted above and it will work on application launch too. – abs Apr 16 '10 at 12:29
  • 1
    Doesn't appear to do anything for me (iOS5). – raidfive Jan 24 '12 at 22:18
  • Don't forget to check if didRotateFromInterfaceOrientation is actually called. The code does work on iOS 5 and above. – Webdevotion Apr 10 '13 at 12:10
  • It works, but caused me some issues where the UI would lockup if device was rotated 180 degrees. from landscape to reverse landscape for instance. – Weston Oct 09 '13 at 13:50
1

You'll probably have to override drawRect in the view and draw your it yourself without the rounding.

Jasarien
  • 58,279
  • 31
  • 157
  • 188