modalviewcontroller

Unwind segue not being triggered

白昼怎懂夜的黑 提交于 2019-12-13 04:29:40
问题 I have a storyboard that has a starting view controller that presents other modal view controllers. Say view controller A is the startingViewController, and view controller B is the modally presented view controller. How can I trigger the unwind segue from B back to A, from ViewController A ( not just from a button located on ViewController B)? The button works to perform the unwind segue , but when I try to perform it programmatically using [self performSegueWithIdentifier:@"ReturnToStart"

Modal View Transparant background - stop lower layer hiding?

…衆ロ難τιáo~ 提交于 2019-12-12 14:24:54
问题 I have a brief for a share page which involves clicking on a share button and a modal view appearing over the top with some share functionality. My issues is that i'd like the background of the modal view to be semi transparent and therefore show the view beneath. I've set the background properties of the modal layer and as the modal appears the layer beneath is briefly visible - and looks exactly as I require - but as soon as the cover transition is complete the background view is hidden -

iOS 13 Modals - Calling swipe dismissal programmatically

≡放荡痞女 提交于 2019-12-12 10:16:59
问题 I'd like to detect a modal dismissal in the view controller that's presenting the modal. This method works amazing for detecting the new iOS 13 swipe dismissal on the new card modals: override func prepare(for segue: UIStoryboardSegue, sender: Any?) { if segue.identifier == "MyIdentifier" { segue.destination.presentationController?.delegate = self } } extension MyController: UIAdaptivePresentationControllerDelegate { func presentationControllerDidDismiss(_ presentationController:

Within a (BOOL)webView: How to open a URL clicked in UIWebView that opens a Modal UIWebView

[亡魂溺海] 提交于 2019-12-12 09:55:03
问题 Thanks for viewing my question. Let me describe the app first. I have a tab bar based app for iOS5.1 that is using storyboard and ARC. There are four tabs with a view controller in each one that shows a webview with local HTML files (each view is a different set of html files to display). Currently when a user touches a http or https link, it'll open in Safari. However, I now want it to open within app via a modal view. I currently have the interface created and ready to show, but I can't

Modal View Controller force Landscape orientation in iOS 6

谁都会走 提交于 2019-12-12 07:54:35
问题 I have a UITabBarController presented in Portrait mode. On one of the tabs I have a button that shows a UIViewController modally (A simple storyboard segue performs the action). I want this modal view to be shown in Landscape mode, but I can't get it to turn automatically. I have this in the modal views controller - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft); } I've added

Why does Apple recommends to create modal navigation controllers programmatically?

♀尐吖头ヾ 提交于 2019-12-12 07:50:37
问题 "When presenting a navigation controller modally, it is often simpler to create and configure your navigation controller object programmatically. Although you could also use Interface Builder to do so, doing so is generally not recommended." If fact, because my navigation controller is simple, I would rather customise the view in IB! 回答1: While I don't know the exact reason, this is my shot at it: When creating the controller programmatically, you need only a few lines of code, in fact, in

TWTweetComposeViewController not dismissing on iPad simulator

非 Y 不嫁゛ 提交于 2019-12-12 04:07:37
问题 In my app I have an action sheet and one of its buttons opens the TWTweetComposeViewController modally. On iPhone simulator the cancel button on the tweet composer works fine and dismisses the view. However, on iPad simulator the cancel button does not work and the tweet composer view remains on the screen. It is even weirder because after pressing the cancel button, the keyboard retracts and the underlying views become active. It behaves as if the view has been dismissed but its is still

Passing UITextView values to ModalViewController from parent View Controller

别来无恙 提交于 2019-12-12 02:45:46
问题 I have been working on school newspaper app for iPad. I was finally able to parse the articles I need. I put each article summary on parent view controller with UITextView. Now what I am trying to do is to display each article with ModalViewController when custom button on top of UITextView is pressed. I looked through couple QA's here in StackOverFlow, but couldn't make my project work. I am going to put some of my codes here and some logs on console. Any help will be greatly appreciated.

presentModalViewController slides a new view too far up and goes above the top of the screen

两盒软妹~` 提交于 2019-12-12 01:32:47
问题 -(void)reviewClicked:(id)sender { ReviewViewController *newView = [[ReviewViewController alloc] init]; newView.delegate = self; UINavigationController *navCon = [[UINavigationController alloc] initWithRootViewController:newView]; [self presentModalViewController:navCon animated:YES]; } I have a splitViewController setup, which is what is probably causing some issues. Within the detail view controller, I have a button that when clicked calls the above code. The goal is to slide a view from the

How to prevent GreyStripe Fullscreen Ad from dismissing my modal view controller landing page?

送分小仙女□ 提交于 2019-12-11 23:58:30
问题 I'm landing a GreyStripe Fullscreen Ad in a modal view controller in my iPhone app. The problem is that when GreyStripe SDK dismisses the full screen Ad, it also dismisses my modal view controller. 回答1: Couldn't find a reasonable way of solving this problem, and instead of presenting my landing page as a modal view controller I presented it the classic way in a navigation controller. This solved my problem. 来源: https://stackoverflow.com/questions/8769023/how-to-prevent-greystripe-fullscreen