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
197
votes
24 answers

iOS: Modal ViewController with transparent background

I'm trying to present a view controller modally, with a transparent background. My goal is to let both the presenting and presented view controllers's view to be displayed at the same time. The problem is, when the presenting animation finishes, the…
109
votes
12 answers

presentViewController and displaying navigation bar

I have a view controller hierarchy and the top-most controller is displayed as a modal and would like to know how to display the navigation bar when using 'UIViewController:presentViewController:viewControllerToPresent:animated:completion' The…
77
votes
13 answers

iOS 7 Translucent Modal View Controller

The App Store app on iOS 7 uses a frosted glass-type effect where it is possible to see the view behind. Is this using an API built into iOS 7 or is it custom code. I was hoping it would be the former but I can't see any obvious references in the…
58
votes
10 answers

Present modal view controller in half size parent controller

I am trying to present modal view controller on other viewcontroller sized to half parent view controller. But it always present in full screen view. I have created freeform sized View controller in my storyboard with fixed frame size. 320 X…
Anton
  • 3,102
  • 2
  • 28
  • 47
35
votes
5 answers

Showing pushviewcontroller animation look like presentModalViewController

Is it possible to show pushViewController animation look like presentModalViewController but that has background functionality of pushViewController?
35
votes
5 answers

Unable to get presentViewController to work

I copied a working viewcontroller class from another project into a new project. I can't get the view to load in the new project. In the old project I used presentModalViewController. In the new I cannot get the view to load using either…
user278859
  • 10,379
  • 12
  • 51
  • 74
25
votes
6 answers

Animate presentModalViewController from right /left

Currently I am using [self presentModalViewController :newVC animated:YES] .I want to present newViewcontroller from left/right/top/bottom with a push effect. I tried to use CATransition but it displays a black screen in between the transition.
25
votes
5 answers

iOS - pushViewController vs presentModalViewController difference

What is the difference beetween calling presentModalViewController and pushViewController, when : animation is set to NO (even if yes, that's just an animation style that can be changed). a navigation controller is defined when presenting the modal…
22
votes
6 answers

Present multiple modal view controllers?

update: I've faced this problem again, and found another way. If presenting controller is not embedded in navigation controller, it will be hidden if presented controller is not fullscreen and will became black. Method…
22
votes
5 answers

Presenting a modal controller without knowing the current view controller?

Is there a way to present a view controller modally without knowing what the visible view controller view is? Basically sort of like you would show an alert view at any points in time. I would like to be able to do something like: MyViewController…
nebs
  • 4,939
  • 9
  • 41
  • 70
20
votes
1 answer

UIDocumentMenuViewController dismisses presenting view controller

I have a VC "A" that present VC "B" modally. B presents a UIDocumentMenuViewController The UIDocumentMenuDelegate protocol is implemented in B. As soon as documentMenuWasCancelled(_ documentMenu:) or documentMenu(_:didPickDocumentPicker:) gets…
18
votes
2 answers

Benefit of using .fullScreen presentation style in compare to .overFullScreen presentation style in ios

I am curious to know that what is/are the actual benefit(s) (with some example) we get if we use .fullScreen versus .overFullScreen presentation style while presenting a view controller modally over rootViewController in an iOS app. I read using…
17
votes
3 answers

SwiftUI: How to properly present AVPlayerViewController modally?

Proper UIKit Approach: According to Apple's WWDC 2019 talk on the subject, AVPlayerViewController should be presented modally to take advantage of all the latest full-screen features of the API. This is the recommended sample code to be called from…
17
votes
1 answer

Why can’t UIImagePickerController be pushed into navigation stack?

When using pushViewController to push UIImagePickerController: [self.navigationController pushViewController:pvc animated:YES]; an error will occur such as: Pushing a navigation controller is not supported The right solution is to use…
13
votes
6 answers

iPhone: How to do a presentModalViewController animation from left to right

I am presenting a model view with animation. As a default it comes from bottom to top. How can I make the animation to go from left to right? I know I could use a navigation controller. But actually the presenting view does not need a navigation bar…
hol
  • 8,255
  • 5
  • 33
  • 59
1
2 3
37 38