Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mrl4214

macrumors newbie
Original poster
Sep 5, 2010
4
0
I created a button which is supposed to launch a view.. heres what I have so far:

Code:
	SocialwebTwitter *myView = [[SocialwebTwitter alloc] initWithNibName:@"SocialwebTwitter" bundle:[NSBundle mainBundle]];
	NSLog(@"Waiting!!");
		[self.navigationController pushViewController:myView animated:YES];
	NSLog(@"Finshed!");
	[myView release];


All of the logs get printed out on the console however the view never opens or gives any indication that anything occurred. I know the button is working but it seems that its either in the code or in some aspect of the interface builder.
 
Do you have a Navigation Controller initialized in your app delegate.
 
Are you pushing a UIViewController or a UIView onto the navController?

Well I was actually trying to push UIViewController to another UIViewController. IF thats the wrong way to go about it I will need some help ;)


-Thanks!
 
I dont think I do... I am new to iOS development so I don't know how to do that.

First you will need to instantiate a UINaviationController by alloc/initWithRootViewController from within your app Delegate.

Next replace the default view with the newly created navigation controller.


Then within your rootView Controller push the other view controller on to the navigation stack.
 
Well I was actually trying to push UIViewController to another UIViewController. IF thats the wrong way to go about it I will need some help ;)
No, that's the right way (other than needing a navController). But without knowing what class SocialwebTwitter is a subclass of and you're variable being called myView, I just wanted to be sure you were pushing the right kind of object.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.