【发布时间】:2011-07-26 16:58:00
【问题描述】:
我想在 Button 的单击事件的表格中添加一行。为此,我使用以下代码。但它不起作用。
-(void)translation:(id)sender
{
[self tableView:mainTableView numberOfRowsInSection:1];
i+1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
// Return the number of rows in the section.
return i;
}
其中 i 是一个全局变量,它在 viewdidload 函数中初始化为 1; 提前感谢任何类型的建议。谢谢
【问题讨论】:
标签: iphone ipad uitableview