Questions tagged [modalviewcontroller]

A modal view controller is a mechanism for managing a modal view, i.e. a view that assumes logical control of the user interface until the modal view is dismissed.

modalviewcontroller
Filter by
Sorted by
Tagged with
649 votes
28 answers
345k views

Presenting modal in iOS 13 fullscreen

In iOS 13 there is a new behaviour for modal view controller when being presented. Now it's not fullscreen by default and when I try to slide down, the app just dismiss the View Controller ...
pascalbros's user avatar
  • 16.4k
225 votes
8 answers
93k views

Disable the interactive dismissal of presented view controller

iOS 13 introduces a new design of modalPresentationStyle .pageSheet (and its sibling .formSheet) for modally presented view controllers… …and we can dismiss these sheets by sliding the presented view ...
Jakub Truhlář's user avatar
198 votes
24 answers
185k views

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 ...
Michael's user avatar
  • 2,247
110 votes
12 answers
137k views

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:...
Jonas Gardner's user avatar
104 votes
1 answer
141k views

Swift Modal View Controller with transparent background [duplicate]

I know this topic is quite popular, but I'm a little iniciate problem in a programming language, the fact is that I still do not understand where I put the code. Well, I'll tell the whole case: I'm ...
user avatar
92 votes
6 answers
62k views

iOS: Use a boolean in NSUserDefaults

When the rootViewController of my application is loaded, I want to be able to check whether or not the users login credentials have been saved to NSUserDefaults. Basically, when the user loads the ...
Sebastien Peek's user avatar
83 votes
4 answers
34k views

dismissModalViewController AND pass data back

I have two view controllers, firstViewController and secondViewController. I am using this code to switch to my secondViewController (I am also passing a string to it): secondViewController *second = ...
Andrew Davis's user avatar
  • 2,320
64 votes
2 answers
69k views

How can I detect the dismissal of a modal view controller in the parent view controller? [duplicate]

Possible Duplicate: Call Function in Underlying ViewController as Modal View Controller is Dismissed I've tried almost everything. Here's what I've tried: -(void)viewWillAppear:(BOOL)animated { ...
objc-obsessive's user avatar
56 votes
13 answers
68k views

iPad custom size of modal view controller

I have a couple of modal view controllers of certain size. I'm trying to avoid the use of custom views (creating full screen black translucent overlay over current view, add the modal view over that ...
emenegro's user avatar
  • 6,941
53 votes
10 answers
13k views

Delay in presenting a modal view controller

I have a tab bar based app. There are navigation controllers in all 5 tabs with instances of custom view controller setup properly as root view controllers. This loads just fine. A couple of these ...
Numan Tariq's user avatar
  • 1,296
37 votes
2 answers
16k views

How do I make an expand/contract transition between views on iOS?

I'm trying to make a transition animation in iOS where a view or view controller appears to expand to fill the whole screen, then contract back to its former position when done. I'm not sure what ...
Jesse Crossen's user avatar
36 votes
9 answers
14k views

iOS Present modal view controller on startup without flash

I'd like to present modally, at first startup, a tutorial wizard to the user. Is there a way to present a modal UIViewController on application startup, without seeing, at least for a millisecond, ...
sonxurxo's user avatar
  • 5,688
34 votes
14 answers
42k views

Dismiss modal view form sheet controller on outside tap

I am presenting a modal view controller as a form sheet and dismissing it when the cancel button, which is a bar button item, is clicked. I need to dismiss it when I tap on outside of that view. ...
jessy's user avatar
  • 491
34 votes
5 answers
3k views

Handling In-Call Status Bar with Custom Modal Presentation

The Problem I've noticed some strange behavior when presenting a UINavigationController (with a root view controller, already pushed, naturally) with UIViewControllerAnimatedTransitioning during a ...
Austin's user avatar
  • 5,635
33 votes
6 answers
38k views

Modal view controller won't dismiss itself

What I'm doing: In my app, I'm presenting a modal view controller (containing app settings) using the following code: optionsViewController.modalTransitionStyle = ...
Jordan Smith's user avatar
  • 10.4k
33 votes
6 answers
21k views

Auto layout invalid after presenting view controller (and many situation) [duplicate]

Background: I have a custom container controller, which just like UITabBarController, but with switch animation. And I use auto layout to achieve. Because switch between child controllers is dynamic, ...
Michael Hui's user avatar
30 votes
6 answers
28k views

iOS : ModalView with background transparent?

