我必须从UIView
的{{1}}移除圆角。这是
我用
呈现详细视图UIViewcontroller
我想在没有圆角的情况下呈现detailView.modalPresentationStyle = UIModalPresentationFormSheet;
。
有人知道这个问题吗?
答案 0 :(得分:5)
//You will have to link to the QuartzCore library
#import <QuartzCore/QuartzCore.h>
- (void)viewWillAppear:(BOOL)animated
{
//set border radius on visibility
self.view.layer.cornerRadius = 0;
}
- (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
//for some reason the cornerRadius resets itself on orientation change
self.view.layer.cornerRadius = 0;
}
可以在您正在呈现的ViewController中查看self.view。