腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(1645)
视频
沙龙
2
回答
Swift
DRY
collectionView
(_
cellForItemAt
)
调用
ios
、
uicollectionview
、
swift4
override func
collectionView
(_
collectionView
: UICollectionView,
cellForItemAt
indexPath: IndexPath)UICollectionViewCell { case .aCell: let cell =
collectionView
.dequeueReusableCellcell.data = somedat
浏览 7
提问于2018-02-28
得票数 0
2
回答
CollectionView
中的
Swift
2.3 IndexPath错误
ios
、
swift
你好,我对iOS和
swift
有些陌生。我最近切换到了
swift
2.3,现在我得到了这个错误对于此方法,有什么想法吗?
浏览 0
提问于2016-10-17
得票数 0
2
回答
在
Swift
中代理
调用
UICollectionView。能够将代理作为方法参数传递
swift
、
proxy
、
uicollectionview
、
duck-typing
代码: super.init(frame: .zero, collectionViewLayout: UICollectionViewFlowLayout()) } requ
浏览 0
提问于2018-04-16
得票数 0
2
回答
“无法
调用
非函数类型的值”
swift
、
jsqmessagesviewcontroller
但是,在将我的代码从
Swift
2转换到
Swift
3的过程中,我遇到了几个错误。我只修了一个超级烦人的。我发现了一个错误:
浏览 0
提问于2016-07-22
得票数 7
回答已采纳
4
回答
选择单元格时在UICollectionViewCell中切换图像
swift
、
uicollectionview
、
uicollectionviewcell
(do init and all that good stuff) 以及在集合视图中选择的项: let celld = (
collectionView
.dequeueReusableCellWithReuseIdentifierlet indexPaths =
collectionV
浏览 1
提问于2016-04-18
得票数 2
回答已采纳
1
回答
代码中的NSInternalInconsistencyException错误
ios
、
swift
、
uicollectionview
backgroundColor = UIColor.red } return 3} func <em
浏览 4
提问于2017-09-20
得票数 0
回答已采纳
4
回答
CollectionView
method
cellForItemAt
indexPath:未被
调用
(
Swift
)
ios
、
swift
、
xcode
、
uicollectionview
我已经使用了UICollectionViewController,并且我正尝试将图像添加到我的集合视图单元格中,但是没有
调用
UICollectionView方法。override func
collectionView
(_
collectionView
: UICollectionView,
cellForItemAt
indexPath: IndexPath)-> UICollectionViewCell { let cell =
collectionView
.dequeueReu
浏览 0
提问于2020-02-04
得票数 1
3
回答
UICollectionView不刷新
swift
、
uicollectionview
、
uicollectionviewcell
insertItemsAtIndexPaths([index])func
collectionView
(
collectionView
: UICollectionView, numberOfItemsInSectionsection: Int) -> Int {}func
collectionView
(
collectionView
: UICollectionView, cellForItemAtIndexPath ind
浏览 1
提问于2015-03-17
得票数 2
1
回答
向configureCell公开indexPath
xlpagertabstrip
目前,configureCell只能访问该单元和IndicatorInfo。在我的用例中,我想知道单元的indexPath,以便知道我正在配置哪个单元并相应地进行自定义。具体地说,我们希望第一个单元格(indexPath 0)显示与其他单元格略有不同。
浏览 6
提问于2018-03-09
得票数 1
1
回答
Swift
4中的UICollectionViewController未
调用
cellForItemAt
函数
ios
、
swift
、
uicollectionview
、
swift4
、
uicollectionviewdelegate
这看起来很简单,但我不能让它在
Swift
4中工作。_
collectionView
: UICollectionView,
cellForItemAt
indexPath: IndexPath) -> UICollectionViewCell {override func
collectionView
(_
collectionView
: UICollectionView, numberOfItemsInSection section: Int)indexPath: IndexPath) ->
浏览 9
提问于2018-08-19
得票数 2
回答已采纳
1
回答
将数据从ViewController传递到表单元格中的集合单元格
ios
、
swift3
这可能有点令人困惑,但我有一个视图控制器,它有一个包含自定义表单元格的表视图,在这个表单元格中,我有一个
collectionView
,每个单元格都保存一个图像。下面的委托函数是配置表单元格的地方:class OtherUserAccountViewController: UIViewControllerfunc
collectionView
(_
collectionView
: UICollectionView,
cellForItemAt<
浏览 0
提问于2017-01-14
得票数 2
回答已采纳
1
回答
UITableViewController中未显示
collectionView
ios
、
swift
、
uitableview
、
uicollectionview
、
swift5
我看过它的视频和代码,但显然它在
Swift
5中不再工作了,或者至少我不知道如何在
Swift
5中设置它。我做所有的事情都是编程的。这是我在viewDidLoad()中
调用
的函数,但它似乎不起作用: func configureCollectionView() { let layout = UICollectionViewFlowLayout= self
collectionView
.alwaysBounc
浏览 26
提问于2021-07-28
得票数 0
1
回答
无法在集合视图中创建单元格?
ios
、
iphone
、
swift
、
uitableview
、
uicollectionview
() { // Initialization code我还创建了一个CollectionCell.xib return view
浏览 2
提问于2017-02-10
得票数 2
回答已采纳
1
回答
cellForItemAt
没有
调用
collectionView
ios
、
swift
、
uicollectionview
、
autolayout
、
collectionview
运行应用程序时,
调用
numberOfItemsInSection,但不
调用
cellForItemAt
。所以没有细胞显示。我用约束做了什么错事吗?我还创建了项目override func viewDidLoad() { textField.inputViewwidth: UIScreen.main.bounds.width, height: 265))
浏览 5
提问于2017-10-20
得票数 1
回答已采纳
4
回答
当我在numberOfItemsInSection中返回1时,
Swift
中未
调用
cellForItemAt
ios
、
swift
、
uicollectionview
我是
Swift
的新手,我在集合视图方面遇到了问题。当我在numberOfItemsInSection中返回1时,
cellForItemAt
没有
调用
,但当我返回2时,它得到了
调用
。我不能理解这个问题。我的代码是这样的: return arrSelectedSchool
浏览 4
提问于2020-05-28
得票数 1
1
回答
如何在scrollView下
调用
collectionView
的
cellForItemAt
swift
、
storyboard
、
swift5
我的故事板有ScrollView和
CollectionView
。层次结构是这样的 View TextField Button
CollectionView</em
浏览 14
提问于2020-05-10
得票数 0
1
回答
UICollectionView/UITableView委托/数据源函数在Clean
Swift
中应该放在哪里[Bob叔叔的Clean Architecture]
ios
、
swift
、
design-patterns
、
architecture
、
clean-architecture
我最近将我的应用程序从MVC切换到了Clean
Swift
,我在决定将某些东西放入哪个类时遇到了麻烦。或者,某些函数,比如didSelectItemAt,应该放在Interactor中,因为它们处理输入;而其他函数,比如
cellForItemAt
,应该放在Presenter中,因为它们处理视图。在决定将某些功能放在Clean
Swift
中的什么位置时,您的决策过程是什么?目前,我的ViewController中有以下内容 { func
collectionView
(_
collectionView
浏览 14
提问于2020-01-31
得票数 1
回答已采纳
3
回答
如何将自定义collectionviewCell与XIB -
Swift
连接到重用标识符
ios
、
swift
、
xib
、
collectionview
、
reuseidentifier
这是我用来
调用
Xib视图的代码,但是我收到一个错误,告诉我我需要使用重用标识符。但是我不知道如何在使用XIB的时候使用它。func
collectionView
(_
collectionView
: UICollectionView,
cellForItemAt
indexPath: IndexPath) -> UICollectionViewCell终止应用程序,原因是:“从-dequeueReusableCellWithReuseIdentifier:forIndexPath:‘返回的单元格:不具有reuseIde
浏览 2
提问于2018-12-22
得票数 0
0
回答
未
调用
collectionView
cellForItemAt
ios
、
swift
、
xcode
、
uicollectionview
、
uicollectionviewcell
为什么没有
调用
collectionView
cellForItemAt
?我看到
调用
了我的
collectionView
numberOfItemsInSection方法和
collectionView
sizeForItemAt方法。在我的生命中,我不能让它加载
collectionView
。具体来说,我使用的是Xcode 9.4.1和
Swift
4.1。return card.imageUrls.count func <em
浏览 5
提问于2018-07-12
得票数 2
回答已采纳
1
回答
Swift
3 -不显示带有图像的单元格
ios
、
swift3
、
uiimageview
、
uicollectionview
、
uicollectionviewcell
imgview.contentMode = .scaleAspectFit return imgview override func
collectionView
(_
collectionView
: UICollectionView,
cellForItemAt
indexPath: IndexPath) -> UICollectionViewCell {let cell =
collectionView
.dequeueReusabl
浏览 5
提问于2017-08-07
得票数 0
回答已采纳
点击加载更多
热门
标签
更多标签
云服务器
对象存储
ICP备案
云点播
智聆口语评测
活动推荐
运营活动
广告
关闭
领券