Menu
  • HOME
  • TAGS

iOS pushViewController is not working

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...

pushviewcontroller doesn't work?

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 SWRevealViewController reveal push segue animation

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...

Push View Controller From AppDelegate and Tab Bar

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

Display UIViewController as Popup without seguge

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:...

How to pass label data to another label in the second view controller

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...

pushviewcontroller with zoom animation like ios photo app

ios,uinavigationcontroller,pushviewcontroller

I think this is what you need. Zoom Transition like photos app...

push view controller after dismissing presented view controller

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 {...

Crash on pushViewController

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.

Make left bar button's title of navigation item the same as previous view's title

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...

Push to UIViewController from a UITabBarItem

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...

Watchkit , dismissController function

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....

Can't Push from one view controller to the next

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 Passing TextView from PushView to PresentingView

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,...

Remove subview on viewdisappear add again when appear - not working- ios sdk

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 ViewController doesn't appears although viewDidLoad gets called

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

pushViewController cause autoLayout issue using hidesBottomBarWhenPushed (iphone6)

ios,autolayout,pushviewcontroller

I've solve this issue. Select bottom of the BottomSpaceToBottomLayoutGuide Constraint. ...