Questions tagged [viewcontroller]

viewcontroller is a design pattern which is a hybrid of the view and controller components of the MVC architecture

A viewcontroller responds to events by dispatching calls to a mapping table which matches views and controllers with each event target. It is implemented as an object in many frameworks, including:

2792 questions
0
votes
2 answers

How to send and receive UISlider value from one view controller to another

I'm trying to use NotificationCenter to send slider values (audio volume) to another view controller which contains the all the audio engine that I need. From the sender VC I tried this: @IBAction func vol1ChangedFromMixer(sender: UISlider) { …
Sktsalad
  • 23
  • 4
0
votes
1 answer

Adjust the size of a container view's View Controller programatically in iOS

I've set up a container view for some Container View controller programatically like this var containerView : UIView! var controller : UIViewController! override func viewDidLoad() { super.viewDidLoad() containerView = UIView() …
209135
  • 517
  • 5
  • 15
0
votes
1 answer

tableView doesn't show data in swift

I'm trying to create a tableView within a viewController. I know it is annoying, but the table looks much better that way. I am also trying to incorporate data from Firebase to put into the table. Unfortunately when I run the code, it only shows a…
0
votes
1 answer

is viewDidDisappear on the main thread?

When viewDidDisappear is called in the normal view lifecycle is it safe to perform UX related items? Said another way, should I be checking if I am on the main thread prior?
Rob Bonner
  • 9,276
  • 8
  • 35
  • 55
0
votes
1 answer

blank screen on results page: where did it go?

At this stage, the app is supposed to show the results of the quiz. Because I want the name to show up on a different line/in a different font than the description, I've separated it into two labels. At the moment, neither label shows up. I'm…
sheishistoric
  • 85
  • 1
  • 9
0
votes
1 answer

Can I make ViewController inactive in storyboard?

I made a ViewController for my app that turned out to be more work than I can deal with right now. However I want to save the work for a future version. My problem is that right now I'm getting the warning: ".../Main.storyboard: warning: Unsupported…
Gandalf Saxe
  • 381
  • 3
  • 7
0
votes
1 answer

SearchResultsController obscures screen when used with UINavigationItem

I'm using new integrated UISearchBar available in iOS 11, the problem is as soon as I tap on the searchbar and start typing text, the SearchResultsController obscures the whole screen, including the searchbar. It is impossible to dismiss the results…
0
votes
1 answer

How to make a Switch keep its state after switching viewControllers in swift 4?

So I have this mini school project where in the beginning I have an off switch, the idea is to turn it on and be able to move to other viewControllers but when i get back the switch is still on, the thing is that when opening the app after closing…
Marcelo_M
  • 13
  • 3
0
votes
2 answers

TableView not appearing in simulator?

I have created an iOS application with Single View Application template. Once I run the application the launch screen appears for about 2 second and then displays the blue navbar, but a blank white background. . I think the issue must be with the…
0
votes
1 answer

Segue specific value in prepare for segue

Right now I have 2 buttons that segue the textfield data from vc1 to vc2. I would like to have the top button segue whatever is in the textfield to vc2. I would like the bottom button to just segue to the next vc. Right now both buttons segue the…
user8105388
0
votes
2 answers

How do I use a date (selected from a date picker) to allow me to segue to a specific View Controller?

In my app the different View Controllers represent each month. I want the date to lead me to the corresponding controller. My goal is to create an app that presents the user their Zodiac when chosen their birthday from a date picker and clicked…
0
votes
0 answers

Navigating from an embedded to un-embedded ViewController

I have two UIViewController A and B. ViewController A is embedded in a UINavigationController hence automatically inheriting a UINavigationBar. While segueing from ViewController B which is not embedded to A the UINavigationBar disappears. Why is…
Paul Kahohi
  • 164
  • 1
  • 3
  • 6
0
votes
1 answer

Pass tableview row title to viewcontroller swift

I have everything working when transitioning from my tableview to my view controller. The only issue I have is when I go from tableview to viewcontrller my variable is not passed. It shows up as blank. When I print to console in the tableview…
bgrow11
  • 31
  • 8
0
votes
1 answer

How to prevent object being overwritten - swift ? Object in ViewController1 is being over-written with same type of object in ViewController2

This is just a visual scenario of what's actually happening. I have an Object A in my View Controller1. Similarly, i have an ObjectB which is similar to the type of ObjectA, in my View Controller2. Now, on click of a button, i assign…
Zahurafzal Mirza
  • 290
  • 1
  • 15
0
votes
2 answers

access a controllers variable or method from within the views subview class

Good Evening, Here is the problem, [self.view addSubview:pauseView]; before the pauseView is loaded over the current view a BOOL isPaused is turned to false and then the subview appears. i am trying to change the value of the variable to false from…
L_Sonic
  • 594
  • 6
  • 22
1 2 3
99
100