jjzjj

ios - 在 uitableviewcell 中创建 UIlabel 的 Action

我正在我的应用程序中制作一个收件箱模块。首次加载时,有20条消息来自服务器。我希望在20条消息之后,将在UItableview单元格中创建一个名为“加载更多消息”的标签。单击该标签后,我想再次调用服务器。我曾尝试使用以下代码,但它不起作用。提前谢谢:(下面是我的cellForRowAtIndexPath和numberOfRowsInSection示例代码-(NSInteger)tableView:(UITableView*)tableViewnumberOfRowsInSection:(NSInteger)section{return[inboxmessagesarraycount]+

ios - UITableViewAutomaticDimension 不工作

我正在以编程方式为日历应用程序制作一个表格View,并且需要根据它们包含的文本调整我的表格View单元格的大小。我正在尝试使用自动布局,但由于某种原因我无法让它工作-(void)viewDidLoad{......//Setupthetableviewself.tableView.tableHeaderView=imageView;self.tableView.tableHeaderView.backgroundColor=[UIColorwhiteColor];self.tableView.delegate=self;self.tableView.dataSource=self;se

ios - MGSwipeTableCellDelegate : Not Working

这让我发疯。我已经实现了MGSwipeTableCell,当它分别向右和向左滑动时,它在左侧显示三个按钮,在右侧显示一个按钮。https://github.com/MortimerGoro/MGSwipeTableCell但是,当滑动后按下这些按钮时,我无法触发委托(delegate)方法。这是我的代码的摘录。detailviewcontroller.h@interfaceDetailViewController:UIViewControllerdetailviewcontroller.m-(UITableViewCell*)tableView:(UITableView*)tableV

ios - UITableView 滚动时数据消失?

我有一个UITableView,我在其中从服务器获取数据并将其显示在UITableViewCell中。但是数据在滚动时消失了。请帮忙。这是我的cellForRowAtIndexPath:--(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{staticNSString*cellIdentifier=@"CellIdentifier";CCCustomCell*cell=[tableViewdequeueReusableCellWithIdent

ios - UITableViewCell 中的多行 UILabel 在 iOS8 中使用 autoLayout 给出了错误的高度

我一直在阅读其他人的解决方案,我在这里找到了针对具有动态高度和多行标签的单元格的解决方案,但它们似乎都没有100%有效。Cell具有以下垂直约束:VerticalcellconstraintstableView配置为:self.tableView.estimatedRowHeight=100;self.tableView.rowHeight=UITableViewAutomaticDimension;在方法tableview:cellForRowAtIndexPath:中,我正在设置多行标签的preferredMaxLayoutWidth:JBLabelTableViewCell*ce

ios - 如何在 UITableView Cell 中以编程方式创建 n 个 UIButton?

我正在尝试创建一个带有n个按钮的UITableView,具体取决于后端JSON数据。我附上了一张图片,我知道如何在UITableViewCell上创建UIButton,但我不知道如何将它们正确放置在UITableViewCell中。UIButtonUITableViewCellUIButton*continuebtn=[[UIButtonalloc]initWithFrame:CGRectMake(10,100,view1.frame.size.width-20,40)];[continuebtnsetBackgroundColor:[UIColorgrayColor]];[conti

ios - 如何使用 SDWebImage

我有UITableViewCell并在此加载图像,所以我想图像加载异步并显示激活指示器。这次图像加载时间非常长,所有图像在图像显示在表格View后加载。很多时候图像无法加载并且用户UIInterface挂起。并且不要在应用程序中运行任何进程。我很累,我使用了一个SDWebImage库。请帮助如何可能,谢谢#import"UIImageView+WebCache.h"@interfacepictureViewController(){NSArray*picarray;NSArray*titlearray;NSArray*idarray;}@end@implementationpictur

ios - 在 UITableViewCell 中的 UITextView 中设置多个链接

我有一个表格View,它将在同一个单元格中显示多个地址以及一些其他信息。经过大量修改和谷歌搜索后,我得出结论,UITextView是检测链接的最佳/最简单方法。但是,我目前使用UITextView的方法没有检测链接,我不确定为什么。这里是:publicoverrideUITableViewCellGetCell(UITableViewtableView,NSIndexPathindexPath){UITableViewCellcell=tableView.DequeueReusableCell(Identifier);if(cell==null)cell=newUITableViewC

ios - 滚动tableview计数标签值是否改变?

-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath;{staticNSString*simpleTableIdentifier=@"PickAClassCell";cell=(PickAClassCell*)[tableViewdequeueReusableCellWithIdentifier:simpleTableIdentifier];if(cell==nil){NSArray*nib=[[NSBundlemainBundle]loadNi

ios - 从 CollectionView Cell 以编程方式执行 Segue

我目前在CollectionView单元格中创建了一个CollectionView。CollectionView中的CollectionView。我无法在第二个ViewController内的didSelectItemAt上执行转场或呈现ViewController。现在,我尝试的所有操作都会导致崩溃或出现“View不在View层次结构中”错误。这里用一张图来说明:这是我的代码:CollectionView1:classExploreVC:UIViewController,UICollectionViewDataSource,UICollectionViewDelegate,UICol