In objective-c I’m try to create a statement that toggles a variable
-
In objective-c I’m try to create a statement that toggles a variable that switches between two numbers with a UIswitch controller (a * b/w * r) c * h; r needs to trigger two different numbers when on needs to = .73 when off needs to = .66 int a=1; int b=5.14; int c = -.015; int w =1; int r =.73;// on=.73 and off= .66 int h=1; int result; result = (a * b/w * r) c * h; NSLog (@"a*b/w*r)c*h;"); Is this possible
-
In objective-c I’m try to create a statement that toggles a variable that switches between two numbers with a UIswitch controller (a * b/w * r) c * h; r needs to trigger two different numbers when on needs to = .73 when off needs to = .66 int a=1; int b=5.14; int c = -.015; int w =1; int r =.73;// on=.73 and off= .66 int h=1; int result; result = (a * b/w * r) c * h; NSLog (@"a*b/w*r)c*h;"); Is this possible
Member 11251240 wrote:
Is this possible
Most likely but your question is far from clear. In general terms you would write something like:
// in switch change event handler
if (switch == ON)
r = .73;
else
r = .66;But maybe I just don't understand what you are asking.