草庐IT

automatic-uitableview-paging

全部标签

ios - Storyboard中的 UITableView 标题高度不会改变

我有一个使用UITableViewController的Storyboard。我添加了一个UIView作为UITableViewheader并将高度设置为200。但是,由于某种原因,当我预览它时,header很大!看起来大约540高(标题为白色):这是我的设置:它在Storyboard预览中看起来是正确的。是什么导致它如此之大并阻止我的高度设置工作? 最佳答案 Apple想通了。他们是这样说的:Becausetheframeofaviewcannotbecustomizedper-sizeclass,youneedtomakecha

objective-c - UITableView 像 Clear 应用程序一样重新排序

长按检测后如何开始移动?使用uilongpressgesturerecognizer长按检测。我的代码:`-(void)viewWillAppear:(BOOL)animated{[superviewWillAppear:animated];flMoveRow=NO;[selfsetEditing:YESanimated:YES];[listViewreloadData];}-(void)longTapGesture:(UILongPressGestureRecognizer*)sender{if((sender.state!=UIGestureRecognizerStateEnded

iphone - 带有图像的 UITableView 滚动非常缓慢

这个问题在这里已经有了答案:关闭10年前。PossibleDuplicate:TableViewwithImages,slowloadandscroll我有一个UITableView,它从服务器下载UITableViewCells的图像。我观察到tableView滚动非常缓慢。我以为这可能是下载问题,但我发现下载完成后表格仍然滚动缓慢并且图像图标尺寸变小了。我搜索了Google但找不到任何帮助。-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath

ios - 什么时候是tableView :numberOfRowsInSection: called in UITableView?

tableView:numberOfRowsInSection被发送到UITableView的委托(delegate),以找出在给定部分中需要有多少行。我的问题是,该方法何时以及多久被调用一次? 最佳答案 该方法在第一次加载tableview时被调用,如果您对委托(delegate)更感兴趣,则放置一个断点并检查何时何地调用哪个委托(delegate)以及调用了多少次。 关于ios-什么时候是tableView:numberOfRowsInSection:calledinUITableV

iphone - UITableView didSelectRowAtIndexPath : Not Working

当我选择表格行时,没有任何反应。它没有转到ContentController,当我想将它链接到resultLabel时,我找不到我在ContentController.h上声明的UILabel。-(void)tableView:(UITableView*)tableViewdidSelectRowAtIndexPath:(NSIndexPath*)indexPath{ContentController*detailview=[[ContentControlleralloc]initWithNibName:@"ContentController"bundle:nil];detailvie

ipad - UITableView 不响应滚动和触摸

我创建了一个自定义UIView,并在该UIView中添加了一个UITableView,如下所示:treeView=[[UITableViewalloc]initWithFrame:CGRectMake(0,80,slider.frame.size.width,slider.frame.size.height-80)];[treeViewsetDelegate:self];[treeViewsetDataSource:self];[selfaddSubview:treeView];[treeViewrelease];当应用程序加载时,表格似乎加载正常。但是,当我尝试滚动表格时,它根本不响

iphone - iOS 中 UITableView 的 UISearchDisplayController 框架

我有一个UITable,它有一个UISearchDisplayController。UITable小于屏幕宽度(居中宽度为280像素)。当我点击搜索栏时,UISearchDisplayController表格一直位于屏幕左侧。即使更改UISearchDisplayController的表格框架,我仍然得到相同的定位。我在这里设置了框架:-(void)searchDisplayController:(UISearchDisplayController*)controllerdidLoadSearchResultsTableView:(UITableView*)tableView{tabl

ios - 如何将 UITableViewCell 对齐到 UITableView 的底部?

当您使用insertRowsAtIndexPaths:withRowAnimation:插入第一个UITableViewCell时,它通常出现在UITableView的顶部。在Periscopeapp,相反的情况发生-第一个插入的单元格底部对齐。随着新单元格被插入,旧单元格在表格中向上移动。这是如何实现的? 最佳答案 如果您对我在PeriscopeiOS应用程序中的实现方式感兴趣,它实际上非常简单...长话短说;添加一个高度等于表格View框架高度的透明表格标题标题View。然后,当您向表格中添加单元格时,只需为表格View的内容偏

objective-c - UITableView 字幕没有出现

我有这个简单的代码:-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{staticNSString*CellIdentifier=@"Cell";UITableViewCell*cell=[tableViewdequeueReusableCellWithIdentifier:CellIdentifier];if(cell==nil){cell=[[[UITableViewCellalloc]initWithStyle:UITableViewC

ios - 如何将项目添加到 UITableView?

我正在尝试使用按钮将项目添加到UITableView,这是我的代码:在viewDidLoad中:repository=[[NSMutableArrayalloc]initWithObjects:nil];//ADDITEMTOLIST[repositoryaddObject:repo];//repositoryisaNSMutableArrayNSIndexPath*indexPath=[NSIndexPathindexPathForRow:([repositorycount]-1)inSection:0];NSLog(@"Indexpathtoaddrow---->%ld",(lon