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 01-14-2010, 07:25 PM   #1 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 23
Question different view controllers

How do you set a property in one view controller and then retrieve that value in a different view controller? Like in a game when you choose the level in one view, and then actually play the game in a different view?
iphoneSDKid is offline   Reply With Quote
Old 01-14-2010, 08:31 PM   #2 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 471
Default

just use a navigation controller attached to an IBAction and push it on
__________________
01010111 01101111 01110111 00101100 00100000 01001010 01110101 01110011 01110100 01101001 01101100 01101100 00110100 00110101 00101100 00100000 01111001 01101111 01110101 01110010 00100000 01110011 01101111 01101111 01101111 00100000 01100011 01101111 01101111 01101111 01101100
WillSDev is offline   Reply With Quote
Old 01-14-2010, 08:59 PM   #3 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 23
Default

k wats a navigation controller and how would i use an IBAction?
iphoneSDKid is offline   Reply With Quote
Old 01-14-2010, 09:09 PM   #4 (permalink)
Banned
 
Join Date: Jan 2010
Posts: 9
Default

read a book, this is all very basic,
iPhone Programmer is offline   Reply With Quote
Old 01-14-2010, 09:31 PM   #5 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 23
Default

yah well im new to this and im only 14 so itd help a lot if u could just explain it
iphoneSDKid is offline   Reply With Quote
Old 01-14-2010, 09:35 PM   #6 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 23
Default

i got this book anyway
"Beginning iPhone 3 Development: Exploring the iPhone SDK"
and it says nothing on the topic
iphoneSDKid is offline   Reply With Quote
Old 01-14-2010, 09:45 PM   #7 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 471
Default

im 13 and i used Sam's Teach yourself iPhone Dev. Invest in that, or watch youtube videos, on changing views
__________________
01010111 01101111 01110111 00101100 00100000 01001010 01110101 01110011 01110100 01101001 01101100 01101100 00110100 00110101 00101100 00100000 01111001 01101111 01110101 01110010 00100000 01110011 01101111 01101111 01101111 00100000 01100011 01101111 01101111 01101111 01101100
WillSDev is offline   Reply With Quote
Old 01-14-2010, 09:58 PM   #8 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 23
Default

k well guess wat im 12 i lied i didnt no how old u have to be on this forum
iphoneSDKid is offline   Reply With Quote
Old 01-14-2010, 10:00 PM   #9 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 23
Default

ohhhh u thought i meant just change view i no how to do that. i mean how do u for an example set an integer in one view and retrieve that integer in another?
iphoneSDKid is offline   Reply With Quote
Old 01-14-2010, 10:59 PM   #10 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 471
Default

google NSUserDefaults
__________________
01010111 01101111 01110111 00101100 00100000 01001010 01110101 01110011 01110100 01101001 01101100 01101100 00110100 00110101 00101100 00100000 01111001 01101111 01110101 01110010 00100000 01110011 01101111 01101111 01101111 00100000 01100011 01101111 01101111 01101111 01101100
WillSDev is offline   Reply With Quote
Old 01-15-2010, 12:59 PM   #11 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 23
Talking Thanks!

thanks so much! that did the trick
iphoneSDKid is offline   Reply With Quote
Old 01-16-2010, 09:53 AM   #12 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 23
Default testing text

and by the way how do you test what a string is for example do i use:

if (myString.text == @"text") {

or

if (myString.text == [NSString stringWithFormat:@"text"]) {

or neither?
iphoneSDKid is offline   Reply With Quote
Old 01-18-2010, 05:44 PM   #13 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 41
Posts: 1,184
Default

Quote:
Originally Posted by iphoneSDKid View Post
and by the way how do you test what a string is for example do i use:

if (myString.text == @"text") {

or

if (myString.text == [NSString stringWithFormat:@"text"]) {

or neither?
You should get something like "Learn Objective-C on the Mac" from the same publisher as your iPhone SDK book. I don't have the book but if you go to the Apress site and look for it, they have a Google Preview link for the book. In the preview on pages 136 to 137 it discusses string comparison.
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Reply

Bookmarks

Tags
view controllers

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: 231
15 members and 216 guests
ADY, Alsahir, cacao, dacapo, Dani77, Desert Diva, djohnson, HemiMG, jansan, M@realobjects, MarkC, prchn4christ, smethorst, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,762
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

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