Reputation: 1382
I'm new to IOS programming so I apologize if my question is obvious.
I created a UIViewController in storyboard, which contains a UIScrollView and multiple subviews.
These subviews (most often UITextViews) are filled with content from an external API, and content can thus be nil : in this case I would need to remove that subview which is empty.
For now I set this view as an IBOutlet and in viewDidLoad, if content is nil, I call
[self.thatView removeFromSuperView];
Thx for your help
Upvotes: 0
Views: 693
Reputation: 36
Any call before viewDidLoad will cause you problems unfortunately, you need to finish the load of a view before you dismiss it.
Upvotes: 0