Questions tagged [presentmodalviewcontroller]

`presentModalViewController` is a `UIViewController` instance method that presents a modal view controller. This is deprecated as of iOS 6, superseded by `presentViewController`.

presentModalViewController is an iOS UIViewController instance method that presents a modal view controller. This is deprecated as of iOS 6, superseded by presentViewController. According to the Appendix A - Deprecated UIViewController Methods:

A method identified as deprecated has been superseded and may become unsupported in the future.

The presentModalViewController is the correct method when presenting modal views for iOS versions prior to version 5.0. The presentViewController is recommended effective iOS 6.

A view controller presented via presentModalViewController is dismissed with dismissModalViewControllerAnimated. A view controller presented via presentViewController is dismissed via dismissViewControllerAnimated.

References:

568 questions
12
votes
5 answers

No animation when modalPresentationStyle is set to UIModalPresentationCurrentContext

When I'm presenting my UIViewController with modalPresentationStyle of the parent UINavigationController set to UIModalPresentationCurrentContext, the UIViewController is not sliding in. There is no transition used. Here is my…
11
votes
5 answers

How to prevent present modally an active controller?

We have 2 controllers: MainVC and ProfileVC. From MainVC we go to ProfileVC with profileButton press (left item on navigation bar). In Profile VC we have 2 buttons on navigation bar : back to main (leftItem) and open an alertView (rightItem). So…
Zaporozhchenko Oleksandr
  • 4,660
  • 3
  • 26
  • 48
11
votes
2 answers

Refreshing data in a UIViewController after dismissing its presented modal view controller via delegate

I have the delegate working as the data is being passed from the modal to the presenting view controller. But the presenting view controller isn't showing the data it receives from the modal. I looked at other posts and they say to use the…
abc123
  • 8,043
  • 7
  • 49
  • 80
11
votes
2 answers

What is the difference between addChildViewController and presentModelViewController

I know there are three ways to change the view in iOS 1. [self addChildViewController:thirdViewController]; [contentView addSubview:thirdViewController.view]; 2. First * sVC = [[First alloc] initWithNibName:@"First" bundle:[NSBundle mainBundle]];…
Ian
  • 501
  • 2
  • 10
  • 20
10
votes
7 answers

PresentModalViewController not showing navigation bar on next view

Hello I am using One tab bar button on toolbar , this button will show next view with table view ,Here is my code [self presentModalViewController:self.navigationController animated:YES]; my problem is that when I click…
iProgrammer
  • 3,099
  • 3
  • 33
  • 59
10
votes
2 answers

How to start an iOS app with a modal view controller already presented without the user being able to see the presenting view?

I've tried many combinations of doing this from the app delegate, the presenting view controller's viewDidLoad, with and without delay, with and without animation. But either the user can see the presenting view controller for a moment, or the modal…
abc123
  • 8,043
  • 7
  • 49
  • 80
9
votes
2 answers

Present Modal View Controller from inside Popover View

So in my universal app I have a section where a person can look at an existing list of notes from our system (retrieved through a simple web service) and then also create a new note if they want. So for the iphone it's pretty simple layout, a…
Sal Aldana
  • 1,235
  • 4
  • 17
  • 39
9
votes
4 answers

How to show modalviewcontroller above tabbar

I have tab bar and in view "A" and in "A" I have navigation controller. SO inside my navigation controller in "A" i called [self presentModalViewController:modalView animated:YES] But modalView shows under tab bar. How to show it above tab bar?
8
votes
3 answers

Using presentModalViewController with storyboards

I'm fairly new to iOS programming and I'm working on an iPad app that has a Tab Bar Controller with 4 View Controllers (named FirstViewController, SecondViewController, etc) attached to it. Currently the Tab Bar Controller is set to be the default…
8
votes
0 answers

iOS 13 Presenting Modal half screen for iOS, popover for iPadOS

What I'm looking to achieve is the exact same behavior as share view of iOS 13. I want to present my custom picker view as popover on iPad, and as semi modal on iPhone. I'm currently using "present as popover" on storyboard, which I get the default…
8
votes
2 answers

iOS in-call status bar update viewcontroller presented modaly on screen

I'm afford to ask this question because after large research almost 2days of Googling, Stack Overflowing, etc... My issue is this: I'm presenting ViewController from my main ViewController like this: UINavigationController *navigation =…
Shial
  • 1,386
  • 19
  • 31
7
votes
1 answer

iOS 5: Twitter composer view appears slowly

I have a question about presenting the TWTweetComposerViewController as a modal view in iOS 5. I use the apple sample code as below to implement a tweet method in my app. -(void)tweet { //Using tweeting example code. //Setup the build-in…
Jing
  • 1,935
  • 3
  • 17
  • 26
7
votes
1 answer

UIScrollView scrolls to different position while animating presentation of modal view controller

I'm using a UIScrollView for paging three different UIViewControllers. The pager initializes to display page 1 from start. So the user can swipe left or right from the beginning. When I present a modal view controller from the mid view controller,…
7
votes
3 answers

willRotateToInterfaceOrientation not being called from presented viewcontroller

I have uiviewcontroller on ipad with this configuration: shouldAutorotate (true) supportedInterfaceOrientations (UIInterfaceOrientationMaskAll) and inside willRotateToInterfaceOrientation i perform some trick to adjust my interface. From a child of…
7
votes
2 answers

iPad presentViewController is always Fullscreen (need formSheet) iOS6

I need to present a viewController as a formSheet when the user taps a 'settings' button in the navigation bar in the iPad side of my universal app. The view is called "SettingsViewController," and it's a View Controller in my iPad Storyboard with…
jhilgert00
  • 5,479
  • 2
  • 38
  • 54
1
2
3
37 38