这个问题在这里已经有了答案:
Swift Editor Placeholder in source file
(3 个回答)
3年前关闭。
This happened to me please help me please,Thank you.
这里的代码:
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "MenuCollectionViewCell", for: IndexPath) as! MenuCollectionViewCell
return cell
}
image here
通过单击“这发生在我身上,请帮助我。谢谢”查看图像。
最佳答案
你需要这样写:
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "MenuCollectionViewCell", for: indexPath) as! MenuCollectionViewCell
return cell
}
关于ios - 源文件swift中的编辑器占位符,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53528323/