presentmodalviewcontroller

Resize ModalViewController and position it at center in iOS 7

我们两清 提交于 2019-12-22 05:31:16
问题 I am trying to show a modalView on an iPad by reducing its width and height, but the problem is that it is not center-aligned. In iOS 6 it used to work fine, but in iOS 7 it is not center aligned. Below is my code: m_helpQA = [[HelpQAViewController alloc]init]; m_helpQA.modalPresentationStyle = UIModalPresentationFormSheet; [self presentViewController:m_helpQA animated:YES completion:NULL]; m_helpQA.view.superview.bounds = CGRectMake(0, 0, 350, 250);//Dimensions of ModalView. presently I am

PresentModalViewController not showing navigation bar on next view

廉价感情. 提交于 2019-12-21 07:42:11
问题 Hello I am using One tab bar button on toolbar , this button will show next view with table view ,Here is my code [self presentModalViewController:self.navigationController animated:YES]; my problem is that when I click this tab bar button it will showing next view with tableview but not navigation bar. because of this i am unable to perform delete operation in tableView. How to solve the issue? 回答1: If you dont find the UINavigationBar on the next class means , it does not have a navigation

how to implement non-modal dialog in IOS like this (image attached)?

倾然丶 夕夏残阳落幕 提交于 2019-12-14 02:35:15
问题 Question: How would one best implement non-modal dialog in IOS like this (image attached)? Allow ability to drag move map still and select (long press) another location, which then that detail is populated in the pop-up "non-modal" dialog. Dialog can have ability to "delete" / "add to favourites" etc. To clarify: I'm asking how to implement the dialogs in the image I have marked "Non Modal Popup" so for the iPad/horizontal regular case, I'm highlighting the dialog would be associated with the

UIAlertView delegate method crashing

穿精又带淫゛_ 提交于 2019-12-13 16:55:41
问题 In my iPhone app, I have a NSObject A class and a UIViewController B class. I want to call a instance method in B class from A. I used the following code. Bclass *vc = [[Bclass alloc]init]; [vc hideAlert:NSString]; [vc release]; and in B class: - (void)hideAlert:(NSString*)message{ UIAlertView *shareAlrt = [[UIAlertView alloc] initWithTitle:@"" message:message delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil]; [shareAlrt show]; [shareAlrt release]; } and the method called and show

Where should I present Modal View Controller?

淺唱寂寞╮ 提交于 2019-12-13 07:25:51
问题 I have an application with a UITabBarController at its top level. I track which tab a user is on and store it so that when they reopen the application they are on the tab they were on when it was closed. So there is no default tab when the app starts up. I have a modal screen that shows first every time the app starts. It doesn't matter which tab was saved, the user is always presented with this view. Where should this modal view be presented from? The logical thing would be to have the

How to access to parentViewController after presentModalViewController?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 19:53:12
问题 I need to access to parentViewController after presentMoalViewController. This is my method that I call in the firstViewController to view the secondViewController: - (void)viewData { SecondViewController *viewCtrl = [self.storyboard instantiateViewControllerWithIdentifier:@"select_data"]; UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:viewCtrl]; navigationController.navigationBar.barStyle = UIBarStyleBlack; UIBarButtonItem

In photoscroller app (iPhone WWDC-104 Photos App) uiscrollview images shift to right when called using presentModalviewController

你说的曾经没有我的故事 提交于 2019-12-12 13:24:01
问题 I have seen the WWDC-104 video showing UIScrollView for photos. I have downloaded the Sample code too. In my app the Structure is as follows, (Root Class)Class A ---> Class B -----------> PhotoViewController(Containing ScrollView) I am calling the PhotoViewController class by using presentModalViewController method in Class B. But with every swipe the new Image shifts to right on the view. A black vertical strip is visible on left of the image which widens with each swipe. So after 6 to 8

Understanding UIViewController hierarchy

一曲冷凌霜 提交于 2019-12-12 10:00:18
问题 Ok - my brain is being fried at the moment so any help would be appreciated. I have multiple subclasses of UIViewController in my app. lets call them VC_A, VC_B, VC_C, VC_D . The users interacts by touching buttons on each of the views. So my AppDelegate adds in VC_A: //Add the view controller's view to the window and display. [self.window addSubview:viewController.view]; [self.window makeKeyAndVisible]; VC_A then loads VC_B by using presentModalViewController : VC_B *tempView = [[VC_B alloc]

Enable Zombie Objects is not enough to help debug my issue - what else can I do?

こ雲淡風輕ζ 提交于 2019-12-12 01:57:41
问题 I'm getting the following runtime error and I cannot determine for the life of me WHYYYY. The error is Thread 1: EXC_BREAKPOINT (code=EXC_1386_BPT, subcode=0x0) which seems to happen whenever I execute the dismissModalViewController:animated or the pushViewController:animated method from any of my VC's. I have enabled zombie objects and that shows me the following message in the debugger, 2012-06-14 16:34:58.769 MyApp[5952:17903] *** -[MyDetailsVC respondsToSelector:]: message sent to

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