Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
1.2.7 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
hqy2000 committed Dec 30, 2017
1 parent c5e9bfc commit 578c2e6
Show file tree
Hide file tree
Showing 13 changed files with 127 additions and 144 deletions.
4 changes: 2 additions & 2 deletions ContentExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.2.6</string>
<string>1.2.7</string>
<key>CFBundleVersion</key>
<string>12</string>
<string>2</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionAttributes</key>
Expand Down
25 changes: 7 additions & 18 deletions General/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
@objc var currentUnityController: UnityAppController?
var isUnityRunning = false
var application: UIApplication?
var enableAllOrientation = true

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
self.application = application
Expand Down Expand Up @@ -105,24 +106,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
// let _ = ThemeManager.init()
let interval = Date().timeIntervalSince1970 - time
if(isLaunched){
if(!isOn && interval >= 60){
if let controller = UIStoryboard(name: "Main", bundle: nil).instantiateInitialViewController() as? LaunchScreenViewController {
if let window = self.window, let rootViewController = window.rootViewController {
var currentController = rootViewController
while let presentedController = currentController.presentedViewController {
currentController = presentedController
}
if !((currentController as? UINavigationController)?.topViewController is QLPreviewController) {
currentController.present(controller, animated: true, completion: nil)
}
}
}
}
} else {
isLaunched = true
}
}


Expand Down Expand Up @@ -171,6 +154,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
isUnityRunning = false
}
}

func resetUnity() {
unity_init(CommandLine.argc, CommandLine.unsafeArgv)
currentUnityController = UnityAppController()
currentUnityController!.application(application!, didFinishLaunchingWithOptions: nil)
}
}


