01-14-2010, 07:25 PM
#1 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 23
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?
01-14-2010, 08:31 PM
#2 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 471
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
01-14-2010, 08:59 PM
#3 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 23
k wats a navigation controller and how would i use an IBAction?
01-14-2010, 09:09 PM
#4 (permalink )
Banned
Join Date: Jan 2010
Posts: 9
read a book, this is all very basic,
01-14-2010, 09:31 PM
#5 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 23
yah well im new to this and im only 14 so itd help a lot if u could just explain it
01-14-2010, 09:35 PM
#6 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 23
i got this book anyway
"Beginning iPhone 3 Development: Exploring the iPhone SDK"
and it says nothing on the topic
01-14-2010, 09:45 PM
#7 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 471
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
01-14-2010, 09:58 PM
#8 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 23
k well guess wat im 12 i lied i didnt no how old u have to be on this forum
01-14-2010, 10:00 PM
#9 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 23
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?
01-14-2010, 10:59 PM
#10 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 471
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
01-15-2010, 12:59 PM
#11 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 23
Thanks!
thanks so much! that did the trick
01-16-2010, 09:53 AM
#12 (permalink )
Registered Member
Join Date: Dec 2009
Posts: 23
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?
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
Quote:
Originally Posted by
iphoneSDKid
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.
Thread Tools
Display Modes
Linear Mode
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
» 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