2
我必須從的UIView
中刪除圓角。這裏是爲爲uiviewcontroller的視圖刪除圓角ipad
我提出詳細視圖圖像與
detailView.modalPresentationStyle = UIModalPresentationFormSheet;
我想提出UIViewcontroller
不看圓角。 任何人都有這個問題的想法?
我必須從的UIView
中刪除圓角。這裏是爲爲uiviewcontroller的視圖刪除圓角ipad
我提出詳細視圖圖像與
detailView.modalPresentationStyle = UIModalPresentationFormSheet;
我想提出UIViewcontroller
不看圓角。 任何人都有這個問題的想法?
//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中查看。
謝謝你回答Bhargavi我嘗試過,但沒有寫在didRotateFromInterfaceOrientation方法中。接力讚賞的答案。 – 2013-02-20 10:45:57
偉大的答案 - 但是你應該包括對超類的調用([super viewWillAppear:animated];)或者像UITableViewControllers中的自動行取消選擇的東西將停止工作。 – 2013-05-10 14:06:18
@GrahamPerks是的,我同意你的建議。但我只是想表明在哪裏寫'cornerRadius'。 – 2013-05-11 04:33:49