Expand Down
53 changes: 2 additions & 51 deletions General/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -606,24 +606,6 @@ Cache
</objects>
<point key="canvasLocation" x="3342" y="-2030"/>
</scene>
<!--View Controller-->
<scene sceneID="G2P-kv-GVE">
<objects>
<viewController id="S8n-2Z-KG4" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y4n-Xr-7FG"/>
<viewControllerLayoutGuide type="bottom" id="hDH-tY-qnQ"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8Ar-xF-J8z">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="hdI-fc-e4Z" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="4063" y="1637"/>
</scene>
<!--Game Center-->
<scene sceneID="lQ0-yY-Hkn">
<objects>
Expand Down Expand Up @@ -665,6 +647,7 @@ Cache
</tableView>
<connections>
<segue destination="Vo3-zz-cFm" kind="show" identifier="showGame" id="YHE-CF-zjO"/>
<segue destination="ZSo-9R-sah" kind="show" identifier="showUnity" id="kZB-8Z-ahe"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="GHC-c6-pbu" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand Down Expand Up @@ -962,7 +945,7 @@ Cache
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="t7f-9G-1M2" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="966" y="993"/>
<point key="canvasLocation" x="4831" y="1637"/>
</scene>
<!--Forum-->
<scene sceneID="XwF-my-10l">
Expand Down Expand Up @@ -1123,7 +1106,6 @@ Cache
<segue destination="RUS-bb-dSR" kind="unwind" identifier="exit" unwindAction="returnLoginWithSegue:" id="9Xs-Iy-D7T"/>
<segue destination="wxE-ot-QSB" kind="show" identifier="showSettings" id="f3I-r9-qrI"/>
<segue destination="8R8-dc-OIh" kind="show" identifier="showPhoto" id="bRx-9d-uGb"/>
<segue destination="ZSo-9R-sah" kind="show" identifier="showUnity" id="O8u-bJ-GGL"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iKQ-AZ-24W" userLabel="First Responder" sceneMemberID="firstResponder"/>
Expand Down Expand Up @@ -1301,37 +1283,6 @@ Cache
</objects>
<point key="canvasLocation" x="2614" y="1637"/>
</scene>
<!--View Controller-->
<scene sceneID="LxQ-nx-VwL">
<objects>
<viewController id="ZL2-aE-OCy" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Rqo-kh-Ucs"/>
<viewControllerLayoutGuide type="bottom" id="LVU-Bc-vbp"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="SA4-SF-KBo">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<progressView opaque="NO" contentMode="scaleToFill" verticalHuggingPriority="750" fixedFrame="YES" progress="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="e07-e1-8No">
<rect key="frame" x="42" y="323" width="247" height="2"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</progressView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="Loading" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ccd-o5-KIT">
<rect key="frame" x="106" y="123" width="121" height="97"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="35"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="i7G-1J-Mob" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3338" y="1637"/>
</scene>
<!--大学-->
<scene sceneID="dQu-Ew-f3Z">
<objects>
Expand Down
37 changes: 27 additions & 10 deletions General/GameCenterView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GameCenterViewController:UITableViewController{
var descriptions = [String]()
var urls = [String]()
var images = [String]()

var in_url:String? = nil


func loadFromLocal(){
Expand Down Expand Up @@ -49,16 +49,19 @@ class GameCenterViewController:UITableViewController{
Alamofire.request("https://api.nfls.io/game/list").responseJSON { response in
switch(response.result){
case .success(let json):

let info = ((json as! [String:AnyObject])["info"] as! [[String:Any]])
self.names.removeAll()
self.descriptions.removeAll()
self.urls.removeAll()
self.images.removeAll()
var index:Int? = nil
for detail in info {
self.names.append(detail["name"] as! String)
self.descriptions.append(detail["description"] as! String)
self.urls.append(detail["url"] as! String)
if self.urls.last == self.in_url {
index = self.names.count - 1
}
self.images.append(detail["icon"] as! String)
}
UserDefaults.standard.set(self.names, forKey: "game_names")
Expand All @@ -69,6 +72,13 @@ class GameCenterViewController:UITableViewController{
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0, execute: {
self.tableView.reloadData()
})
if let index = index {
if self.urls[index] == "unity" {
self.performSegue(withIdentifier: "showUnity", sender: index)
} else {
self.performSegue(withIdentifier: "showGame", sender: index)
}
}
break
default:
break
Expand Down Expand Up @@ -109,24 +119,31 @@ class GameCenterViewController:UITableViewController{
cell.detailTextLabel!.font = UIFont(name: "Helvetica", size: 14)
cell.imageView?.kf.setImage(with: URL(string: images[indexPath.row]), placeholder: nil, options: nil, progressBlock: nil, completionHandler: { (image, _, _, _) in
DispatchQueue.main.async {
cell.imageView?.image = image!.kf.resize(to: CGSize(width: 75, height: 75))
if let image = image {
cell.imageView?.image = image.kf.resize(to: CGSize(width: 75, height: 75))
}
}

})

return cell
}

override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
self.performSegue(withIdentifier: "showGame", sender: indexPath.row)
if urls[indexPath.row] == "unity" {
self.performSegue(withIdentifier: "showUnity", sender: indexPath.row)
} else {
self.performSegue(withIdentifier: "showGame", sender: indexPath.row)
}
}

override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
let index = sender as! Int
let dest = segue.destination as! GameViewController
dest.location = urls[index]
dest.name = names[index]
dest.id = index + 1
if segue.destination is GameViewController {
let index = sender as! Int
let dest = segue.destination as! GameViewController
dest.location = urls[index]
dest.name = names[index]
dest.id = index + 1
}
}
override func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 75
Expand Down
16 changes: 0 additions & 16 deletions General/InAppSettings.bundle/Authors.plist
Original file line number Diff line number Diff line change
Expand Up @@ -164,22 +164,6 @@
<key>Key</key>
<string></string>
</dict>
<dict>
<key>Type</key>
<string>PSGroupSpecifier</string>
<key>Title</key>
<string>Secret Zone</string>
<key>Key</key>
<string></string>
</dict>
<dict>
<key>Type</key>
<string>PSTextFieldSpecifier</string>
<key>Title</key>
<string></string>
<key>Key</key>
<string>app.code</string>
</dict>
</array>
</dict>
</plist>
8 changes: 0 additions & 8 deletions General/InAppSettings.bundle/Root.plist
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,6 @@
<key>File</key>
<string>Authors</string>
</dict>
<dict>
<key>Type</key>
<string>PSChildPaneSpecifier</string>
<key>Title</key>
<string>管理</string>
<key>File</key>
<string>Management</string>
</dict>
</array>
</dict>
</plist>
8 changes: 4 additions & 4 deletions General/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.2.6</string>
<string>1.2.7</string>
<key>CFBundleVersion</key>
<string>12</string>
<string>2</string>
<key>CodeNameCN</key>
<string>ドライクリーク</string>
<string>決別</string>
<key>CodeNameEN</key>
<string>Arroyo</string>
<string>Farewell</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
Expand Down
29 changes: 15 additions & 14 deletions General/NewsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class NewsViewController:UITableViewController,FrostedSidebarDelegate{
))

required init?(coder aDecoder: NSCoder) {
let images = ["resources","game","photo","alumni","ic","forum","wiki","media","weather"]
let images = ["resources","game"/*,"photo"*/,"alumni","ic","forum","wiki","media","weather"]
var barImages = [UIImage]()
for image in images{
barImages.append(UIImage(named: image+".png")!)
Expand All @@ -58,26 +58,24 @@ class NewsViewController:UITableViewController,FrostedSidebarDelegate{
self.performSegue(withIdentifier: "showGame", sender: self)
}
self.bar.actionForIndex[2] = {
self.performSegue(withIdentifier: "showPhoto", sender: self)
}
self.bar.actionForIndex[3] = {
self.performSegue(withIdentifier: "showAlumni", sender: self)
}
self.bar.actionForIndex[4] = {
self.bar.actionForIndex[3] = {
self.performSegue(withIdentifier: "showIC", sender: self)
}
self.bar.actionForIndex[5] = {
self.bar.actionForIndex[4] = {
self.performSegue(withIdentifier: "showForum", sender: self)
}
self.bar.actionForIndex[6] = {
self.bar.actionForIndex[5] = {
self.performSegue(withIdentifier: "showWiki", sender: self)
}
self.bar.actionForIndex[7] = {
self.bar.actionForIndex[6] = {
self.performSegue(withIdentifier: "showMedia", sender: self)
}
self.bar.actionForIndex[8] = {
self.bar.actionForIndex[7] = {
self.performSegue(withIdentifier: "showWeather", sender: self)
}
//self.bar.actionForIndex.removeValue(forKey: 2)

self.bar.delegate = self

Expand Down Expand Up @@ -106,7 +104,7 @@ class NewsViewController:UITableViewController,FrostedSidebarDelegate{
Alamofire.request("https://api.nfls.io/weather/ping")
checkStatus()
self.removeFile(filename: "", path: "temp")
let rightButton = UIBarButtonItem(title: nil, style: .plain, target: self, action: #selector(self.showUnity))
let rightButton = UIBarButtonItem(title: nil, style: .plain, target: self, action: #selector(self.settings))
rightButton.icon(from: .FontAwesome, code: "cog", ofSize: 20)
self.navigationItem.rightBarButtonItem = rightButton
let leftButton = UIBarButtonItem(title: nil, style: .plain, target: self, action: #selector(self.menu))
Expand All @@ -122,9 +120,7 @@ class NewsViewController:UITableViewController,FrostedSidebarDelegate{
view.addGestureRecognizer(swipeBack)

}
@objc func showUnity() {
self.performSegue(withIdentifier: "showUnity", sender: self)
}

@objc func refresh() {
loadNews()
debugPrint("refresh")
Expand Down Expand Up @@ -458,7 +454,7 @@ class NewsViewController:UITableViewController,FrostedSidebarDelegate{
self.performSegue(withIdentifier: "showWeather", sender: self)
break
case "game":
self.performSegue(withIdentifier: "showGame", sender: self)
self.performSegue(withIdentifier: "showGame", sender: in_url)
break
default:
if let url = realurl{
Expand Down Expand Up @@ -489,6 +485,11 @@ class NewsViewController:UITableViewController,FrostedSidebarDelegate{
if(sender as? String != nil){
dest.in_url = sender as! String
}
} else if (segue.identifier == "showGame") {
let dest = segue.destination as! GameCenterViewController
if(sender as? String != nil){
dest.in_url = sender as! String
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions General/ResourcesFiltringView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ class ResourcesFiltringViewController:UIViewController, UITableViewDataSource, U
response in
switch response.result{
case .success(let json):

self.files.removeAll()
let data = (json as! [String:AnyObject])["items"]! as! NSArray
for file in data{
var name = (file as! [String:Any])["href"] as! String
Expand Down Expand Up @@ -279,7 +279,7 @@ class ResourcesFiltringViewController:UIViewController, UITableViewDataSource, U
}
}
func checkForYear(){
if(!UserDefaults.standard.bool(forKey: "ettings.resources.rank")){
if(!UserDefaults.standard.bool(forKey: "settings.resources.rank")){
for file in files{
if(file.filename.contains("2016")){
files.reverse()
Expand Down
Loading

0 comments on commit 578c2e6

Please sign in to comment.