source-code

This commit is contained in:
Thunder7yoshi
2020-06-09 23:38:02 +02:00
parent 3e3f9ab752
commit 06a8d21b98
346 changed files with 26230 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
//
// TabBarController.swift
// AltStore
//
// Created by Riley Testut on 9/19/19.
// Copyright © 2019 Riley Testut. All rights reserved.
//
import UIKit
extension TabBarController
{
private enum Tab: Int, CaseIterable
{
case news
case browse
case myApps
case settings
}
}
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)
NotificationCenter.default.addObserver(self, selector: #selector(TabBarController.importApp(_:)), name: AppDelegate.importAppDeepLinkNotification, object: nil)
}
}
private extension TabBarController
{
@objc func openPatreonSettings(_ notification: Notification)
{
self.selectedIndex = Tab.settings.rawValue
}
@objc func importApp(_ notification: Notification)
{
self.selectedIndex = Tab.myApps.rawValue
}
}