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

How to access every ViewController from appDelegate?

my problem is I am working with Alamofire and I added AlamofireActivityIndicator from : AlamofireNetworkActivityIndicator GitHub my question is how to add a view to which viewController that user is there and doing networking request , that view…
Mohammad Reza Koohkan
  • 1,656
  • 1
  • 16
  • 36
0
votes
1 answer

Error instantiating View Controller

When I try to instantiate my ViewController with the code below (in the viewDidLoad part) I get a Thread 1: EXC_BAD_ACCESS when running the app on the self.present line. (I'm a beginner to coding) EDIT: So I provide my entire code here to see where…
Ammar
  • 1
  • 1
0
votes
2 answers

passing BOOL when back button pressed

I customized the action of back button. I want to send to parent view a BOOL if back is pressed, but the bool value is always null. my parent .h [...skip...] BOOL myBool; [...skip....] my parent .m #import "theChild.h" .... -…
masgar
  • 1,875
  • 2
  • 20
  • 32
0
votes
1 answer

How to update ViewController fields in real-time in Xamarin.iOS

I need to update fields in a ViewController every 100 msec. I tried setting a timer in the main application, but it required that the Screen Update routine in the ViewController be static. When it was set to static, it could not reference the…
0
votes
1 answer

How to dismiss viewcontroller in appdelegate?

I create launchScreen for pause view like this. func applicationWillResignActive(_ application: UIApplication) { let storyboard = UIStoryboard(name: "Main", bundle: nil) let launchScreen =…
user9494956
0
votes
3 answers

Run method when viewcontroller is accessed from another vc being dismissed

Let's say I have my initial vc called VC1, then I have a second one called VC2. VC1 has a segue to VC2, on VC2 there is a button that will dismiss VC2 and then show VC1. Once VC1 loads I want to run a method but I can't do that in view did load so…
user8969667
0
votes
1 answer

Presenting MFMessageComposeViewController/Understanding DispatchQueue.main.async

I'm trying to present the MFMessageComposeViewController after a person selects their contacts. But I'm getting the lldb error with the following message -- *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:…
0
votes
1 answer

Sending SMS from Contacts for Multiple Contacts Fails

Im trying to acheive the same results as: Sending SMS from Contacts Fails Sending an SMS or "App Invite" to contact(s). The solution to this problem works, but it only allows you to send an SMS to one person at a time. What I want to do is send an…
Vandal
  • 708
  • 1
  • 8
  • 21
0
votes
1 answer

UIViewController placement on screen

I have created a simple app for my school classes and everything works great apart from the app loading in the middle of the screen. centre screen I would like it to appear here! bottom of screen Can anyone point me in the right direction please?
0
votes
1 answer

Swift 3+: Multiple Storyboards with TabBarController. Set TabBarController Tab, Segue to desired ViewController

Working in multiple storyboards. Getting from point A->TabBarController(tab 2)->NavigationControllerA->StoryboardReference->NavigationControllerB->ViewControllerA->ViewControllerB. No need for data passing. My tab bar controller is set up in its own…
0
votes
1 answer

Swift 4 - Segue to new ViewController after Email is sent

In my app I have a MFMailComposeViewController. When the MFMailComposeViewController present it self. I need it segue to a new viewController when send is tapped on. What happen is when "send" is tapped on. The new viewcontroller appears, then …
0
votes
2 answers

Long running async task - how to receive a callback in any view controller that the user may have navigated to

In my iOS Swift app, I start a long running async task (held by a singleton which exists for the lifetime of the app) to upload some data to a server. Typically this task can take up to 10 seconds, during which it is very likely that they will have…
0
votes
0 answers

Dismissing Storyboards Without Navigation Controllers

I am currently running an application with a MenuVC allowing users to pick their choice of four segues to present other VC's. When these four buttons/segues are triggered, a new VC is presented by method of showing. To deal with the problem of…
Esperavo
  • 3
  • 3
0
votes
1 answer

one view in landscape giving warning

I need just one view in my app to show in landscape, all is working but Im getting a warning I would like to get rid off, this is the code in the view controller for that view.. in viewDidLoad [[UIDevice currentDevice]…
manuelBetancurt
  • 15,428
  • 33
  • 118
  • 216
0
votes
2 answers

MultipleControllers in one view

I am basically trying to add two view controllers to one controller. I created a view based application called "MultipleViews". After that i add two controller classes "RedView.h" and "BlueView.h" with their own xibs. I am able to add the views of…
HG's
  • 818
  • 6
  • 22