Удалить закругленный угол для просмотра uiviewcontroller ipad
Я должен удалить круглый угол из UIView
из UIViewcontroller
, вот изображение для этого
Я представляю подробный вид с
detailView.modalPresentationStyle = UIModalPresentationFormSheet;
Я хочу представить UIViewcontroller
без закругленного угла зрения. У кого-нибудь есть идеи по этому вопросу?
1 ответ
Решение
//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;
}
self.view можно просматривать внутри ViewController, который вы представляете.