我想创建一个类似的带有圆角的 UIView 和 UIButton 就像这个应用程序一样。 我可以在 Interface Builder 上实现这个吗?
最佳答案
您可以在代码中圆角并设置边框,只需确保包含 QuartzCore 框架即可。
-(void) viewDidLoad {
[super viewDidLoad];
self.welcomeView.layer.cornerRadius = 5;
self.welcomeView.layer.borderWidth = 2;
self.welcomeView.layer.borderColor = [[UIColor whiteColor] CGColor];
}
然后只需在 IB 中阐述您的观点并设置您的 channel 即可。这应该能让你继续前进,Quartz 中有很多很酷的东西。
关于iphone - 如何创建像 MobilePASS 一样的自定义圆角 UiView 和 UIButton?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8627791/