2013年5月14日火曜日

[iOS]Interface BuilderでUIScrollViewのContentSizeを設定することはできない。


Interface BuilderでUIScrollViewのContentSizeを設定使用と思ったが、
それを行うUIが無いことに気づいた。

http://stackoverflow.com/questions/1135163/how-do-i-use-uiscrollview-in-interface-builder
によると、ContentSizeはコード状態のみ設定可能のようだ、IBでやるのは諦めよう。
ただしiOS6のAuto Layoutを使用すれば可能になる。

With Autolayout (iOS6+), you can avoid setting contentSize. Set the following constraints instead:
Pin the top of the scrollview to the top of its top-most child.
And pin the bottom to the bottom of its bottom-most child.

0 件のコメント:

コメントを投稿