Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
667 views
in Technique[技术] by (71.8m points)

iphone - iPhoneOS SDK - Remove Corner Rounding from views (iPad problem)

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

56.8k users

...