How to make a custom scroll container view controller?
source link: https://www.codesd.com/item/how-to-make-a-custom-scroll-container-view-controller.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
How to make a custom scroll container view controller?
There are two view controllers in my app, e.g, vc1 and vc2. The two view controllers are as the subviews of a scrollView, so the user can scroll the screen to switch the view. However, the simple implement has a problem: the viewWillAppear method of vc1 and vc2 is called only once. so I want to implement my scroll container view controller, which can call viewWillAppear method correctly, please tell me how to implement it.
I am not sure what you are trying to do, but I think a simple UITableView or UICollectionView may be better for you because they have datasource method that will automatically called when a view will show up in the screen. You can update your two views when you need to return a UITableViewCell or UICollectionViewCell.
Related Articles
How to make this custom scroll bar in IOS or something similar?
IOS 7: Custom Container View Controller and Inserting Content
How to make a UITextView scrolls all the way down when the keyboard is visible
Pass messages to children of view controllers Container contained from a Custom Container view controller?
How to make a custom cell?
Objective-c: How to call the method in container view manager
How to make JInternalFrame fill the container and disable the drag function?
How to make a customized Edittext, so it will look like 45 degrees turned in Android
Swipe to move a container view controller from the screen
IOS Container View Controller - Why does transitionFromViewController need fromViewController?
Container View Controller Examples
Call the Main View Controller of the Container View Controller
how to define an action in a view controller and call them anywhere
Transmit Data to Integrated View Controller in a Container View Controller
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK