ui tweaks

This commit is contained in:
Nihaal Sharma committed 2026-08-02 15:26:09 +05:30
1 parent 6a5879c845
commit d44a95f998
1 file changed
+23 -14
@@ -45,34 +45,43 @@ class StickerBrowserViewController: MSStickerBrowserViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
self.view.addSubview(labelStack)
labelStack.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
labelStack.centerXAnchor.constraint(equalTo: self.view.centerXAnchor),
labelStack.bottomAnchor.constraint(equalTo: self.view.safeAreaLayoutGuide.bottomAnchor)
])
labelTitle.font = UIFont.systemFont(ofSize: 16)
labelTitle.textAlignment = .center
labelSubTitle.font = UIFont.systemFont(ofSize: 14)
labelSubTitle.textAlignment = .center
labelStack.backgroundColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1).inverted.withAlphaComponent(0.75) labelStack.backgroundColor = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1).inverted.withAlphaComponent(0.75)
labelStack.layoutMargins = UIEdgeInsets(top: 5, left: 10, bottom: 5, right: 10) labelStack.layoutMargins = UIEdgeInsets(top: 5, left: 10, bottom: 5, right: 10)
labelStack.isLayoutMarginsRelativeArrangement = true labelStack.isLayoutMarginsRelativeArrangement = true
labelStack.layer.masksToBounds = true labelStack.layer.masksToBounds = true
labelStack.axis = .vertical labelStack.axis = .vertical
labelTitle.font = UIFont.systemFont(ofSize: 14)
labelTitle.textAlignment = .center
labelSubTitle.font = UIFont.systemFont(ofSize: 12)
labelSubTitle.textAlignment = .center
} }
override func viewDidLayoutSubviews() { override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews() super.viewDidLayoutSubviews()
setScrollbars() setScrollbars()
self.view.addSubview(labelStack)
labelStack.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
labelStack.centerXAnchor.constraint(equalTo: self.view.centerXAnchor),
labelStack.bottomAnchor.constraint(equalTo: self.view.bottomAnchor)
])
labelStack.insetsLayoutMarginsFromSafeArea = false
labelStack.layer.cornerCurve = .continuous
labelStack.layer.maskedCorners = [
.layerMinXMinYCorner,
.layerMaxXMinYCorner
]
labelStack.layer.cornerRadius = labelStack.frame.height/4
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
labelStack.layer.cornerRadius = labelStack.frame.height/4
} }
@objc func reload() { @objc func reload() {
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.