开发者

Add cell to an Array using data from a UIPickerView?

I have a UIPickerView with three components, and each component has NSIntegerMax for the numbers. So, I just need to get the data from each component, and send it to another ViewController called, CreationViewController. The three objects I need to send are strings, set up like so:

NSInteger supplyData = [supplypick sel开发者_StackOverflow社区ectedRowInComponent:0];
NSInteger mineralData = [supplypick selectedRowInComponent:1];
NSInteger vespeneData = [supplypick selectedRowInComponent:2];

So, I would like to add each cell in the format of this log:

  NSLog(@"%i  %@  M:%i  G:%i", supplyData, namer.text, mineralData, vespeneData);

All I need to know it what to put...

 NSMutableArray * array = [[NSMutableArray alloc] init];
 [array addObject:        ];
                  ^^HERE^^

This is all in one function. Please help! Thanks!


[array addObject:[NSString stringWithFormat:@"%i  %@  M:%i  G:%i", supplyData, namer.text, mineralData, vespeneData]];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