2013-03-30 26 views
3

我得到了tableFooterView的tableView。這個觀點爲什麼神奇地改變大小?

在viewDidLoad中:

<UIView: 0x6c87a70; frame = (0 325; 320 3); autoresize = TM+BM; layer = <CALayer: 0x6c87aa0>> 
    <UIImageView: 0x6c87b60; frame = (31 0; 257 3); autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x6c87ba0>> - table_pull_refresh_footer.png 

在viewWillLayoutSubviews我所看到的是

<UIView: 0x6c87a70; frame = (0 325; 320 3); autoresize = TM+BM; layer = <CALayer: 0x6c87aa0>> 
<UIImageView: 0x6c87b60; frame = (31 0; 320 3); autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x6c87ba0>> - table_pull_refresh_footer.png 

那麼,爲什麼UIImageView的突然變大?父視圖根本不改變大小。它仍然是320 3.

+0

是否視圖邊界改變? – DrummerB

+1

在記錄視圖之前是否會調用''viewWillLayoutSubviews''' [super viewWillLayoutSubviews]'? – vikingosegundo

+0

不是嗎? –

回答

0

問題正如vikingosgundo所說。

我應該叫[超級viewWillLayoutSubviews]第一

相關問題