【发布时间】:2016-03-10 12:47:42
【问题描述】:
当我按下按钮时,我想从数组中插入图像
func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCellWithReuseIdentifier("Cell", forIndexPath: indexPath)
cell.backgroundColor = UIColor.orangeColor()
return cell
}
func buttonCreateStickerPressed(sender: UIButton!){
let stickerName = "Sticker Number "+String(stickerDictionary.count+1)
let stickerNumber = stickerDictionary.count+1
makeSticker(stickerName, stickerNumber: stickerNumber)
// let count = stickerArray.count
}
【问题讨论】:
-
我想在按下按钮时从数组中插入图像
标签: ios swift uicollectionviewcell