Questions tagged [modal-view]

62 questions
79
votes
6 answers

Present and dismiss modal view controller

Can anyone give me the example code that I can use to first present a modal view controller, then dismiss it? This is what I have been trying: NSLog(@"%@", blue.modalViewController); [blue presentModalViewController:red animated:YES]; NSLog(@"%@",…
phunehehe
  • 8,618
  • 7
  • 49
  • 79
55
votes
14 answers

Iphone SDK dismissing Modal ViewControllers on ipad by clicking outside of it

I want to dismiss a FormSheetPresentation modal view controller when the user taps outside the modal view...I have seen a bunch of apps doing this (ebay on ipad for example) but i cant figure out how since the underneath views are disabled from…
Daniel
  • 22,363
  • 9
  • 64
  • 71
7
votes
3 answers

Modal view closes when selecting an image in UIWebView iOS

I'm currently building an app with a modal view popping up that contains a WkWebView. When I want to upload an image within this modal view and the Photo Selection appears, the modal view just dismisses back to the view controller that fired it…
Made by FA
  • 710
  • 2
  • 7
  • 27
4
votes
8 answers

Dismiss Modal View

If I'm not mistaken, modal views have to be dismissed from the parent view, not from the modal view itself. In my current project I have two modal views. In the first one, I pass data to the parent view. When the data is passed to the parent view,…
Marcal
  • 1,371
  • 5
  • 19
  • 37
3
votes
2 answers

Hide UIToolBar when using an UISearchBar

Hello I'm currently encountering a problem when I try to hide a toolBar With a searchBar. I have a modal view with an UIToolBar, an UISearchBar (and its controller) and an UITableView. I am using a UIToolbar because this view is actually displayed…
KIDdAe
  • 2,714
  • 2
  • 22
  • 29
3
votes
4 answers

iPhone - Detect the end of the animation

How can I detect the end of the animation of a modal view (when I do a dismiss)? (I'm talking about MFMailComposeViewController which is not created by myself...) Thanks
Nate
  • 7,606
  • 23
  • 72
  • 124
2
votes
1 answer

SwiftUI sheet does not dismiss

Using Swift5.2.3, iOS14.4.2, XCode12.4, Working with the .sheet modifier in SwiftUI made me feel excited at first since it seemed like an easy and efficient way to display a modal sheet. However, inside a real-world application it turns out that…
iKK
  • 6,394
  • 10
  • 58
  • 131
2
votes
1 answer

Why .gesture() in SwiftUI can not be used on my entire modal view?

I have this really simple LostPasswordView using SwiftUI. This form is being presented as a modal view. I use a .onTapGesture and a DragGesture() to dismiss the keyboard. The issue is that only the little part of the view around the TextField…
Roland Lariotte
  • 2,606
  • 1
  • 16
  • 40
2
votes
1 answer

SwiftUI: present modal over PageViewController

I have experienced some problem with UIPageViewController. At some point in its Coordinator the references to UIViewControllers are come invalid. It causes to loose all of the UIPageViewController pages except first one after dismissing modal…
Dmitry
  • 141
  • 1
  • 8
2
votes
1 answer

AVAudio Won't Stop after Presenting Modal View

I have an application that displays movies. The first screen shows buttons that present different modal views. Inside those modal views are buttons that play videos. I want the main menu to play music (easy enough), but I want it to persist through…
Link
  • 396
  • 1
  • 4
  • 15
2
votes
2 answers

disable elements on UIView behind modal UIView

i have a UIView that is smaller than the superview so i can represent this view as a modal view when a button is clicked. I have managed to do the following: * add a subview to the superview. * centered this modal view I am now trying to make the…
Pavan
  • 17,840
  • 8
  • 59
  • 100
2
votes
2 answers

wait after presentModalViewController

I need to wait (don't execute the code) after the presentModalViewController until the modal view it's dismissed, it's possible or it's a conceptual error ? -(NSDictionary *)authRequired { //This view write the settings when dismissed (plist) …
Cesar
  • 4,418
  • 2
  • 31
  • 37
1
vote
2 answers

Can you stop a modal view from dismissing?

I have a view that uses a modal view with a page curl to allow for a username to be entered. This username is then verified with a web-based service to see if it is valid. Everything works great until you enter an invalid username and click…
Mike
  • 13
  • 3
1
vote
1 answer

iPad: Cannot display Second Modal View Controller after dismiss the first one

Hi I am new to iOS development, and my app i am working on is allow users to log in to the server by using web services, and after the user logged in, he will get a list of the books he's allowed to access and then he select one and do what he needs…
Raymond Wang
  • 1,484
  • 2
  • 18
  • 33
1
vote
1 answer

Kivy - How to add multiple Buttons to ScrollView inside ModalView?

I want to write a mobile app with a KivyMD like Bottom Sheet Menu. My problem with KivyMD Buttom Sheet is, when I click the button to open it, takes very long time (depends on the menu length) because the list is generated by calling the function…
Norbert Tiborcz
  • 306
  • 2
  • 9
1
2 3 4 5