diff --git a/CloudEmoticon2iOS.xcodeproj/project.xcworkspace/xcshareddata/CloudEmoticon2iOS.xccheckout b/CloudEmoticon2iOS.xcodeproj/project.xcworkspace/xcshareddata/CloudEmoticon2iOS.xccheckout
index 7f5cb6c..ce14d20 100644
--- a/CloudEmoticon2iOS.xcodeproj/project.xcworkspace/xcshareddata/CloudEmoticon2iOS.xccheckout
+++ b/CloudEmoticon2iOS.xcodeproj/project.xcworkspace/xcshareddata/CloudEmoticon2iOS.xccheckout
@@ -7,14 +7,14 @@
IDESourceControlProjectIdentifier
270F49D8-2546-471C-BECA-AC0F8289B12A
IDESourceControlProjectName
- project
+ CloudEmoticon2iOS
IDESourceControlProjectOriginsDictionary
B286D462F13F08B6F79FE367145C9A00DF281073
https://github.com/cxchope/CloudEmoticon2iOS.git
IDESourceControlProjectPath
- CloudEmoticon2iOS.xcodeproj/project.xcworkspace
+ CloudEmoticon2iOS.xcodeproj
IDESourceControlProjectRelativeInstallPathDictionary
B286D462F13F08B6F79FE367145C9A00DF281073
diff --git a/CloudEmoticon2iOS.xcodeproj/project.xcworkspace/xcuserdata/yashi.xcuserdatad/UserInterfaceState.xcuserstate b/CloudEmoticon2iOS.xcodeproj/project.xcworkspace/xcuserdata/yashi.xcuserdatad/UserInterfaceState.xcuserstate
index 5b223de..7850510 100644
Binary files a/CloudEmoticon2iOS.xcodeproj/project.xcworkspace/xcuserdata/yashi.xcuserdatad/UserInterfaceState.xcuserstate and b/CloudEmoticon2iOS.xcodeproj/project.xcworkspace/xcuserdata/yashi.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/CloudEmoticon2iOS/AppDelegate.swift b/CloudEmoticon2iOS/AppDelegate.swift
index 9b3778e..00d6527 100644
--- a/CloudEmoticon2iOS/AppDelegate.swift
+++ b/CloudEmoticon2iOS/AppDelegate.swift
@@ -17,6 +17,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var statBar: CustomStatusBar!
var netto:NetDownloadTo = NetDownloadTo.NONE
let filemgr:FileManager = FileManager()
+ var 应用运行参数:[NSObject : AnyObject]? = nil
func application(application: UIApplication, openURL url: NSURL, sourceApplication: String?, annotation: AnyObject?) -> Bool {
if (url.scheme == "emostart") {
@@ -44,8 +45,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
return false
}
- func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
-
+ func 应用初始化(launchOptions: [NSObject : AnyObject]?) {
// [Optional] Power your app with Local Datastore. For more info, go to
// https://parse.com/docs/ios_guide#localdatastore/iOS
Parse.enableLocalDatastore()
@@ -82,15 +82,38 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
NSNotificationCenter.defaultCenter().addObserver(self, selector: "loadwebdataokce:", name: "loaddataokce", object: nil)
lang.载入语言(lang.当前系统语言())
-// println(lang.系统支持的所有语言())
+ // println(lang.系统支持的所有语言())
let 当前语言包名称:String = lang.uage("语言包名称")
let 当前语言包作者:String = lang.uage("语言包作者")
NSLog("[AppDelegate]当前语言包名称:%@",当前语言包名称)
NSLog("[AppDelegate]当前语言包作者:%@",当前语言包作者)
+ }
+
+ func 界面初始化() {
+ self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
+ let IB:UIStoryboard = UIStoryboard(name: "Main", bundle: NSBundle.mainBundle())
+ self.window?.rootViewController = IB.instantiateInitialViewController() as? UIViewController
+ }
+
+ func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject : AnyObject]?) -> Bool {
+
+ 应用运行参数 = launchOptions
+ NSNotificationCenter.defaultCenter().addObserver(self, selector: "重新启动", name: "重新启动通知", object: nil)
+ 界面初始化()
+ 应用初始化(应用运行参数)
+ self.window?.makeKeyAndVisible()
return true
}
+ func 重新启动() {
+ self.window?.removeFromSuperview()
+ self.window = nil
+ 界面初始化()
+// 应用初始化(应用运行参数)
+ self.window?.makeKeyAndVisible()
+ }
+
func initSetting()
{
var defaults:NSUserDefaults = NSUserDefaults.standardUserDefaults()
diff --git a/CloudEmoticon2iOS/Info.plist b/CloudEmoticon2iOS/Info.plist
index 976452b..3a3dd94 100644
--- a/CloudEmoticon2iOS/Info.plist
+++ b/CloudEmoticon2iOS/Info.plist
@@ -40,8 +40,6 @@
1
LSRequiresIPhoneOS
- UIMainStoryboardFile
- Main
UIRequiredDeviceCapabilities
armv7
diff --git a/CloudEmoticon2iOS/Main.storyboard b/CloudEmoticon2iOS/Main.storyboard
index 2475429..385ca42 100644
--- a/CloudEmoticon2iOS/Main.storyboard
+++ b/CloudEmoticon2iOS/Main.storyboard
@@ -1,5 +1,5 @@
-
+
@@ -12,13 +12,16 @@
+
+
+
@@ -46,9 +49,11 @@
+
+
@@ -56,7 +61,9 @@
+
+
@@ -65,14 +72,17 @@
+
+
@@ -85,6 +95,7 @@
+
@@ -111,6 +122,7 @@
+
@@ -151,6 +163,7 @@
+
@@ -175,6 +188,7 @@
+
@@ -194,6 +208,7 @@
+
@@ -212,6 +227,7 @@
+
@@ -235,12 +251,14 @@
+
+
@@ -283,11 +302,13 @@
+
+
@@ -328,6 +349,7 @@
+
@@ -345,6 +368,7 @@
+
@@ -378,8 +402,10 @@
+
+
@@ -419,13 +445,16 @@
+
+
+
@@ -450,6 +479,7 @@
+
@@ -472,14 +502,17 @@
+
+
@@ -511,6 +544,7 @@
+
@@ -529,6 +563,7 @@
+
@@ -546,13 +581,16 @@
+
+
+
diff --git a/CloudEmoticon2iOS/UserTableHeaderView.swift b/CloudEmoticon2iOS/UserTableHeaderView.swift
index 98e1904..9a83af5 100644
--- a/CloudEmoticon2iOS/UserTableHeaderView.swift
+++ b/CloudEmoticon2iOS/UserTableHeaderView.swift
@@ -24,6 +24,7 @@ class UserTableHeaderView: UIView {
let 副标题:UILabel = UILabel()
let 背景图片:UIImageView = UIImageView()
var 默认前景色:UIColor? = nil
+ let 按钮:UIButton = UIButton.buttonWithType(UIButtonType.Custom) as! UIButton
func 载入内容() {
let 头像大小:CGFloat = 32
@@ -50,6 +51,9 @@ class UserTableHeaderView: UIView {
设置图标.frame = CGRectMake(self.frame.size.width - 边界距离 - 设置按钮大小, 边界距离, 设置按钮大小, 设置按钮大小)
self.addSubview(设置图标)
NSNotificationCenter.defaultCenter().addObserver(self, selector: "切换主题", name: "切换主题通知", object: nil)
+ 按钮.frame = 背景图片.frame
+ 按钮.addTarget(self, action: "点击", forControlEvents: UIControlEvents.TouchUpInside)
+ self.addSubview(按钮)
切换主题()
}
@@ -127,4 +131,13 @@ class UserTableHeaderView: UIView {
}
}
+ func 点击() {
+ let 用户已登录:Bool = false //此处还没写
+ if (用户已登录) {
+ let 用户登录菜单:UIAlertView = UIAlertView(title: "<用户名>", message: "", delegate: nil, cancelButtonTitle: "取消", otherButtonTitles: lang.uage("立即同步"),lang.uage("上传覆盖网络"),lang.uage("下载覆盖本地"),lang.uage("修改密码"),lang.uage("切换用户/登出")) //此处功能未确定暂不翻译
+ 用户登录菜单.show()
+ } else {
+ NSNotificationCenter.defaultCenter().postNotificationName("重新启动通知", object: nil)
+ }
+ }
}