
[英]indexPath.row is wrong after reloading table view
我正在使用 indexPath.row 来检测数据源中的最后一个单元格。 数据源更改后,我使用tableView.reloadRows(at: [indexPath], with: .automatic)重新加载。 但是,执行此操作后,我得到的 indexPath.row 值不正确。 cellFo ...
[英]indexPath.row is wrong after reloading table view
我正在使用 indexPath.row 来检测数据源中的最后一个单元格。 数据源更改后,我使用tableView.reloadRows(at: [indexPath], with: .automatic)重新加载。 但是,执行此操作后,我得到的 indexPath.row 值不正确。 cellFo ...
[英]How to sum total the attendance of various age groups in third section of tableview using swift instead of implementing new controller?
这是迄今为止已实施的内容的图片。 目的:在表格视图中显示第三部分中年龄组的总出勤率。 我们应用的内容:尝试应用带有新变量的 label,该变量可以计算增减按钮 function 的单元格。 问题是什么:增加和减少按钮的点击仍然在表格视图的第三部分重复,我们只希望 label 显示该年龄组的出席总数 ...
[英]Swift table only show 1 column
我是 Xcode 的新手,在创建表格视图时遇到了一些问题。 问题:在 iOS 14 Plus 模拟器中,仅显示 1 列 - “Category”,而没有 header。整个列“Total”完全缺失。 但是,当我将模拟切换到 ipad 时,一切正常。 如果有人可以帮助解决此问题,我将不胜感激。 我希望 ...
[英]Style not perfect on scroller view in react native
代码: 应用程序.js 卡萨.js 这是完整的代码这是 output 我要我的 output 我正在尝试做,但风格并不完美。 如果活动索引点宽度与我上面给出的非活动索引不同,我想这样 output 当我尝试增加活动索引宽度但所有索引点宽度都增加时当我尝试减小宽度但所有索引宽度都减少时我该怎么做我的 ...
[英]UICollectionViewCell translatesAutoresizingMaskIntoConstraints property warning (iOS 16+, Xcode 14.2)
当从 tableViewController 显示完全无害的警报 controller 时,我收到一条奇怪的编译器消息: 消息内容如下:“不支持更改由 UICollectionView 管理的 UICollectionViewCell 的 translatesAutoresizingMaskInt ...
[英]Sending data to another view controller but every data i send is nil or empty
全部。 我在发送数据时遇到问题。 我尝试将数据从AgentDetailVC发送到AbilitiesDetailsVC 。 但我不能。 我尝试发送的每个数据都是零或空字符串。我已经设法在AgentListVC之前发送到AgentDetailsVC 。 你们都可以检查我的代码并帮助我吗? 万分感谢。 这 ...
[英]Get the uipickerview value from a .xib file
我是 Swift 的新手(不到一周)我创建了一个表格视图,其中有更多单元格,每个单元格都是从 a.xib 文件创建的,并且字段被填充,因为我创建了一个按顺序使用的对象数组填充单元格。 我有一个名为:MenuWeekViewControoler.swift 的文件,其中包含 tableView。 我有 ...
[英]How to make optional images in a UITableViewCell?
您好,我正在使用 UIkit 制作应用程序,但在尝试实现单元格布局时遇到问题。 我想要的是制作一个包含图像 header、一堆用户图像和 label 的单元格。我将这个单元格放在 UITableView 中。我遇到的问题是图像 header 是可选的,所以如果它不存在我需要它显示如下图所示的单元格 ...
[英]Customizing image in Custom TableView
我想在嵌套在自定义单元格内的图像中添加圆角半径,在自定义表格视图中使用 Xcode 中的 Swift。这是我的代码。 有谁知道如何申请.cornerRadius = 10 ? 我尝试在 table.delegate 下的override func viewDidLoad()部分添加table.del ...
[英]change height of TableViewHeader and included UILabel after button click
当我想通过按下按钮设置新的长状态时,我的 profileStatusLabel 高度和 TableViewHeader 高度也不会改变。 PS对不起我的英语,如果有一些错误 **ProfileHeaderView:UIView ** **MyCustomHeader: UITableView ...
[英]Status Circle in UITableViewCell not appearing | Swift
有人能告诉我为什么状态气泡没有出现吗? 据我所知,我已经宣布并激活了一切。 没有任何与状态气泡相关的内容出现。 注意:inspectionCell 已在 tableView 设置中正确注册。 注意:我并不是要指出图片中的特定项目……UIView 恰好在这些图片中被选中。 更新: 事实证明,不应 ...
[英]How to prevent data overlapping in UITableView after scrolling
在 UITableView 上发生任何滚动之前,我的数据正确显示。滚动后我看到数据重叠,据我所知,这是因为单元格被重用。 我现在理解了这个概念,但并没有真正理解我的解决方案需要什么或者如何/在何处实施(抱歉,我对 swift 还很陌生)。 我发现了为什么我的 UITableView 单元格在滚动时重 ...
[英]cellForRowAt (UITableViewDelegate) called and noticing indexing is wrong (Swift)
我正在从 Google Firestore 中单独获取建模的用户数据。 完全获取 1 个用户的数据后,将执行完成处理程序并将该用户添加到全局用户数组 (self.activeUsers),然后我在 UITableView (self.activeUsersTableView) 上调用 reload ...
[英]Why the property does not pass to another view Controller?
extension ReservationViewController: UITableViewDelegate { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { ...
[英]UITableViewCells deselecting themselves when UISearchController activated
我有一个带有可检查单元格的 UITableView。 这个功能很好用。 不幸的是,当我尝试使用我的 UISearchController 来过滤特定单元格时,任何被选中的单元格都会自行取消选中。 此外,如果我从我的 UISearchController 过滤的列表中搜索一个单元格和 select,当 ...
[英]Could not load NIB in bundle: 'NSBundle
我有一个我找不到解决方案的错误,所以我需要你的帮助。 我的 ViewController 中有 class MealsViewController,子类 UIViewController 和表视图。 然后我用图像的自定义单元格 xib 文件和 label 创建 class MealTableVie ...
[英]get selected button from all the cells
我是 swift 和 iOS 的新手。我被困在开发的一个阶段。 我希望你们中的任何一个。 问题是我有一个表格视图单元格,其中我有一个问题和两个带有是或没有标题的按钮。 最初两个按钮都不会被选中(白色背景)。 单击按钮后,应选择它(蓝色背景)。 此时应选择任何一个按钮。 我总共有 5 个这样的细胞。 ...
[英]UITableViewCell - distinguish full edit mode and delete row mode
我有UITableViewController并且在用户按下所需按钮后,我有“完全编辑”模式。 为了实现这一点,我称之为: 对于每个UITableViewCell ,我都override func setEditing(_ editing: Bool, animated: Bool)方法。 在这里, ...
[英]Problem with background in table when emulating Iphone Max Pro 12
我试图在不同的 Iphone 型号中模拟我的应用程序,但是当我使用 Max Pro 12 时我也遇到了同样的错误。任何时候我使用 tableViewContoller 似乎都没有完全填充背景单元格。 只需检查我的照片。 在 rest 的型号中,包括 Max Pro 11 它工作正常。 我没有任何约束 ...
[英]swift When I click on didselectRow I want to see the json data on the detail page image , title and year?
当我点击它时,我想在表格视图的单元格部分显示图片标题和年份部分,我该怎么做? 当我们点击行 go 详细信息页面和大图片,标题和年份时,我想显示大标题和年份。 如何填充 DetailViewController 页面? 视图控制器 MovieTableViewCell 细节视图控制器 ...