modalviewcontroller

Modal View Controller Won't Start in Landscape Mode

一曲冷凌霜 提交于 2019-12-17 19:50:49
问题 I have a navigation based app that has a detail view (UIWebView) with action buttons across the bottom in a UIToolbar. I want to add 'notes' when the 'notes' button is pushed. Everything works fine when the webview is in portrait mode. I press the notes button, the modal view opens fine and works great. The problem occurs when the webview is in landscape mode. If I press the notes button, all the code to open the modal view gets called but all I get is a white screen. One comment: If I open

How to pass data back from one view to other View in IOS?

南楼画角 提交于 2019-12-17 19:25:18
问题 I am able to pass data from one view to other view without any problem. But here is my situation i am facing problem. Let's say -> Passing data to other view ViewA->ViewB This working perfectly fine ViewB->ViewC This working perfectly fine ViewC->ViewB Here is the problem. I tried using push segue ,it goes to ViewB but when i press back button it goes to ViewC->back button->ViewB->back button->View A. From ViewB when i press back button it must goes to ViewA. Tried using modal segue , it goes

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

ぃ、小莉子 提交于 2019-12-17 17:30:01
问题 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 controller. It's not helping. - (void)viewDidLoad { TestResultView *trv = [[TestResultView alloc]initWithTest: [Model m].currentTest]; self.view = trv; trv.frame = CGRectMake(0, 320, 320, 160); [trv release]; [super viewDidLoad]; } 回答1: You can modify the frame of the view controller, but if you're

Dismiss modal view form sheet controller on outside tap

时光怂恿深爱的人放手 提交于 2019-12-17 09:23:10
问题 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. Please help me with a reference. Note: my modal view controller is presented with a navigation controller. @cli_hlt, @Bill Brasky thanks for your answer. I need to dismiss it when tap occurs outside of the modal view which is a form sheet. I am pasting my code below. -(void)gridView:(AQGridView *

Dismiss modal view form sheet controller on outside tap

家住魔仙堡 提交于 2019-12-17 09:23:07
问题 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. Please help me with a reference. Note: my modal view controller is presented with a navigation controller. @cli_hlt, @Bill Brasky thanks for your answer. I need to dismiss it when tap occurs outside of the modal view which is a form sheet. I am pasting my code below. -(void)gridView:(AQGridView *

Changing VC issue in Swift. How to pass data between views in tab bar controller?

谁都会走 提交于 2019-12-17 04:07:25
问题 I have four ViewController, I don't use an UITabbedbar because It's more difficult to customize. I use modal segue but I think the memory consumption is excessive. this is a screen shot of my first and second VC. What I have to use to change View correctly? That's the code I use : override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) { if (segue.identifier == "second") { let secondVC = segue.destinationViewController as SecondViewController; } } 回答1: From your Storyboard

Can't dismiss modal view when tap a button

最后都变了- 提交于 2019-12-13 22:09:36
问题 In "FirstViewController" I declare a button which present the modal view "InfoViewController". In "InfoViewController", I declare a toolbar with a "modalViewButton" UIButton which dismiss the modal view. But the "OK" UIButton doesn't work. I don't know why. Here's FirstViewController.h #import <UIKit/UIKit.h> #import "InfoViewController.h" @interface FirstViewController : UIViewController { InfoViewController *infoViewController; } @property (nonatomic, retain) InfoViewController

Application tried to present modally an active controller ios

瘦欲@ 提交于 2019-12-13 13:12:47
问题 I was trying to set the ViewController with a parent view controller before it shows show that it can provide call backs, I done this using PrepareForSegue - (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { if ([segue.identifier isEqualToString:@"newQuarter"]) { [segue.destinationViewController setParentViewController:self]; } } It crashed giving me the error message: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to

How to have a floating modal controller on top of another controller and have interaction with them at the same time

吃可爱长大的小学妹 提交于 2019-12-13 08:59:24
问题 I want to know what is best approach for having a floating modal controller on top of another controller like this image: As you see, top section of this page is a modal view. I can implement this top view in the below controller class but I want to have a separate controller for it, but I don't know how to present that class so user have control of the both controllers in same time. If I create a regular transparent class & present it modally, user will lost interaction contact with the

I am stuck at presenting a full image on tapping the cell in UICollectionViewController

末鹿安然 提交于 2019-12-13 08:09:01
问题 I have a UICollectionViewController in my application and I wish to make the image in a particular cell of full size when the user taps on it. Sorry for the hassle, as I am a beginner for iOS. As per my knowledge will it be presented in a new View controller and if yes/no, then how? Thanks in advance. 回答1: If using storyboard, just add new ViewController to the scene and Ctrl-drag from the CollectionView cell to the ViewController to create segue. Choose modal if you want full screen. In your