objective c - Passing a float property as an parameter -
i’m trying set call ease portion of program
i try call method below saying... [self amethodtotry:self.units :row :self.unitsfloat];
- (void)amethodtotry:(uitextfield *)unitsrow : (int)row : (float)units { if (row == 1) { [unitsrow settext:(nsstring *)[self.unitsarray objectatindex:row]]; nslog(@"this row -----> %ld",(long)row); self.unitconversionvalue = [[self.unitsvaluearray objectatindex:row]floatvalue]; // nslog(@"%f",self.unitconversionvalue); units = 8; nslog(@"self.units float = %f", self.unitsfloat); nslog(@"units = %f", units); it continues on here.. want passed info.. row case 1 solve true first if , “self.units” plopped “unitsrow” , self.unitsfloat plopped in “units”
but when called .. set text portion works fine.. first log shows 0. while second shows 8.0.
is can’t done.. don’t see i’m screwing up..
why isn't setting self.unitsfloat 8?
thank in advance help.
brian
you in deep need of understanding basics of objective c first. take @ this

- (void) amethodtotry:(uitextfield *)unitsrow withrow:(int)row andunits:(float)units {} you can call method follows:
[self amethodtotry:textfield withrow:1 andunits:23.4f];
Comments
Post a Comment