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
0 answers

striking label text automatically in a table view

I have two table view controllers, the 2nd tableview controller contains entries with different option to add to the first view table view controller. The first table view controller rows have two swipe actions i.e. completed and delete. Each…
N H
  • 1
  • 2
0
votes
1 answer

Iphone UITabbarController

I have a iPad application where i am using more than one Views. The thing is i want to display the TabbarController page while clicking on Button that is on main page. I am able to call the TabBarController directly from delegate method like adding…
Sam
  • 5
  • 1
  • 3
0
votes
2 answers

Display a ViewController inside another View Xcode

Okay so I know that you can embed a ViewController inside a view. But the situation I have is a little different I have an app which is using an external monitor. When the monitor is connected, I'd like to display the ExternalMonitor ViewController…
wades
  • 250
  • 2
  • 10
0
votes
2 answers

View controller goes black after returning from another tab

I get a black screen when returning to a view controller from a different tab. I have the following flow: A tab bar with 5 tabs. A viewcontroller called Points, which contains a button called “Rewards” that segues to another viewcontroller called…
nm1213
  • 99
  • 9
0
votes
1 answer

View Controller turning up black even though there is content

So when I click on a button from another View Controller, it is suppose to present the next View Controller. However, when clicking the button, it just show the next View Controller with a black screen, even though there is content on it. How do I…
Andy
  • 169
  • 10
0
votes
0 answers

Access information from a different ViewController

I'm not sure how to ask this question, so I will try to explain what I am trying to accomplish to the best of my ability. I have a view controller that is primarily google maps. then I have another view controller titled postController which allows…
user9951119
0
votes
2 answers

Error While referencing AppDelegate

I have an App Delegate and a 3 view controllers in my project. I have a variable(a NSMutable Array) in my App Delegate which I want to access from my view controllers. So I decided to create a pointer to my App Delegate and access the…
Aravind
  • 284
  • 1
  • 4
  • 10
0
votes
1 answer

How do I apply present working properly in swift

I have trouble in my application with swift 4. I'd like to move my view controller automatically when my string get a value without nil. (Promatically) However it does not work at all. if(rst_str != nil){ let nextView =…
Richard
  • 351
  • 4
  • 17
0
votes
1 answer

How to manage instantiated viewControllers

To summarise, how best is it to manage VC's? In my case, I have 3 VC's in my game. To switch between them a button in the present VC activates the following code: let storyboard = UIStoryboard(name: "Main", bundle: nil) let viewController =…
0
votes
2 answers

segue/push to different view controller from IBAction function?

I am trying to push to the next viewcontroller programatically, such that I can save data in core data and then push to the next view controller. Basically when I tap a button with an IBAction, it will do all this. However, I am getting a thread 1…
MontgommeryJR
  • 255
  • 3
  • 18
0
votes
4 answers

How to perform button animation before performing segue

In my homescreen, I have a startGame button that when pressed should set off an animation (sender.pulsate()) and then also change viewController: @IBAction func newGamePressed(_ sender: UIButton) { currentScore = 0 timeRemaining =…
0
votes
1 answer

Modal viewcontroller subviews

I am presenting a view controller modally (transparent) and then trying to add a dialogue box as a subview with a few buttons. I would like this subview to be solid colour however and not transparent, but can't get it to work. I have tried setting…
SanMu
  • 645
  • 1
  • 6
  • 19
0
votes
2 answers

How to set an animation once the view controller is loaded

My goal is to set off an animation when my second viewController is loaded. How do call the function once the view is loaded? Here is the code: UIView.animate(withDuration: 1.5, animations: {self.greyScreen.frame.origin.y =…
0
votes
1 answer

memory usage increases when switching view controller in swift

I am currently creating a game that requires a user to switch view controllers - when switching between levels. Accessing a level from the menu page I use present modally. when returning back to the menu page I use the following code: @IBOutlet…
Bushers
  • 5
  • 4
0
votes
1 answer

Instructing an app on which view to open on load?

I am trying to instruct my app to open a certain view, depending on whether the user has already created a user profile on my database. so basically - - (void) viewWillAppear:(BOOL)animated { //all my ASIHTTPRequest code here //blah blah…
Chris G
  • 11
  • 1
  • 1
  • 2