jjzjj

accessorytype

全部标签

ios - 在 UiTableViewCell 上设置时,DisclosureButton Indicator 或 Any kind of Accessory Type 似乎没有出现

这是我最近注意到的一件奇怪的事情。即使在使用以下代码设置accessoryType之后,我也看不到UITableViewCell的附件类型-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath{staticNSString*CellIdentifier=@"LocationCell";UITableViewCell*cell=[tableViewdequeueReusableCellWithIdentifier:CellIdentifier];if

ios - 使用 NSUserDefaults 保存静态 Tableview 单元格复选标记

**一般的iOS开发和编程新手。请耐心等待。我到处寻找我可以理解和实现的东西,这些东西可以让我保存和检索静态表格View单元格的复选标记。我试过:savingcheckmarkaccessoryvalueinnsuserdefaultsandthenretrevingthemhowtosavethestateinuserdefaultsofaccessorycheckmark-iphone和无数其他人。这可能是我缺乏知识导致的问题。我有一个带有静态单元格的表格View。根据Apple的说明,我已经实现了多选复选标记,如下所示:-(void)tableView:(UITableView*

ios - 使用自动布局模仿 UITableViewCellStyleValue1 accessoryType-detailTextLabel 间距?

当使用带有UITableViewCellStyleValue1的默认UITableViewCell时,detailTextLabel知道accessoryType。标签和单元格边缘之间的距离不同于标签和accessoryTypeView之间的距离。当我使用自定义UITableViewCell子类时,两个距离相等。这看起来不如默认实现好。解释起来有点费劲,截图如下:前两个单元格是带有UITableViewCellStyleValue1的默认UITableViewCell。单元格3和4是使用H:[label]-16-|约束设置的自定义单元格。单元格5和6是使用Trailing-0-Trai

iphone - 如何在 iphone 的 tableview 中找到 accessoryType 单击

我需要在accessoryType上做一些事情,在iphone的tableview中单击。如何找到accessoryType在iphone中的UITableView单击。p> 最佳答案 你需要定义单元格的accessoryType-(UITableViewCell*)tableView:(UITableView*)tableViewcellForRowAtIndexPath:(NSIndexPath*)indexPath像这样cell.accessoryType=UITableViewCellAccessoryDetailDiscl

ios - Swift 中静态 TableView 中特定单元格的披露指示符

我创建了一个静态TableView,我想添加或删除一个披露指示器,具体取决于我们是在咨询我们自己的帐户还是guest帐户。这就是我想要的:letindex=IndexPath(row:4,section:0)letcell=tableView.cellForRow(at:index)ifcurrentUser{cell.accessoryType=.none//cell.backgroundColor=UIColor.red}我尝试将其放入viewDidLoad函数中,但没有成功。我也尝试了cellForRowAtindexPath,结果相同。我该怎么做?

ios - Swift - 如何更改 accessoryType (disclosureIndicator) 的颜色?

我对单元格的accessoryType有疑问。我正在使用带有disclosureIndicator作为accessoryType的单元格,我想更改它的颜色,但我不能。有谁知道这是一个错误还是Apple强制我使用灰色?其实我可以改变其他accessoryType的颜色。我的代码是这样的:letcell=tableView.dequeueReusableCell(withIdentifier:"identifier",for:indexPath)as!customCellcell.tintColor=UIColor.redcell.accessoryType=.disclosureIndi

ios - 如何从 UITableView 中获取选定的行?

所以我写了这段代码,在我想选择的行旁边打了一个复选标记,因为我想选择多个行UITableViewCell*cell=[tableViewcellForRowAtIndexPath:path];if(cell.accessoryType==UITableViewCellAccessoryCheckmark){cell.accessoryType=UITableViewCellAccessoryNone;}else{cell.accessoryType=UITableViewCellAccessoryCheckmark;}但是当我使用这个方法时:NSArray*selectedIndexP

ios - 如何从 UITableView 中获取选定的行?

所以我写了这段代码,在我想选择的行旁边打了一个复选标记,因为我想选择多个行UITableViewCell*cell=[tableViewcellForRowAtIndexPath:path];if(cell.accessoryType==UITableViewCellAccessoryCheckmark){cell.accessoryType=UITableViewCellAccessoryNone;}else{cell.accessoryType=UITableViewCellAccessoryCheckmark;}但是当我使用这个方法时:NSArray*selectedIndexP

ios - 标准附件 View 可以位于 UITableViewCell 中的不同位置吗?

我希望我的配件位于与正常位置略有不同的位置。可能吗?此代码无效:cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;cell.accessoryView.frame=CGRectMake(5.0,5.0,5.0,5.0); 最佳答案 不,您不能移动辅助View所在的位置。作为替代方案,您可以添加如下所示的subview;[cell.contentViewaddSubview:aView];此外,通过将accessoryView属性设置为等于某个值,access

ios - 标准附件 View 可以位于 UITableViewCell 中的不同位置吗?

我希望我的配件位于与正常位置略有不同的位置。可能吗?此代码无效:cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;cell.accessoryView.frame=CGRectMake(5.0,5.0,5.0,5.0); 最佳答案 不,您不能移动辅助View所在的位置。作为替代方案,您可以添加如下所示的subview;[cell.contentViewaddSubview:aView];此外,通过将accessoryView属性设置为等于某个值,access