UIScrollView will not accept subviews until view will appear?

You should be able to insert your subviews during viewDidLoad: if the controller's view outlets are all OK. (That's a bit earlier than viewWillAppear: and is the spot where a valid view object should first be available. ).

Up vote 0 down vote favorite share g+ share fb share tw.

Have a view controller with a UIScrollView. This view controller is created / loaded at the start of the app. Before the controller is ever seen, trying to add subviews to the scrollview and the scrollview will not accept / add the sub views.

Once the ViewWillAppear is called, then can add subviews fine. It runs the exact same code, but will not add the subviews until it has been called to view once. What are the reasons for this?

I assume this is as designed.... ios uiscrollview viewwillappear link|improve this question edited 7 hours agoMarc50918 asked 8 hours agoort111709 72% accept rate.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions