[問題] Mansory 問題
在使用mansory方法的時候
我仿照http://kouky.org/blog/2015/02/16/ios-adaptive-layouts-in-code.html
來實作portrait跟landscape的畫面轉換
但是我怎樣嘗試都在 ViewController.m 的第149行跟我說constraints不滿足(如下)
#149
[self.center mas_makeConstraints:^(MASConstraintMaker *make) {
[constraints addObject:make.top.and.left.equalTo(@100)];
[constraints addObject:make.width.and.height.equalTo(@90)];
//[constraints addObject:make.center.equalTo(self.view)];其它嘗試
}];
想請問一個View的constraints設定(如上)決定了 left, top跟寬高
不就應該是滿足條件了嗎?還請大大幫忙點出問題,謝謝!
附上測試專案
https://github.com/FakerLuo/mansory_test
主要是想弄成這樣的畫面
portrait landscape
A
center A center B
B
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.160.32.208
※ 文章網址: https://www.ptt.cc/bbs/MacDev/M.1464755991.A.AD3.html
※ 編輯: issuemylove (1.160.32.208), 06/01/2016 12:43:18
→
06/01 22:33, , 1F
06/01 22:33, 1F
→
06/02 10:47, , 2F
06/02 10:47, 2F
推
06/02 14:08, , 3F
06/02 14:08, 3F
→
06/04 12:14, , 4F
06/04 12:14, 4F
推
06/04 14:21, , 5F
06/04 14:21, 5F
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章