Sri*_*vas 0 iphone uitableview ios
我正在使用自定义单元格并在程序上添加tableview.我正在尝试在我的应用程序中实现滑动功能.当我尝试滑动时,不会调用tableview数据源方法.
tableview = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 460) style:UITableViewStylePlain];
tableview.delegate=self;
tableview.dataSource=self;
tableview.backgroundColor=[UIColor clearColor];
tableview.backgroundColor=selectedBackGroundColor;
tableview.separatorColor = [UIColor clearColor];
tableview.editing=YES;
NSLog(@"%f %f",self.view.frame.size.width,self.view.frame.size.height);
[self.view addSubview:tableview];
Run Code Online (Sandbox Code Playgroud)
这个方法正在调用
-(UITableViewCellEditingStyle)tableView:(UITableView*)tableView editingStyleForRowAtIndexPath:(NSIndexPath*)indexPath
{
return UITableViewCellEditingStyleDelete;
}
Run Code Online (Sandbox Code Playgroud)
之后甚至单元格也没有选择...我错过任何代码请帮帮我吗?
-(void)layoutSubviews
{
[super layoutSubviews];
}
Run Code Online (Sandbox Code Playgroud)
然后它工作得很好.....谢谢你回答我的问题
| 归档时间: |
|
| 查看次数: |
3364 次 |
| 最近记录: |