使用 UIPickerView 中的数据将单元格添加到数组中?
我有一个包含三个组件的 UIPickerView,每个组件都有 NSIntegerMax 来表示数字。因此,我只需要从每个组件获取数据,并将其发送到另一个名为 CreationViewController 的 ViewController。我需要发送的三个对象是字符串,设置如下:
NSInteger supplyData = [supplypick selectedRowInComponent:0];
NSInteger mineralData = [supplypick selectedRowInComponent:1];
NSInteger vespeneData = [supplypick selectedRowInComponent:2];
因此,我想以该日志的格式添加每个单元格:
NSLog(@"%i %@ M:%i G:%i", supplyData, namer.text, mineralData, vespeneData);
我需要知道要放置什么...
NSMutableArray * array = [[NSMutableArray alloc] init];
[array addObject: ];
^^HERE^^
这一切都在一个函数中。请帮忙!谢谢!
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 selectedRowInComponent: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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)