[問題] 翻轉後改變constraint的priority當機
想藉由在程式更改ConstraintBottom.priority變更View位置
不過都會遇到當機狀況無法解決
@property (strong, nonatomic) IBOutlet NSLayoutConstraint
*pageBarConstraintBottom;
- (void)statusBarOrientationChange:(NSNotification *)notification{
UIInterfaceOrientation orientation = [[UIApplication sharedApplication]
statusBarOrientation];
if ( (orientation == UIInterfaceOrientationLandscapeRight) ||
(orientation ==UIInterfaceOrientationLandscapeLeft) )
{
_pageBarConstraintBottom.priority = UILayoutPriorityRequired;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
每次在這裡當機
}
}
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 122.116.79.81
※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1499917407.A.4D6.html
推
07/13 13:32, , 1F
07/13 13:32, 1F
→
07/13 13:33, , 2F
07/13 13:33, 2F
→
07/13 14:41, , 3F
07/13 14:41, 3F
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章