Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在我的设备(iphone 4、iOS 5.1)上测试了一个应用程序,但它给了我一个错误。在 Stackoverflow 上我发现这是因为 xcode 4.5 中的自动布局已打开。问题是当我关闭它时,应用程序的圆角消失了。这是一种常见的行为吗?以及如何在没有自动布局的情况下设置圆角。
self.view.layer.cornerRadius = 10.0f; 结果是:
我正在寻找整个应用程序的那些略圆的角落:
你的问题有点令人困惑,但是这个怎么样?
#import <QuartzCore/QuartzCore.h> self.view.layer.cornerRadius = 10.0f;