Help retrieving values from UIPicker


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

Popular posts from this blog

Has to be the funniest headline ive ever seen

Man Brings Goat to Apple Store and has Pizza Delivered

Elusive Ninja: The Shadowy Thief - Can you survive the fast-paced ninja chaos?