Files
SideStore/AltStore/TabBarController.swift

29 lines
719 B
Swift
Raw Normal View History

//
// 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
}
}