請幫助。如何使在iOS 8模式的看法清晰的顏色,寫在iOS 7,如何在iOS上爲超級視圖製作清晰顏色8
self.view.superview.backgroundColor = [UIColor clearColor];
工作,但不能在iOS 8.變得清晰,但不能完全
請幫助。如何使在iOS 8模式的看法清晰的顏色,寫在iOS 7,如何在iOS上爲超級視圖製作清晰顏色8
self.view.superview.backgroundColor = [UIColor clearColor];
工作,但不能在iOS 8.變得清晰,但不能完全
嘗試改變這樣的阿爾法值: -
[[UIColor clearColor] colorWithAlphaComponent:0.6];
如果你設置主UIViewController視圖的背景色,你需要se前TUP是:
- (void)setupModalPresentationStyle
{
self.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
if (SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")) {
self.modalPresentationStyle = UIModalPresentationOverFullScreen;
}
}
- (void)awakeFromNib
{
[super awakeFromNib];
[self setupModalPresentationStyle];
}
當你提出這個UIViewController中,你需要設置當前呈現的UIViewController:
- (void)doneButtonTap:(id)sender {
self.modalPresentationStyle = UIModalPresentationCurrentContext;
[self presentViewController:detailsViewController animated:YES completion:nil];
}
在哪裏編寫此代碼? self.modalPresentationStyle = UIModalPresentationCurrentContext; [self presentViewController:detailsViewController animated:YES completion:nil]; – DimonDeveloper 2014-12-13 18:19:56
某處,您展示您的模態視圖控制器 – 2014-12-13 18:46:01
我試了一下,得到了相同的事情。 – DimonDeveloper 2014-12-13 15:37:02
是的,並且有清晰的顏色。視圖可以是透明的,但超視圖不是。 – DimonDeveloper 2014-12-13 15:43:15
self.view.superview = nil;錯誤 - 分配到只讀屬性 – DimonDeveloper 2014-12-13 15:52:35