我在我的视图上有这个按钮,当我按下它时,我在表格视图中插入一个新的部分(我的逻辑状态在我的
-(NSInteger) numberOfSectionsInTableView:(UITableView*)tableView
{
if (slide==TRUE) return 2;
return 1;
}
Run Code Online (Sandbox Code Playgroud)
而且在我的-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath.我的部分是按照它应该添加的,但是我已经读过一些可以动画的地方,因为当我按下我的按钮时,该部分被添加但没有动画.我想我应该使用它,-(void)insertSections:(NSIndexSet*)sections withRowanimation(UITableViewRowAnimation) animation但我没有在网上找到一个合适的例子.