I am quite new to iOS application development.
I was working with UIScrollView
and found very strange behavior. Hope somebody could explain this to me.
I tried the two methods and found the outputs different.
1). UIScrollView
is added to my view
in the Interface Builder, and a view (UIView)
is also added to the scrollview
earlier. I set the view's bounds manually in the IB, and set the scrollview
's content size
in the class file.
Observation : The scrollview
doesn't scroll
with the setcontentsize
, rather takes some unusual content size
, independent of anything else, even its own bounds.
2). The same UIScrollView
is again added in the Interface Builder, but the view
is added this time programmatically.
Observation : This time everything works out quite good.
I don't understand what could have gone wrong.
Can anyone explain and elaborate