草庐IT

Static-TableView-Cells

全部标签

ios: [tableView reloadData]

很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visitthehelpcenter.关闭10年前。[tableViewreloadData]会影响ios的性能吗?什么是[tableViewreloadData]?它是如何重新加载tableview的?还有其他方法可以重新加载tableview吗?我想在表格View的末尾添加一些行。我该怎么做?有什么区别[self.tableViewreloadData]和[self.tableViewbeginUpdates];[self.tableView

ios - 使用缓存的 UIView 设置 tableView 中的单元格背景 View :willDisplayCell:forRowAtIndexPath:

这是我设置自定义分组表格View单元格背景的解决方案:-(UIView*)top{if(_top){return_top;}_top=[[UIViewalloc]init];[_topsetBackgroundColor:[UIColorblueColor]];return_top;}//dotdotdot-(void)tableView:(UITableView*)tableViewwillDisplayCell:(UITableViewCell*)cellforRowAtIndexPath:(NSIndexPath*)indexPath{NSIntegersection=[inde

ios - TableView 和 iPhone X 上的主页指示器

我在一个项目中同时使用了UITableViewController和UITableView。UITableViewController中的UITableView覆盖了iPhoneX上的主页指示器。但是UIViewController中的UITableView不会覆盖iPhoneX上的主页指示器。我应该装一个吗?当我考虑安全区域时,哪一个是正确的?例如 最佳答案 您可以继续在标准UIViewController上使用UITableView。只需设置自动布局,使tableview的底部与superview的底部齐平(而不是边距)。然后将

iphone - 帮助在 TableView 中插入一个新部分

每个人都在写关于删除部分的文章。好吧,我似乎无法添加一个。目前,我正在尝试这样(失败并出现NSInternalInconsistencyException):UITableView*tv=(UITableView*)self.tableView;if([tvnumberOfSections]==1){[tvbeginUpdates];[tvinsertSections:[NSIndexSetindexSetWithIndex:0]withRowAnimation:UITableViewRowAnimationTop];NSLog(@"Inserted..Braceforimpact."

ios - [self.tableview reloadData];导致闪烁

问题是UI出现然后更新:产生闪烁效果。我希望UI仅在用户进入应用程序时更新一次,因此我在ViewDidLoad中重新加载了..这是代码..任何帮助如何消除这种闪烁......一些代码示例会有所帮助。-(void)viewDidLoad{[superviewDidLoad];self.myTableView.dataSource=self;self.myTableView.delegate=self;PFQuery*getCollectionInfo=[PFQueryqueryWithClassName:@"Collection"];//makequery[getCollectionIn

iphone - 在 Tableview 中创建搜索字段

我正在创建一个带有TableView的应用程序,其中包含大量数据。因此,我有必要使用搜索字段。有人知道如何在表格View中创建搜索选项吗? 最佳答案 使用UISearchBar属性,声明它使用searchBar=[[UISearchBaralloc]initWithFrame:CGRectMake(0,0,320,30)];并将其作为subview添加到UIViewController的View中。之后,在您的ViewController中使用搜索栏委托(delegate)方法:-(void)searchBarTextDidBegi

ios - 为什么 - (void)tableView :(UITableView *)tableView willDisplayHeaderView:(UIView *)view forSection:(NSInteger)section not called

-(void)tableView:(UITableView*)tableViewwillDisplayHeaderView:(UIView*)viewforSection:(NSInteger)section{[viewvChangeBackgroundToCyan];}之后[self.delegateForTableController.tvDelegatedinsertSections:[NSIndexSetindexSetWithIndex:ip.section]withRowAnimation:UITableViewRowAnimationRight];如何称呼他们?

ios - 在任何滚动或表格重新加载后,在 TableView 中使用计时器重新创建计时器

我正在使用https://github.com/mineschan/MZTimerLabel/在我的TableviewcellForRowAtIndex中使用如下计时器:UILabel*lblTimer=(UILabel*)[cellviewWithTag:10];MZTimerLabel*UpgradeTimer=[[MZTimerLabelalloc]initWithLabel:lblTimerandTimerType:MZTimerLabelTypeTimer];[UpgradeTimersetCountDownTime:timestamp];[UpgradeTimerstart

ios - 如何重新加载 tableview 的特定部分

我的TableView中有56个部分,我将当前选择的部分编号存储在名为“activeTimeSlot”的整数变量中。如何使用以下方法重新加载当前选中的部分。我是这样做的[self.tblViewreloadSections:[NSIndexSetindexSetWithIndex:activeTimeSlot]withRowAnimation:UITableViewRowAnimationAutomatic];但我观察到这样做是为所有部分调用TableView的以下数据源方法,即重新加载所有部分。-(NSInteger)tableView:(UITableView*)tableView

iOS在没有删除按钮的情况下重新排序 TableView 行

我必须重新排序UITableView行而不显示默认的红色减号按钮,因为我需要显示我的自定义图像并且我不需要从UITableView中删除单元格.即使表格未处于编辑模式,是否有重新排序行的方法? 最佳答案 您需要添加此委托(delegate)方法才能不显示删除按钮-(UITableViewCellEditingStyle)tableView:(UITableView*)tableVieweditingStyleForRowAtIndexPath:(NSIndexPath*)indexPath{returnUITableViewCell