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
4
votes
1 answer

iOS - Linking framework storyboard to ViewController for use in main project

I am attempting to pull through and use a storyboard in my main project which is being created in a framework. This is to use the framework in a multitude of different projects going forward. I have managed, using a bundle, to feed the storyboard…
c_m_conlan
  • 189
  • 2
  • 11
4
votes
2 answers

How to resume view stack of iphone application

We are implementing one web based application in iPhone. if i answered the incoming phone call my application is relaunching once again instead of resume the application to the state where it last the focus. we are implementing stack of views. I.e…
need
  • 53
  • 4
4
votes
2 answers

NSNotificationCenter postNotificationName exec_badaccess

I have a view controller, when it's dissming with completion, I post a notfication, and in a subview which contained in another view controller, has added as a oberserve. But, when it tries to execute post notificaiton methode, exec_bad_access…
yong ho
  • 3,892
  • 9
  • 40
  • 81
4
votes
1 answer

MFMessageComposeViewController not working

I have a simple method that gets one argument and then sends a message. It is not working. Code: - (void)sendSMS:(NSString *)text { MFMessageComposeViewController *viewController = [[MFMessageComposeViewController alloc] init]; …
4
votes
1 answer

How can I use a variable from another Controller in JavaFX

I have two scenes Login.fxml and MainView.fxml and two diferent controllers LoginController.java and MainViewControler.java In LoginController I do the whole process to login and get the value of JSessionID and store it in a object, like…
Victor Laerte
  • 6,446
  • 13
  • 53
  • 102
4
votes
1 answer

Variables of same name in different view controllers

I am writing a simple tabbed iOS app. It has 3 tabs each with its own view controller. In each view controller I declare a variable of the same name: float nitriteLevel; But when I make a change to the value of nitriteLevel in one VC it also…
4
votes
2 answers

How to set animation to pop the pushed UIViewController

I have a litle problem. I have a pushviewcontroller and it uses an animation. My code is like this: [UIView beginAnimations: @"Showinfo"context: nil]; [UIView setAnimationCurve: UIViewAnimationCurveEaseInOut]; [UIView…
andres
  • 43
  • 1
  • 4
4
votes
5 answers

UIPageControl not visible when combined with UIScrollView

I'd like to make use of a page control to switch between several viewControllers. I have the following viewController whose associated nib contains a UIScrollView and a UIPageControl. I've placed the scroll view above the page control by using…
4
votes
6 answers

Dismissing 2 ViewController consecutively

I try 2 ways to dismissed 2 viewcontrollers consecutively but only one of them got dismissed not the second one method1 -(void) LoginDone:(NSNotification *)notif { [self dismissViewControllerAnimated:YES completion:NULL]; //previous…
jason white
  • 687
  • 4
  • 11
  • 28
4
votes
1 answer

XCode, Storyboard, View Controller items are not being displayed

When opening up a project today, there is some weird behavior in XCode. Things have disappeared in the storyboard view like the NavigationBar in viewController, the buttons associated with it, etc. I can see in the Scene list that they still exist.…
wuntee
  • 12,170
  • 26
  • 77
  • 106
3
votes
2 answers

multiple ViewControllers (containerView? childView? instance of viewController?)

I need to have a new view(w/ ViewController) added over the top of another. The user interacts with this new view for a while, and then I want to remove it. In an older version of Xcode I was able to add it as a subview. I now get an…
Scott
  • 652
  • 1
  • 7
  • 15
3
votes
2 answers

Xcode storyboard switch

Someone help me understand the new storyboard in Xcode 4.2? I know how to code to load another view controller but in the storyboard mode there are differences.. I also know there are a lot of tutorials about the navigationcontrollers, but I just…
Jayr
  • 592
  • 1
  • 3
  • 14
3
votes
1 answer

How can I send Button Event - UIControlEventTouchUpInside

In my simple program I have a problem with button. Button is a subView of a view and view is a subView of myViewController.view. This Button is created dynamically but it's action doesn't work. How can I sent event? Here's my code.…
bTagTiger
  • 1,261
  • 5
  • 23
  • 38
3
votes
1 answer

iOS - Adding a new view / Switching views on button press

I have a split-view app with a button in the detail view that, when clicked, will take the user to a full screen view of the selected image. I understand that I need a new nib file and view controllers, but I'm not sure how to connect these new…
ebeth
  • 153
  • 1
  • 3
  • 13
3
votes
2 answers

How to get modal presented view controller's root view height?

For a view controller like the Settings one shown in the below image, how to get the height of a view controller's view without any dependency to the AutoLayout? Is there any system variable or macro we can use like UIScreen.main.bounds.size to get…
anb
  • 265
  • 1
  • 8