diff --git a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackManager.swift b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackManager.swift index 8073a24..0a156db 100644 --- a/StickerSlack/SwiftUI/EmojiPacks/EmojiPackManager.swift +++ b/StickerSlack/SwiftUI/EmojiPacks/EmojiPackManager.swift @@ -30,8 +30,8 @@ struct EmojiPackManager: View { List(selection: $selection) { ForEach($hoarder.emojiPacks, id: \.self) { $pack in NavigationLink { -// EmojiPackDetailView(hoarder: hoarder, pack: $pack, useSwiftUIGrid: useSwiftUIGrid) - EmojiPackDetailViewRepresentable(hoarder: hoarder, pack: pack) + EmojiPackDetailView(hoarder: hoarder, pack: $pack, useSwiftUIGrid: useSwiftUIGrid) +// EmojiPackDetailViewRepresentable(hoarder: hoarder, pack: pack) } label: { Text(pack.name) } diff --git a/StickerSlack/UIKit/EmojiPacks/EmojiPackDetailViewController.swift b/StickerSlack/UIKit/EmojiPacks/EmojiPackDetailViewController.swift index a8c0b9a..d175f2a 100644 --- a/StickerSlack/UIKit/EmojiPacks/EmojiPackDetailViewController.swift +++ b/StickerSlack/UIKit/EmojiPacks/EmojiPackDetailViewController.swift @@ -66,10 +66,16 @@ class EmojiPackDetailViewController: UIViewController { } } - collectionView.toolbarItems = [shareButton, downloadButton] -// collectionView.toolbarItems = [editButton, adderSheetButton] + var shareButton2 = UIAction(title: "Share...", image: UIImage(systemName: "square.and.arrow.up")) { action in + print() + } + var downloadButton2 = UIAction(title: "Download", image: UIImage(systemName: "square.and.arrow.up")) { action in + print() + } + downloadButton2.image = UIImage(systemName: "arrow.down") + let x = UIBarButtonItem(title: "menu", image: UIImage(systemName: "ellipsis"), primaryAction: nil, menu: UIMenu(children: [shareButton2, downloadButton2])) - collectionView.navigationItem.rightBarButtonItems = [collectionView.editButtonItem] + collectionView.navigationItem.rightBarButtonItems = [collectionView.editButtonItem, x] NotificationCenter.default.addObserver( self,