ios,uinavigationcontroller,storyboard,pushviewcontroller
Try - (void) tableView: (UITableView *) tableView didSelectRowAtIndexPath: (NSIndexPath *) indexPath { UINavigationController *controller = self.navigationController; SubLevelViewController *slController = [[SubLevelViewController alloc] initWithStyle:UITableViewStylePlain]; [controller pushViewController: slController animated: YES]; } Basically instantiateViewControllerWithIdentifier creates a new instance of the specified view controller each time you call it, so you are pushing the view...
ios,objective-c,pushviewcontroller
Update your AppDelegate.m file with following code self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; ExampleViewController *exampleViewController = [ExampleViewController new]; UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:exampleViewController]; self.window.rootViewController = navController; //self.window.backgroundColor = [UIColor lightGrayColor]; [self.window makeKeyAndVisible]; The problem is that you are not initializing rootViewController from...
ios,animation,sidebar,pushviewcontroller,swrevealviewcontroller
finally found the setting method in - (void)_dispatchPushFrontViewController:(UIViewController *)newFrontViewController animated:(BOOL)animated { FrontViewPosition preReplacementPosition = FrontViewPositionLeft; if ( _frontViewPosition > FrontViewPositionLeft ) preReplacementPosition = FrontViewPositionRightMost; //change FrontViewPositionRightMost to FrontViewPositionRight...
ios,uinavigationcontroller,uitabbarcontroller,appdelegate,pushviewcontroller
The return type for selectedViewController is UIViewController, so you need to tell the compiler that it's actually a navigation controller. You do that with a cast, [(UINavigationController *)self.tabBarController.selectedViewController pushViewController:self.newView animated:YES]; ...
ios,objective-c,uiviewcontroller,pushviewcontroller
You should check if this VC self.navigationController is not nil. and i think you want to presentViewController: not pushViewController:...
objective-c,uilabel,pushviewcontroller
1. Save the strings content in the first implementation file and load it in the second Save your label.text in first class: [[NSUserDefaults standardUserDefaults] setObject:Label.text forKey:@"Your key"]; Load it in the second class: Label.text = [[NSUserDefaults standardUserDefaults] objectForKey:@"Your key"]; 2. Use parameters In the first class you have to implement...
ios,uinavigationcontroller,pushviewcontroller
I think this is what you need. Zoom Transition like photos app...
ios,navigation,pushviewcontroller,presentviewcontroller
Error has been in other. If Im right understand: some animations before dismissing presented view controller are blocking animations in navigation stack. I solved this problem with 2 ways: 1) deleteting or set right animations before dismissing 2) use setViewControllers in navigation controller (I select it) - (void)dismissAndPush:(UIViewController *)vc {...
ios,swift,viewcontroller,pushviewcontroller
My guess is that your navigationController is nil. Forcing it to unwrap using ! will then result in a crash. Make sure that navigationController is not nil.
ios,objective-c,uinavigationitem,pushviewcontroller
In postVC.h file @property (strong, nonatomic)NSString*title; In postVC.m file title = [NSString stringWithFormat:@"@%@'s Posts",[userPassed username]]; self.navigationItem.title = title; self.detailViewController.newtitle=self.title; [self.navigationController pushViewController:self.detailViewController animated:YES]; In detailVC.h file @property (strong, nonatomic) NSString*newtitle; In detailVC.m file self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:newtitle style:UIBarButtonItemStylePlain...
objective-c,uinavigationcontroller,uibutton,uitabbaritem,pushviewcontroller
Problem solved by define a property in my UIViewController (as UITabBarItem) like this : @property (nonatomic, retain) UINavigationController *superNavController; And set it in my UITabBarController : self.myViewController.superNavController = self.navigationController; Finally I modified my displayPDFParams method : -(void)displayPDFParams:(UIButton *)sender { PDFProduitController *pdfController = [[PDFProduitController alloc] init]; pdfController.pdf = self.documentParametres; [self.superNavController pushViewController:pdfController...
ios,pushviewcontroller,watchkit,apple-watch
In a hierarchical interface, you need to to use [self popController] to go back after pushing a controller. [self dismissController] is used in modal interfaces....
ios,objective-c,pushviewcontroller
In Objective-C, you need to import your header files, even if they are written in Swift. To do that, you need an umbrella header. Apple has covered this in the documentation. It will tell you how to exactly import Swift files in Objective-C, but simply put you need to import...
ios,uitextview,pushviewcontroller,uitextviewdelegate
You can achieve this by using Delegation in Objective-C. In your SecondView.h add following right after Header Inclusion @protocol YourDelegateName <NSObject> -(void)setText:(NSString *)strData; @end Also add delegate property to your header for accessing them in calling class, like below (This goes with other properties declaration in SecondView.h file): @property (nonatomic,...
ios,pushviewcontroller,addsubview,superview,poptoviewcontroller
You shouldn't worry about this unless you have reason to - i.e. repeated memory warnings. And, if you do that those you should work out why - it's highly unlikely to be the table view. If anything it may be the data you load to populate the table view, so...
ios,uiviewcontroller,uistoryboard,appdelegate,pushviewcontroller
To put both items on the navigation stack, use the setViewControllers:animated: method, passing an array with both items: case CSAppStateSomeState: { MainVC* mainView = [storyboard instantiateViewControllerWithIdentifier:@"MainVC"]; SomeVC* someView = [storyboard instantiateViewControllerWithIdentifier:@"SomeVC"]; [(UINavigationController *)self.window.rootViewController setViewControllers:@[mainView, someView] animated:YES]; } ...
ios,autolayout,pushviewcontroller
I've solve this issue. Select bottom of the BottomSpaceToBottomLayoutGuide Constraint. ...