草庐IT

indexpath

全部标签

ios - 如何将相关的 TextField 文本数据发送到可折叠 TableView 中的函数?

我有这个可折叠的UITableView,其中每个表格部分的最后一个单元格中有一个UITextField和一个UIButton。我想将UITextField中的文本发送到由同一单元格中它旁边的UIButton调用的函数,但我对如何做到这一点。在此先感谢您的帮助!-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{staticNSString*CellIdentifier=@"Cell";UITableViewCell*cell=[_tableVi

ios - GPUImage 花时间应用过滤器

我正在研究GPUImage图书馆。我已设置特定过滤器将应用于Collectionview的didselectitematindexpath方法。这是我基于GPUImage库的第一个项目。我能够成功地在GPUImageview上应用过滤器,但是应用过滤器需要很多时间。请指导我,我怎样才能快速申请。这是我的代码,-(void)collectionView:(UICollectionView*)collectionViewdidSelectItemAtIndexPath:(NSIndexPath*)indexPath{[filterremoveAllTargets];if(indexPath

ios - 如何在给定 NSIndexPath* iOS 的情况下获取 UITableViewCell 的句柄

我有NSIndexPath*类型的indexPath,它是对tableView的引用,我想使用它们来获取相应单元格的句柄。我该怎么做? 最佳答案 UITableViewCell*cell=[tableViewcellForRowAtIndexPath:indexPath];但请注意,如果此时对应的行不可见(或者indexPath超出了表的范围),该方法将返回nil 关于ios-如何在给定NSIndexPath*iOS的情况下获取UITableViewCell的句柄,我们在StackOve

ios - 如何让 UIButton 只出现在最后一个单元格中?

我是ObjectiveC编程的新手,并且有一个带有自定义单元格的UITableView设置。我想这样做,以便用户可以触摸一个将添加另一个单元格的按钮,并且该按钮只会出现在最后一个单元格中。目前,它没有出现。这是我正在使用的代码。我在自定义单元格中创建了按钮,并使用“setHidden:YES”将其隐藏在单元格本身中。我正在尝试“setHidden:NO”使按钮出现在TableView代码中,但它不起作用。我想这可能与重新加载单元格有关,但我不确定我是否正朝着正确的方向前进。我将不胜感激任何帮助,谢谢。-(UITableViewCell*)tableView:(UITableView*)

ios - UITableView selected indexpath 值给错

团队,我有UITableView,其中包含50多个单元格。每个单元格的宽度为60。当我滚动到20个单元格时,然后点击任何单元格它给出单元格值上方的索引路径值而不是单击单元格值在CellForRowAtIndexPath内部-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{[[cellcheckButton]addTarget:selfaction:@selector(checkButtonAction:)forControlEvents:UI

ios - 如何将单元格添加到静态部分 UITableView?

我有点迷茫-(IBAction)addEmailField:(id)sender{NSIndexPath*indexPath=[NSIndexPathindexPathForRow:0inSection:0];UITableViewCell*Cell=[self.tableViewcellForRowAtIndexPath:indexPath];[self.tableViewbeginUpdates];[self.tableViewinsertRowsAtIndexPaths:indexPathwithRowAnimation:UITableViewRowAnimationRight]

ios - - (UITableViewCell *)tableView :(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath is not being called

所以这真的很奇怪......我有一个名为ListEventsViewController的ViewController在头文件中:@interfaceListEventsViewController:UIViewController@property(weak,nonatomic)IBOutletUITableView*eventsTable;@property(strong,nonatomic)NSArray*events;@end在实现中,我调用了以下几乎所有必需的函数:-(NSInteger)tableView:(UITableView*)tableViewnumberOfRow

iphone - 将参数传递给选择器

我的自定义单元格中有一个UIButton,我想在用户按下该按钮时触发一个操作,但我需要知道从哪一行按下了UIButton。这是我的代码:-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{UITableViewCell*cell=[tableViewdequeueReusableCellWithIdentifier:@"Cell"];[selfconfigureCell:cellatIndexPath:indexPath];returncell

iOS - tableview 在向下滚动时禁用刷新

我正在制作一个简单的“添加到收藏夹”功能,它是一个UITableViewController。当用户选择一个单元格时,我将color设置为灰色并禁用selectionStyle-(void)tableView:(UITableView*)tableViewdidSelectRowAtIndexPath:(NSIndexPath*)indexPath{UITableViewCell*cell=[tableViewcellForRowAtIndexPath:indexPath];cell.textLabel.textColor=[UIColorgrayColor];cell.selecti

ios - 通过 Apple 的 ToDoList 应用程序教程,点击项目不会正确添加 "completed"复选标记。

当我点击一个项目时,它似乎没有注册并在右侧添加复选标记。当我点击后续项目时,它会在我之前点击的项目旁边显示一个复选标记,但不会为我刚刚点击的项目显示一个复选标记,依此类推,始终会留下一个Action。XYZToDoListViewController.m:////XYZToDoListViewController.m//ToDoList////CreatedbyAndrewGhobrialon2/15/14.////#import"XYZToDoListViewController.h"#import"XYZToDoItem.h"@interfaceXYZToDoListViewCon