objective c - Using Value in Whole App and Manupulate That Value -


i want ask question app let me explain you.my app one. ok

i'm giving example. @ first have super value 350 ( value should use 1 time )

when wrote 100 text field , clicked done

remain score 350 - 100 = 250

while not closing app wrote text field again diffirent number 85 , clicked done

remain score 250 - 85 = 165

and third of course not closing app , again wrote text field number 50 , clicked done

remain score 165 - 50 = 115

this continue want create.

in app

İn app going this...

when wrote 100 text field , clicked done

remain score 350 - 100 = 250

while not closing app wrote text field again different number 85 , clicked done

remain score 350 - 85 = 265

and third of course not closing app , again wrote text field number 50 , clicked done

remain score 350 - 50 = 50

this continue this. wrote code.

bascily

    int playerscore = [_txt_score.text intvalue];     int gamescore = 501;     int currentscore = gamescore - playerscore;  

when clicked done button second time processes start on want manipulate gamescore value, not it.

1) create variable value in appdelegate.h file @propertise , @synthesise it

2) set value below: appdelegate *appdelegate = [[uiapplication sharedapplication] delegate]; appdelegate.value -= 5;


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -