pushviewcontroller

UIViewController hangs in Xcode 7

好久不见. 提交于 2020-01-17 02:19:10
问题 Not sure whether title is correct or not, I'm calling newViewController on button click but it is not rendering that. as it was working fine in Xcode 6.4 but in Xcode 7 its hangs the UI and not showing new view controller after pushViewController. this is the error logs which print on console Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you

iOS: isMovingToParentViewController is not working as expected

自作多情 提交于 2020-01-13 08:25:09
问题 My setup is simple, and my issue is not very different from this one. However to better explain it I have posted it here: NavController -> VC1 -> VC2 VC1 is root view controller of NavController. VC2 is accessible via Push segue from VC1. I want to detect, within VC1, whether: It appeared directly as root view controller (via Push) It appeared as a result of VC2 being popped I read the docs which says following should tell me if later is true. isMovingToParentViewController == NO However that

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];

How come some of my UIViews are shifted after navigation?

对着背影说爱祢 提交于 2019-12-29 04:02:21
问题 In some of my application designs or for just some UIViews, following a navigationController's pushViewController, my new view will be shifted off the window by the height of the status bar. As a result, I will put this code stub in the viewDidLoad method. CGRect frameAt = [self.view frame]; CGRect statusBarFrame = [[UIApplication sharedApplication] statusBarFrame]; frameAt.origin.y += statusBarFrame.size.height; [self.view setFrame: frameAt]; It does not make sense to me that this is the

Is it possible to push a View Controller with a completion block?

时光怂恿深爱的人放手 提交于 2019-12-29 03:31:08
问题 UINavigationController's documentation contains no pushViewController methods with a completion: parameter. 回答1: I would go with @justMartin's answer . But below is another approach. push animation take 0.3 seconds.So, if you want to run some function here after completion use performSelector after 0.3 seconds of delay. [self performSelector:@selector(completedPushing:) withObject:nil afterDelay:.3]; OR After pushing the new viewController onto navigation stack ,the old viewController view is

Unable to pushViewController after dismissing present view controller

自闭症网瘾萝莉.ら 提交于 2019-12-25 11:27:03
问题 I have FavouriteViewController in which i have one button on click of button i am presenting a view modally called LoginViewController (using storyboard). On this page( LoginViewController ), i again have button, on click of that i am dismissing my modal view controller, after dismissing i again comes back to FavouriteViewController now on this page when i try to push my view controller it doesn't pushes. Here is my code snippet, ------ PART 1 ----- FavouriteViewController.m - (IBAction

How to Navigate UIViewController from UIView

时间秒杀一切 提交于 2019-12-25 09:28:29
问题 Hi I'm New to iOS Development and Please give me a solution to navigate to UIViewController from an UIView: This is the code I have used but it is not working acceptedJobDetailViewController *acceptedJobDetailViewController = [[UIStoryboard storyboardWithName:@"Main" bundle:nil] instantiateViewControllerWithIdentifier:@"acceptedJobDetailViewController"]; [self.navigationController pushViewController:acceptedJobDetailViewController animated:YES]; Also i tried this below code to push the

How to move from custom to transluscent NavigationBar and back? Display problems!

会有一股神秘感。 提交于 2019-12-24 11:28:23
问题 So, i got this Navigation-based App (with a custom NavigationBar - Category) and I have 2 problems here... @implementation UINavigationBar (Custom) - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"bg_toolbar.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; } @end Because of the Navigation-based App, most of the views have a height of 436px (= ScreenSize - NavigationBar height, as you probably know ;). I got one view similar to

Can I push a modal view controller from within another modal view controller?

荒凉一梦 提交于 2019-12-24 06:20:51
问题 I've got a rootViewController that, at one point, displays a peoplePickerNavigationController. I'm trying to push a second view controller when my user selects a specific contact property, like so: -(BOOL)peoplePickerNavigationController:(ABPeoplePickerNavigationController *)picker shouldContinueAfterSelectingPerson:(ABPersonRef)person property:(ABPropertyID)property identifier:(ABMultiValueIdentifier)identifier { RuleBuilder *ruleBuilder = [[RuleBuilder alloc] initWithNibName:@"RuleBuilder"

ios: Pushing another ViewController on a model view

独自空忆成欢 提交于 2019-12-23 22:34:36
问题 I have a viewcontroller that is presented modally. [self presentModalViewController:ViewControllerA animated:YES]; Within this ViewControllerA I've got a table view and when the user clicks on a cell another ViewControllerB should be pushed on top of the current one. - (void)tableView:(UITableView *)tv didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [self.navigationController pushViewController:ViewControllerB animated:YES]; The problem: I cannot push anything because it is push from a