presentmodalviewcontroller

Application tried to present modally an active controller

ぐ巨炮叔叔 提交于 2020-01-10 04:34:07
问题 I have searched for and found various q/a on this error, but have not been able to find any specific help for my issue (at least that my minimal experience allows me to understand). I am loading a UIView from the app's main menu, which in turn has several button options (call it submenu). One of these goes back to the main menu without issue ( [self dismissModalViewControllerAnimated:YES]; ). Another button loads a UITableView (separate view controller), which loads fine. However, I want a

How to present view controller properly?

丶灬走出姿态 提交于 2020-01-06 02:16:05
问题 I have a pretty simple application with a couple of UIViewControllers (say VC_A and VC_B ). Every screen has a button that allows to switch to another screen (no UINavigation is used). App schedules a local notification, which, when expired, should present another view controller ( VC_N - no matter what screen is active at the moment). The problem is that sometimes application throws: 'NSInternalInconsistencyException', reason: 'Attempting to begin a modal transition from <VC_A: 0x2021e0> to

Add NavigationController to current view

旧城冷巷雨未停 提交于 2020-01-05 08:07:43
问题 I'm using a UIScrollView to display some images, and i need to present or push another view when the user selects one part of the image.This ScrollView is created only programmatically. How i can programmatically add a navigationController to it and present another view? I tried this way but just give me the following error : Pushing a navigation controller is not supported' StatesViewController * controller = [[StatesViewController alloc]initWithNibName:@"StatesViewController" bundle:nil];

PresentModalViewController view is shifted with no animation

元气小坏坏 提交于 2020-01-02 08:09:20
问题 I have a new view controller on the iPhone which I call using the following line of code: [self presentModalViewController:controller animated:NO]; This works great if animation is on, but I am looking to have an instant switch. The problem is when I set animation to NO, the whole view shifts 20px to the right (it is always in landscape mode) as if there is a status bar but in portrait mode!? In this example the yellow space is the new view controller. alt text http://www.james-ingham.info

presenting a view not working in iphone

我是研究僧i 提交于 2019-12-25 08:20:52
问题 I am trying to navigate from one page to another on a button click in a facebook appliaction. I am using registerUser=[[RegisterPage alloc]initWithNibName:@"RegisterPage" bundle:nil]; [self presentModalViewController :registerUser animated:YES]; for presenting the next view after getting response from facebook. But it is not showing the next view. It works fine in all other places where I used to present other views. Anyone have idea about this issue? 回答1: What exactly is 'self' here? Is it a

Objective-C: Help needed to understand why two methods react differently when accessing a UIView in two different ways

风格不统一 提交于 2019-12-25 04:58:20
问题 I feel bad asking three questions in the space of two days but I am stuck and searching the forum I couldn't find the answer so I hope someone can help me - all part of the fun of learning I suppose! In my program I have three views which go in the order GridScreen -> GameScreen -> CorrectScreen. On the CorrectScreen I have a button which goes back to the GridScreen. On the GridScreen I have a bunch of buttons which a user can press to go to the GameScreen. When the user answers the question

How can I display a view controller modally, using the parent's navigation controller?

不问归期 提交于 2019-12-25 01:45:49
问题 I'm implementing a UITabBar in the middle of my navigation stack without UITabBarController. The UITabBar is in the DetailViewController which delegate a portion of the screen to the view controller associated with the selected tab element. Inside one of view controller's thats displayed via tab bar selection, there's a UIButton which needs to display a view modally. I tried [self presentModalViewController:modalNavController animated:YES]; , but the new navigation bar was hidden underneath

iOS - get document's URL when QLPreviewController is closed

旧时模样 提交于 2019-12-24 14:12:43
问题 I have this code which previews the PDF file: QLPreviewController *previewController=[[QLPreviewController alloc]init]; previewController.delegate=self; previewController.dataSource=self; [self presentModalViewController:previewController animated:YES]; Now, when I close QLPreviewController or previewController this method is called: - (void)previewControllerDidDismiss:(QLPreviewController *)controller { NSLog(@"You closed the document"); } Now, how I can return the document's or Pdf's URL

PresentModalViewController with some frame

牧云@^-^@ 提交于 2019-12-23 03:51:24
问题 I want to present a modalViewController with a small frame and at the center of the view. Is that possible? Even if I set some frame to the viewController object, presentModelViewController is displaying that view in full screen mode. Also, I have used modalPresentationStyle as UIModalPresentationFormSheet . I want to have frame even smaller than that. How to do that? 回答1: You cannot present a modal view controller that has a smaller frame size. what you can try doing is to set the background

How can I present a ModalViewController from a UIActivity item picked from UIActivity View Controller?

陌路散爱 提交于 2019-12-22 05:33:14
问题 I am working on an app that presents some data in a detailViewController. I have a rightBarButton in the navbar that presents a UIActivityViewController that is filled with my own UIActivity sublclassed items. Most of them work fine as they are just changing a small aspect to the data from the detail view, but I need one of them to open a modalViewController when selected. I keep getting the following warning from the console..... Warning: Attempt to present <UINavigationController: