iPhoneOS SDK - 从视图中删除圆角(iPad 问题)

发布于 2024-08-28 11:28:05 字数 503 浏览 6 评论 0原文

这可能有点挑剔,但在 iPad SplitViewController 设置中,有 2 个视图。每个视图都有一个非常小的黑色圆角。 (iPhone 应用程序可能也是如此)。

这种舍入在下图中可见。我想做的是删除黑色圆角,这样用户界面底部就不会出现这两个小凸起。有没有人这样做过,或者知道如何做? -这当然有可能。

希望有人以前见过这个。

谢谢

图片链接镜像

< a href="http://img19.imageshack.us/img19/7297/screenshot20100413at102.png" rel="noreferrer">替代文本 http://img19.imageshack.us/img19/7297/screenshot20100413at102.png

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

太阳公公是暖光 2024-09-04 11:28:05

将以下内容添加到您的应用程序委托中:

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

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];
}
一百个冬季 2024-09-04 11:28:05

您可能必须在视图中重写 drawRect 并自己绘制它而不进行舍入。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文