added sticker count to the corner

ps: finally got proof that ts project will work!!!!!
"The sticker browser presents the stickers provided by its dataSource property. The data source can dynamically change the list of stickers at runtime."
https://developer.apple.com/documentation/messages/msstickerbrowserview#:~:text=The%20data%20source%20can%20dynamically%20change%20the%20list%20of%20stickers%20at%20runtime.
This commit is contained in:
neon443
2025-10-20 13:19:07 +01:00
parent a3b28a4414
commit a10b7c37dd
4 changed files with 29 additions and 28 deletions

View File

@@ -9,7 +9,8 @@ import UIKit
import Messages
class MessagesViewController: MSMessagesAppViewController {
var hoard: EmojiHoarder = EmojiHoarder()
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
@@ -18,6 +19,13 @@ class MessagesViewController: MSMessagesAppViewController {
// MARK: - Conversation Handling
override func willBecomeActive(with conversation: MSConversation) {
print(hoard.emojis.count)
let l = UILabel()
l.frame = CGRect(x: 20, y: 20, width: 1000, height: 40)
l.textColor = .systemOrange
l.text = "\(hoard.emojis.count)"
view.addSubview(l)
view.bringSubviewToFront(l)
// Called when the extension is about to move from the inactive to active state.
// This will happen when the extension is about to present UI.