1

How to make a custom scroll container view controller?

 2 years ago
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?

advertisements

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?

Actually I have a table view with options, but alongside I have a complicated scroll design. How could I go about implementing this scroller? Create UISlider vertical - (void)viewDidLoad { [super viewDidLoad]; [self addSliderVertical]; } -(void) addS

IOS 7: Custom Container View Controller and Inserting Content

I have a table view controller wrapped in a navigation controller. The navigation controller seems to automatically apply the correct content inset to the table view controller when it is presented via presentViewController:animated:completion:. (Can

How to make a UITextView scrolls all the way down when the keyboard is visible

I have an editable UITextView with a couple pages worth of text. When the user taps inside and it brings up the keyboard, it hides the bottom part of the text and you can not scroll to see it. Is there some obvious/easy/standard way to deal with this

Pass messages to children of view controllers Container contained from a Custom Container view controller?

My apologies for the long title, but it really is the shortest accurate and descriptive version I could come up with. I'm implementing a custom container view controller with a custom segue type, working with iOS 5 and storyboards. I also provide a d

How to make a custom cell?

In a table view, I want to add a date picker cell to it, but there wasn't an option for it, so I tried to make a custom cell, but I didn't know how to. Does anyone know how to make a custom cell or is there a good tutorial for beginner about it. Than

Objective-c: How to call the method in container view manager

This question already has an answer here: Calling a method of One View controller from Another View Controller 4 answers Solution for my problem from below with isKindOfClass. Thanks to @Julian! -(void)callContainerViewController { for (UIViewControl

How to make JInternalFrame fill the container and disable the drag function?

I'm working on a project, there are JInternalFrames in the mainframe. Now, we need to let them to be JFrame. I'm considering using a JFrame to hold on JInternalFrame. The problem is that the titlebar of Internalframe is there, and user can drag it ar

How to make a customized Edittext, so it will look like 45 degrees turned in Android

How to make a custom Edittext,so that it will look like as 45 degree rotated in android and it should editable so that th euser can enter text on that rotated Edittext.I tried it.But I am not getting any solution for it.Please give some idea to do th

Swipe to move a container view controller from the screen

I have a main view controller, and on that view controller sits a little UIImageView. I want to be able to swipe that image view and have a contained view controller slide (animated) onto the screen, sort of like pulling the tab of a manilla folder.

IOS Container View Controller - Why does transitionFromViewController need fromViewController?

When using custom container view controller, I don't quite understand why the presenting view controller needs to specify the from, because being the container class, it should already know what's in the view hierarchy, no? transitionFromViewControll

Container View Controller Examples

Can anyone point me to any good examples of creating a Custom View Controller as a Container View Controller? The only documentation I can find is a couple of paragraphs in the UIViewController Class Reference. I feel I need a little more information

Call the Main View Controller of the Container View Controller

I have a container view controller with its own view controller class and some UI components. Some events of this container view controller needs to call the main view controller. I'm not able to find how to do it. class mainViewController :UIViewCon

how to define an action in a view controller and call them anywhere

What I have is three button at the top of my app. Those three buttons will always appear on all view controller. When I click button, respective action will be taken. As we have this in all viewcontroller, what I am planning is I will have method def

Transmit Data to Integrated View Controller in a Container View Controller

My View Controller Hierarchy is the following: The entry point is a UINavigationController, whose root view controller is a usual UITableViewController. The Table View presents a list of letters. When the user taps on a cell, a push segue is triggere

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK