fixed buttons yay

This commit is contained in:
neon443 committed 2026-04-30 09:55:06 +01:00
1 parent 53aa8fa0ed
commit 1cbe3d7506
4 files changed
+29 -25

No files matched your search

@@ -117,6 +117,24 @@ struct EmojiCollectionView: UIViewRepresentable {
case .full:
cell = collectionView.dequeueReusableCell(withReuseIdentifier: "full", for: indexPath) as! EmojiCollectionViewCell
(cell as! EmojiCollectionViewCell).setEdit(to: edit)
let button = UIButton(type: .custom)
button.setImage(UIImage(systemName: "minus.circle.fill"), for: .normal)
button.imageView?.contentMode = .scaleAspectFit
button.contentHorizontalAlignment = .fill
button.contentVerticalAlignment = .fill
button.addTarget(self, action: #selector(deleteTapped), for: .touchUpInside)
button.tintColor = .systemRed
button.clipsToBounds = false
button.translatesAutoresizingMaskIntoConstraints = false
collectionView.addSubview(button)
NSLayoutConstraint.activate([
button.topAnchor.constraint(equalTo: cell.topAnchor, constant: -12),
button.leadingAnchor.constraint(equalTo: cell.leadingAnchor, constant: -12),
button.heightAnchor.constraint(equalToConstant: 24),
button.widthAnchor.constraint(equalToConstant: 24)
])
}
guard !hoarder.trie.dict.isEmpty else { return cell }
@@ -124,10 +142,14 @@ struct EmojiCollectionView: UIViewRepresentable {
guard let emoji = hoarder.trie.dict[emojiName] else { return cell }
cell.configure(with: hoarder, emoji: emoji)
return cell
}
@objc
func deleteTapped() {
print(UUID())
}
func collectionView(
_ collectionView: UICollectionView,
layout collectionViewLayout: UICollectionViewLayout,
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.