Files
SideStore/AltStore/TabBarController.swift
2019-09-19 14:43:26 -07:00

29 lines
719 B
Swift

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