iPhoneOS SDK - 从视图中删除角落舍入(iPad问题) [英] iPhoneOS SDK - Remove Corner Rounding from views (iPad problem)
问题描述
这可能有点挑剔,但在iPad SplitViewController设置中,有2个视图。每个视图都有一个非常小的黑色圆角。 (这也可能与iPhone应用程序相同)。
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).
此舍入在下图中可见。我想要做的是删除黑色圆角,因此UI不会从底部获得这两个小凹凸。有没有人这样做过,或者知道怎么做? - 肯定是可能的。
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.
希望有人见过这个。
谢谢
替代文字http://img19.imageshack.us/img19/7297/screenshot20100413at102.png
推荐答案
添加以下是您的应用代表:
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)];
}
}
}
在UISplitViewController的DetailViewController中添加:
In your DetailViewController of the UISplitViewController add:
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[yourAppDelegate performSelector:@selector(fixRoundedSplitViewCorner) withObject:NULL afterDelay:0];
}
这篇关于iPhoneOS SDK - 从视图中删除角落舍入(iPad问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!