mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-15 01:33:25 +01:00
Supports deep linking to Patreon settings
This commit is contained in:
28
AltStore/TabBarController.swift
Normal file
28
AltStore/TabBarController.swift
Normal file
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// TabBarController.swift
|
||||
// AltStore
|
||||
//
|
||||
// Created by Riley Testut on 9/19/19.
|
||||
// Copyright © 2019 Riley Testut. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class TabBarController: UITabBarController
|
||||
{
|
||||
required init?(coder aDecoder: NSCoder)
|
||||
{
|
||||
super.init(coder: aDecoder)
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(TabBarController.openPatreonSettings(_:)), name: AppDelegate.openPatreonSettingsDeepLinkNotification, object: nil)
|
||||
}
|
||||
}
|
||||
|
||||
private extension TabBarController
|
||||
{
|
||||
@objc func openPatreonSettings(_ notification: Notification)
|
||||
{
|
||||
guard let items = self.tabBar.items else { return }
|
||||
self.selectedIndex = items.count - 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user