这可能有点挑剔,但在 iPad SplitViewController 设置中,有 2 个视图。每个视图都有一个非常小的黑色圆角。(这可能与 iPhone 应用程序相同)。
这种舍入在下图中可见。我想做的是去掉黑色的圆角,这样用户界面就不会在底部出现这两个小凸起。有没有人这样做过,或者知道怎么做?- 这肯定是可能的。
希望有人以前见过。
谢谢
替代文字 http://img19.imageshack.us/img19/7297/screenshot20100413at102.png
这可能有点挑剔,但在 iPad SplitViewController 设置中,有 2 个视图。每个视图都有一个非常小的黑色圆角。(这可能与 iPhone 应用程序相同)。
这种舍入在下图中可见。我想做的是去掉黑色的圆角,这样用户界面就不会在底部出现这两个小凸起。有没有人这样做过,或者知道怎么做?- 这肯定是可能的。
希望有人以前见过。
谢谢
替代文字 http://img19.imageshack.us/img19/7297/screenshot20100413at102.png
将以下内容添加到您的应用委托中:
- (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)];
}
}
}
在 UISplitViewController 的 DetailViewController 中添加:
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[yourAppDelegate performSelector:@selector(fixRoundedSplitViewCorner) withObject:NULL afterDelay:0];
}
您可能必须drawRect
在视图中覆盖并自己绘制它而不进行舍入。