I want to show a modalview on a viewController. (which has a naviguation controller). On my view i have text, and a button to show the modalview. I created a .xib which contained my modalview (it's ...
deveLost's user avatar
  • 1,171
30 votes
3 answers
39k views

iOS -- how do you control the size of a modal view controller?

I am presenting a modal view controller. If it matters, it is scrolling up from the bottom. How can I control what portion of the screen it occupies? EDIT: I have the following in the modal view ...
William Jockusch's user avatar
30 votes
13 answers
40k views

How to identify that an UIViewController is presented

I have created an UIViewController sub class which can either be pushed in a navigation stack of a UINavigationController or presented(modally) from any UIViewController. I need to identify whether my ...
saikamesh's user avatar
  • 4,609
29 votes
4 answers
20k views

How to implement UIVisualEffectView in UITableView with adaptive segues

I would like to implement UIVisualEffectView to apply a blur effect to a view to show the view that lies behind it. This view that should have its background blurred is a UITableViewController that ...
Jordan H's user avatar
  • 54k
25 votes
3 answers
23k views

How to custom Modal View Controller presenting animation?

Instead of setting uiviewcontroller's modalTransitionStyle, I want to add an CAAnimation(or some other thing). This code can perform an custom animation in navigationController CATransition* ...
leavez's user avatar
  • 2,188
25 votes
8 answers
27k views

iOS - Semi-transparent modal view controller

I want to present a view controller with a slightly transparent background modally over the current view, such that the first view is slightly visible under the modal view. I set the alpha value of ...
Drew C's user avatar
  • 6,428
25 votes
7 answers
19k views

Implement custom animation to present modal view from specified view on iPad

On the iPad we get much more room to work with, so presenting full screen modal views is not ideal. I know how to present modal views in the new formSheet and a close approach can be found on this ...
Zebs's user avatar
  • 5,398
22 votes
5 answers
12k views

isBeingDismissed not set in viewWillDisappear:

I have some code to clean up in my viewWillDisappear:, which I only want to use when the view is moving back to the parent view controller. - (void)viewWillDisappear:(BOOL)animated { if ([self ...
nevan king's user avatar
  • 113k
22 votes
5 answers
14k views

How to HIDE the iPad keyboard from a MODAL view controller?

I'm trying to hide the iPad keyboard from a modal view controller but it doesn't work. I have tried resignFirstResponder but that doesn't have any affect if we are in a modal view controller. I tried ...
Cal's user avatar
  • 1,625
21 votes
6 answers
24k views

Clear UIWebView content upon dismissal of modal view (iPhone OS 3.0)

I currently have a UIWebView that is displayed within a modal view. It is basically a detail view that provides a view of a page when the user clicks a link. When the view is dismissed and then ...
Ricky's user avatar
  • 639
21 votes
12 answers
41k views

setValue:forUndefinedKey:]:

FinalViewWithSending *newView = [[FinalViewWithSending alloc]initWithNibName:@"FinalViewWithSending" bundle:nil]; newView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal; [self ...
Szwedo's user avatar
  • 364
21 votes
6 answers
19k views

Popover with ModalPresentationStyle is not centered in iOS 7 iPad

I have a problem with iOS 7 that seems to be a bug or I just don't do something right. I have modalViewController that appears as a popover on iPad with ModalPresentationStyle. And it is not standard ...
titicaca's user avatar
  • 823
19 votes
5 answers
18k views

ModalViewController transparent background iOS 8

Opened old project in Xcode 6 and found issue that background is not transparent in presented view controller. I have used solution in the topic below and it worked so far in ios7. iOS : ModalView ...
Vitalii Ivanov's user avatar
19 votes
5 answers
18k views

How do I make a modal date picker that only covers half the screen?

I want to have the same effect as the birthday date setter in the iPhone contacts app. How do I have a modal date picker come up only halfway on the screen. I want the date picker to be over a ...
rustybeanstalk's user avatar
19 votes
8 answers
10k views

UIViewController In-Call Status Bar Issue

Issue: Modally presented view controller does not move back up after in-call status bar disappears, leaving 20px empty/transparent space at the top. Normal : No Issues In-Call : No Issues After In-...
Gizmodo's user avatar
  • 3,131
19 votes
4 answers
3k views

iOS5: Exception on UIWebView in modal UIViewController playing Youtube video

UPDATE: No longer occurs on iOS 6 beta 1 I am currently working on adapting an existing iOS 4 application with the new iOS 5 SDK. I found a new crash when presenting a UIWebView in a modal view ...
Thomas Desert's user avatar
18 votes
4 answers
19k views

status bar hidden in modal view (over fullscreen presentation)

try to hide the status bar from a modal view. already check several methods: override func prefersStatusBarHidden() -> Bool { return true } with / without self....
raphael's user avatar
  • 807
18 votes
5 answers
9k views

Workaround for custom UIViewController animations in landscape?

I have a custom animated UIViewController transition, and it seems that there is a bug in iOS that screws up the layout in landscape orientation. In the main animation method, i'm given a mix of ...
Jason Moore's user avatar
  • 7,199
17 votes
3 answers
28k views

How to dismiss a view controller opened with presentModalViewController:

I presented a view controller using presentModalViewController:, now how to close/dismiss it?
WangYang's user avatar
  • 499
17 votes
3 answers
35k views

How to dismiss a modal VC with fade out animation?

I am using the following code in my presenting VC to fade in the child modal VC, and this works fine: self.infoViewController.view.alpha = 0.0; [self.navigationController presentModalViewController:...
Piepants's user avatar
  • 36.9k
17 votes
9 answers
33k views

Presenting a Modal View Controller hides the Navigation Bar

I have a navigation based app with a navigation bar, but there are a few instances where instead of pushing a view controller onto the stack, I need to present the view controller modally. The problem ...
EmphaticArmPump's user avatar
16 votes
2 answers
24k views

Changing the size of a modal view controller

Once, the user taps a button, I want my modalViewController to appear as a small square in the middle of the screen (where you can still see the original view controller in the background). Almost ...
pozzy's user avatar
  • 227
16 votes
4 answers
9k views

Dismissing modal view controller results in a black screen

This is my view (controller) hierarchy: UITabBarController (as the rootViewController of the app) UINavigationController (as the viewController for one of the tabBar tabs) UIViewController (as the ...
artooras's user avatar
  • 6,525
16 votes
1 answer
5k views

Maintaining orientation of parent view after modal view has been presented with different orientation

So I am developing an iPad app that supports only landscape mode except for on one modal view controller. The issue I am having is that once I present the modal view and change the orientation to ...
shokaveli's user avatar
  • 476
15 votes
6 answers
15k views

Present a transparent modal UIViewController

I'm trying to make a custom alertView (for iOS7+) on my own but I struggle with the alertView presentation. I have a UIViewController with a black background (alpha set to 0.25f), and a alertView as ...
Imotep's user avatar
  • 2,016
15 votes
3 answers
13k views

ios5 - size of modal view controller with storyboard

is there any way to resize a View Controller that has been presented modally using a storyboard segue? how do I present another View Controller from this modal view controller with a flip transition? ...
Alessandro's user avatar
15 votes
4 answers
2k views

ShareKit modal view controller won't go away

I'm using ShareKit 0.2.1 on Xcode 4.2 (iOS SDK 5) to share text on Twitter. It shares fine, but the modal view controller wont go away after successfully sharing on after clicking on the cancel button ...
cfischer's user avatar
  • 24.7k
14 votes
2 answers
13k views

How to present a half modal view controller over the top with iOS 7 custom transitions

How would I go about presenting a "half view" controller over the top of main view controller? Requirements: - Present a second view controller that slides over the top of main view controller. - ...
johnsampson's user avatar
13 votes
3 answers
8k views

Call Function in Underlying ViewController as Modal View Controller is Dismissed

I have a mainViewController. I call [self pushModalViewController:someViewController] which makes someViewController the active view. Now I want to call a function in mainViewController as ...
Bryan's user avatar
  • 17.4k
13 votes
6 answers
17k views

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 ...
hol's user avatar
  • 8,333
13 votes
2 answers
3k views

iOS 8 Keyboard Dismissed delay after modal view controller is dismissed

In iOS 8+ I noticed that if you have an textfield that is currently the firstResponder in a view controller that was presented, when the view controller is dismissed, the keyboard hangs around for ...
micap's user avatar
  • 671
13 votes
1 answer
8k views

ios: how to dismiss a modal view controller and then pop a pushed view controller

I have a view controller B that is pushed onto the navigation stack by root view controller A and this view controller B needs to display an alternative view if its model is in a certain state so it ...
Heisenberg's user avatar
  • 1,319
13 votes
7 answers
4k views

REALLY strange app color behavior?

On appDidFinishLaunchingWithOptions, I tint my entire app red with the following code. self.window.tintColor = [UIColor otfRedColor]; This works perfectly, and when my app loads, all the navigation ...
Josue Espinosa's user avatar
12 votes
3 answers
21k views

How to create a UIViewController layout in storyboard and then use it in code?

I have a Storyboard in my iOS 5 application. In there I have created a number of screens and it works perfectly. However there's one view controller that I create in code, not as a result of UI ...
kender's user avatar
  • 86.3k

1
2 3 4 5
26