Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 08-13-2009, 01:27 PM   #1 (permalink)
Registered Member
 
Join Date: Jul 2009
Location: Cleveland
Posts: 21
Send a message via AIM to Chetmun
Unhappy New View

I'm missing something. I'm trying to bring in a new view after pressing a button on the first one. Apparently the following code only works in certain situations:

SecondViewController *controller = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
[[self navigationController] pushViewController:controller animated:YES];

I use this code in another app and it works just fine. So it's something in the way things are set up I guess. The other app was nav-based but this one is just two views. I probably need to specify something somewhere or make some link in IB or something. (I have already verified the button fires the above code so that link is fine.)

Anyone have any ideas what I could be overlooking? I think the navigationController is not the way to go since I'm not using a nav bar setup. So what should I be doing instead to get the second view to come in. I'm sure it's painfully obvious to a lot of you.
Chetmun is offline   Reply With Quote
Old 08-13-2009, 10:39 PM   #2 (permalink)
Registered Member
 
pjlocko's Avatar
 
Join Date: Jun 2009
Location: SoCal
Posts: 63
Default

Quote:
Originally Posted by Chetmun View Post
The other app was nav-based but this one is just two views.
Bingo , now start a new nav based project and compare it to a view based project..... notice the extra code for the nav controller?

If you dont want to use a nav controller and push/pop read up on addSubview
pjlocko is offline   Reply With Quote
Reply

Bookmarks

Tags
button, navigation, pushviewcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 281
21 members and 260 guests
2WeeksToGo, ADY, apatsufas, ckgni, dacapo, Dani77, Fritzer, ghost, HDshot, headkaze, jakerocheleau, joeallenpro, masc2279, mer10, mystic.purple, objch, Rudy, tathaastu, themathminister, timle8n1, Zool
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,878
Threads: 89,223
Posts: 380,731
Top Poster: BrianSlick (7,129)
Welcome to our newest member, olga2000
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:37 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0