pushviewcontroller

pushViewController with tableViewController in viewController

守給你的承諾、 提交于 2019-12-22 18:04:09
问题 I have an UIViewController, this controller is contained in a navigationController. I add an UITableViewController in this viewController. I would like to call a pushViewController method when I press on a cell of my tableView. I tried this : UITableViewController - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { FirstView *myViewController = [[FirstView alloc] init]; [f myViewController]; } UIViewController (FirstView) -(void)pushIt { SecondView

Can I “curl down” a page on popViewControllerAnimated?

谁说胖子不能爱 提交于 2019-12-22 17:44:08
问题 I can "curl up" a view controller with this code: [UIView beginAnimations:@"animation" context:nil]; [self.navigationController pushViewController:page animated:NO]; [UIView setAnimationDuration:1]; [UIView setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.navigationController.view cache:NO]; [UIView commitAnimations]; but I can't curl down the last page like this: [UIView beginAnimations:@"animation" context:nil]; [self.navigationController popViewControllerAnimated:NO];

push view controller after dismissing presented view controller

青春壹個敷衍的年華 提交于 2019-12-22 01:05:46
问题 I have this navigation stack RootVC ---> VC1 --> (presenting)-> ModalVC and I have VC2 (not in navigation stack). When presenting ModalVC , I want to click on button in my ModalVC to dismiss ModalVC, then push VC2 into the navigation stack after VC1 at one click. It should look like this: RootVC ---> VC1 ---> VC2 I tried a lot of methods to make it, but pushing event fire only, when I return to my RootVC . I tried to make it with delegates: In ModalVC on click: [self

Prevent UITabBar to hide when pushed

送分小仙女□ 提交于 2019-12-20 05:45:35
问题 First let me tell about my app scenario. UINavigationController {relationship} UIViewControllerMain {push} UITabController {push} UIViewControllerOne . Here problem is tab bar hides in UIViewControllerOne . How can i make it visible? 回答1: self.tabBarController.tabBar.hidden = NO; 来源: https://stackoverflow.com/questions/12244816/prevent-uitabbar-to-hide-when-pushed

What exactly willMoveToParentViewController: and didMoveToParentViewController: do?

假装没事ソ 提交于 2019-12-18 10:53:03
问题 I know that starting with iOS5 and the new UIViewController containment methods, you are supposed to call these methods together with addChildViewController: , removeFromParentViewController: and the transition method. I also know the proper order of calling them in the three scenarios. What I don't know is what exactly these methods do? If these were merely override points for subclasses of UIViewController I guess we wouldn't be required to call super when overriding. What can/will go wrong

UINavigationController crash because of pushing and poping UIViewControllers

百般思念 提交于 2019-12-17 21:13:25
问题 The issue: I have a UINavigationController as as subview of UIWindow, a rootViewController class and a custom MyViewController class. The following steps will get a Exc_Bad_Access, 100% reproducible.: [myNaviationController pushViewController:myViewController_1stInstance animated:YES]; [myNaviationController pushViewController:myViewController_2ndInstance animated:YES]; Hit the left back tapBarItem twice (pop out two of the myViewController instances) to show the rootViewController. After a

how to push a viewController with flip animation

浪子不回头ぞ 提交于 2019-12-13 19:07:37
问题 [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:1]; [UIView setAnimationCurve:UIViewAnimationCurveEaseIn]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES]; alarmViewController = [[AlarmViewController alloc] init]; [self.navigationController pushViewController:alarmViewController animated:YES]; [alarmViewController release]; [UIView commitAnimations]; I just want the viewcontroller flip like opening a book page,but it

How to use navigationController.pushViewController in TableCell class? [duplicate]

一世执手 提交于 2019-12-13 10:01:32
问题 This question already has answers here : navigate on click of collectionview cell inside tableview (4 answers) Programmatically navigate to another view controller/scene (18 answers) Is there a way to navigate from a tableViewCell to another view controller when a cell is swiped? (2 answers) Closed 7 months ago . Using UITableviewcell class for displaying the cell of table list. I want to redirect from one screen to another using " navigationController?.pushViewController ", but it is not

Can I use pushViewController with UISegmentedControl?

荒凉一梦 提交于 2019-12-13 05:49:18
问题 I want to use pushViewController with UIsegmentedController to push to other view and xib. Can I do that in xcode 4 ??? If I can , Could you guide me please ? Here is some code that I try.But won't work. -(IBAction) segmentedControlIndexChanged:(id)sender { if ([sender selectedSegmentIndex] == 0) { BDshelveController *shelve_page = [[BDshelveController alloc] initWithNibName: @"BDshelveController" bundle:nil]; } else if([sender selectedSegmentIndex] == 2) { BDlibraryController *lib_page = [

pushViewController is not pushing

旧巷老猫 提交于 2019-12-13 05:19:28
问题 I was using initWithNibName to push the cells to detail views but I want to use single storyboard rather than having numerous nib files. The below code is supposed to push the view to subcategoriesViewController when the cell is clicked. the cells are dynamic from json data. Its not giving any errors. Do you think its an issue with navigation control? Just to test, I added a button on this view and it works; when I click it, it does push to next view. - (void)tableView:(UITableView *