uicontainerview

swift 3 call function from parent ViewController

时光总嘲笑我的痴心妄想 提交于 2021-02-08 07:38:34
问题 I have a ViewController, this view container has a class which creates 2 container views, and adds a table to the first container and a HashtagPicker for the second. The hashTagPicker has a function which is called whenever a change to the selected hashTags happens. question : i want to call a update table function whenever a tag is changed. How can i call a function from the hashtagclass which is defined in the class that contains the containers? 回答1: I personally like the delegate approach

Passing data from ContainerView to UIPageViewController and then it's connected ViewController

夙愿已清 提交于 2021-01-28 12:24:48
问题 I've been hitting my head on this for couple of days. My goal is to create an app that has a container view connected to a UIPageViewController such that I can display pages of different data/views. (my existing app w/ UITabBarController w/ 1 single data page/view works) So far, I've created the containerView and the UIPageController and the different ViewControllers using the guidance from this https://stackoverflow.com/a/26024779/14414215 and going thru a lot of SO pages but unable to get

Passing data from ContainerView to UIPageViewController and then it's connected ViewController

微笑、不失礼 提交于 2021-01-28 12:19:20
问题 I've been hitting my head on this for couple of days. My goal is to create an app that has a container view connected to a UIPageViewController such that I can display pages of different data/views. (my existing app w/ UITabBarController w/ 1 single data page/view works) So far, I've created the containerView and the UIPageController and the different ViewControllers using the guidance from this https://stackoverflow.com/a/26024779/14414215 and going thru a lot of SO pages but unable to get

Programmatically assign view controller to tab bar controller

夙愿已清 提交于 2021-01-28 07:08:21
问题 I am fairly new to swift and am trying to create a movie database application using TMDB from Apiary. I have created the layout of the view controllers for one category. However, I am planning to have multiple categories, the but only difference between them is the data I retrieve from the API. For example "now_playing" key gets the now playing list and the "top_rated" key gets the top rated list of movies. When I was initially doing this I created the tab bar controller in AppDelegate.swift

Updating Content In Container View

ε祈祈猫儿з 提交于 2021-01-01 06:44:21
问题 I have a Container View inside a View Controller. When the user presses a button the Container View is to be displayed, but the text on the Container View is based on which button the user pressed. To do this I need to update the Container View but I am not sure on how to do this. This is my Container View Code: override func viewDidLoad() { super.viewDidLoad() Cancel_Button.hidden = true Save_Button.hidden = true let Storyboard: UIStoryboard = UIStoryboard(name: "Main", bundle: nil) let