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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 05-03-2010, 09:02 PM   #1 (permalink)
Registered Member
 
Whitehk's Avatar
 
Join Date: Feb 2010
Posts: 119
Whitehk is on a distinguished road
Default edit variable values in different view controllers?

Hi. I want to be able to edit one value in one view controller in another. For example, i have a game view controller and an options menu view controller. I want to be able to edit a number that's in the game (such as how fast a ball goes in pong) in the options menu and then have it change the value in both the options menu and the game. And no im not creating a pong game. It's just the best example I could think of. Basically, what I want to do is make a variable (and its value) available throughout the project. Is this even possible? Help is always appreciated. Thanks in advance.
Whitehk is offline   Reply With Quote
Old 05-03-2010, 10:32 PM   #2 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 74
walapu is on a distinguished road
Default

Quote:
Originally Posted by Whitehk View Post
Hi. I want to be able to edit one value in one view controller in another. For example, i have a game view controller and an options menu view controller. I want to be able to edit a number that's in the game (such as how fast a ball goes in pong) in the options menu and then have it change the value in both the options menu and the game. And no im not creating a pong game. It's just the best example I could think of. Basically, what I want to do is make a variable (and its value) available throughout the project. Is this even possible? Help is always appreciated. Thanks in advance.
This is what I did in the end, Singleton Classes Matt Galloway's iPhone Apps. Feel free to look at the thread. http://www.iphonedevsdk.com/forum/ip...ble-issue.html
walapu is offline   Reply With Quote
Old 05-06-2010, 12:30 PM   #3 (permalink)
Registered Member
 
Whitehk's Avatar
 
Join Date: Feb 2010
Posts: 119
Whitehk is on a distinguished road
Default

Quote:
Originally Posted by walapu View Post
This is what I did in the end, Singleton Classes Matt Galloway's iPhone Apps. Feel free to look at the thread. http://www.iphonedevsdk.com/forum/ip...ble-issue.html
Thanks for the link. I'll give it a look, and post the outcome here.
Whitehk is offline   Reply With Quote
Reply

Bookmarks

Tags
edit, global, values, variables, 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: 333
20 members and 313 guests
Abidullah, baja_yu, cgokey, Domele, Duncan C, Fstuff, gbenna, givensur, guusleijsten, HowEver, jbro, mdpauley, n00b, newDev, Sami Gh, seokwon lee, SLIC, stanny, Steven.C, WheyLabs
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,113
Posts: 402,877
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

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