hi,
i'm using uipicker, has 2 component , i'm having problem adding 2 values component together.
codes here:
code:
- (void)pickerview:(uipickerview *)pickerview didselectrow:(nsinteger)row incomponent:(nsinteger)component { for (int =0; <2; i++) { double tenth = [arrayno objectatindex:[pickerview selectedrowincomponent:0]]; } double oneth = [array2 objectatindex:[pickerview selectedrowincomponent:1]]; double result = [ double oneth + (double tenth * 10) ]; }
and have displayed result out on label called testlabel.
1) please wrap code in [ code ] [ /code ] (without spaces) tags.
2) arrayno? can assume it's nsarray (given using objectatindex? if cannot ever return double: can return object.
Forums iPhone, iPad, and iPod Touch iOS Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
Comments
Post a Comment