Browse Source

Change design of views & add Share Extension Data trans

HonorLee 8 years ago
parent
commit
2881fe6b03
40 changed files with 2383 additions and 115 deletions
  1. 1 1
      ShareSupport/Info.plist
  2. 21 3
      ShareSupport/ShareViewController.m
  3. 91 0
      TumblrDownloader.xcodeproj/project.pbxproj
  4. BIN
      TumblrDownloader.xcodeproj/project.xcworkspace/xcuserdata/HonorLee.xcuserdatad/UserInterfaceState.xcuserstate
  5. 108 0
      TumblrDownloader.xcodeproj/xcuserdata/HonorLee.xcuserdatad/xcschemes/ShareSupport.xcscheme
  6. 92 0
      TumblrDownloader.xcodeproj/xcuserdata/HonorLee.xcuserdatad/xcschemes/TumblrDownloader(Chinese).xcscheme
  7. 2 1
      TumblrDownloader.xcodeproj/xcuserdata/HonorLee.xcuserdatad/xcschemes/TumblrDownloader.xcscheme
  8. 5 0
      TumblrDownloader.xcodeproj/xcuserdata/HonorLee.xcuserdatad/xcschemes/xcschememanagement.plist
  9. BIN
      TumblrDownloader/.DS_Store
  10. 13 2
      TumblrDownloader/AppDelegate.m
  11. BIN
      TumblrDownloader/Assets.xcassets/tab_1.png
  12. BIN
      TumblrDownloader/Assets/.DS_Store
  13. BIN
      TumblrDownloader/Assets/Help_Text.png
  14. BIN
      TumblrDownloader/Assets/Help_Text@2x.png
  15. BIN
      TumblrDownloader/Assets/tab_download.png
  16. BIN
      TumblrDownloader/Assets/tab_download@2x.png
  17. BIN
      TumblrDownloader/Assets/tab_help.png
  18. BIN
      TumblrDownloader/Assets/tab_help@2x.png
  19. BIN
      TumblrDownloader/Assets/tab_libraries.png
  20. BIN
      TumblrDownloader/Assets/tab_libraries@2x.png
  21. BIN
      TumblrDownloader/Assets/tab_stored.png
  22. BIN
      TumblrDownloader/Assets/tab_stored@2x.png
  23. 133 102
      TumblrDownloader/Base.lproj/Main.storyboard
  24. 13 0
      TumblrDownloader/DownloadQueenViewController.h
  25. 37 0
      TumblrDownloader/DownloadQueenViewController.m
  26. 19 0
      TumblrDownloader/HelpViewController.h
  27. 87 0
      TumblrDownloader/HelpViewController.m
  28. 14 0
      TumblrDownloader/Helper.h
  29. 18 0
      TumblrDownloader/Helper.m
  30. 5 1
      TumblrDownloader/Info.plist
  31. 521 0
      TumblrDownloader/MBProgressHUD.h
  32. 1033 0
      TumblrDownloader/MBProgressHUD.m
  33. 13 0
      TumblrDownloader/StoredViewController.h
  34. 33 0
      TumblrDownloader/StoredViewController.m
  35. 13 0
      TumblrDownloader/TasksViewController.h
  36. 78 0
      TumblrDownloader/TasksViewController.m
  37. 1 1
      TumblrDownloader/ViewController.h
  38. 16 4
      TumblrDownloader/ViewController.m
  39. 8 0
      TumblrDownloader/en.lproj/Localizable.strings
  40. 8 0
      TumblrDownloader/zh-Hans.lproj/Localizable.strings

+ 1 - 1
ShareSupport/Info.plist

@@ -5,7 +5,7 @@
 	<key>CFBundleDevelopmentRegion</key>
 	<string>en</string>
 	<key>CFBundleDisplayName</key>
-	<string>ShareSupport</string>
+	<string>TumblrDownloader</string>
 	<key>CFBundleExecutable</key>
 	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>

+ 21 - 3
ShareSupport/ShareViewController.m

@@ -7,9 +7,9 @@
 //
 
 #import "ShareViewController.h"
-
+#import <MobileCoreServices/MobileCoreServices.h>
 @interface ShareViewController ()
-
+@property NSUserDefaults *userDefaults;
 @end
 
 @implementation ShareViewController
@@ -20,10 +20,28 @@
 }
 
 - (void)didSelectPost {
+   
     // This is called after the user selects Post. Do the upload of contentText and/or NSExtensionContext attachments.
+    _userDefaults = [[NSUserDefaults alloc]initWithSuiteName:@"group.honorlee.TumblrDownloader"];
+    [_userDefaults synchronize];
+    NSMutableArray *tmpData = [NSMutableArray arrayWithArray:(NSMutableArray *)[_userDefaults objectForKey:@"tasks"]];
+    NSLog(@"%lu",(unsigned long)[tmpData count]);
+//    NSArray *inputItems = self.extensionContext.inputItems;
+//    NSLog(@"%lu",(unsigned long)[inputItems count]);
+    NSExtensionItem *content = self.extensionContext.inputItems[0];
+    NSItemProvider *itemProvider = content.attachments.firstObject;
+    if([itemProvider hasItemConformingToTypeIdentifier:(NSString *)kUTTypeURL]){
+        [itemProvider loadItemForTypeIdentifier:(NSString *)kUTTypeURL options:nil completionHandler:^(NSURL *url,NSError *err) {
+            [tmpData addObject:url.absoluteString];
+            [_userDefaults setObject:tmpData forKey:@"tasks"];
+            [_userDefaults synchronize];
+        }];
+    }
     
-    // Inform the host that we're done, so it un-blocks its UI. Note: Alternatively you could call super's -didSelectPost, which will similarly complete the extension context.
     [self.extensionContext completeRequestReturningItems:@[] completionHandler:nil];
+//    NSString *type = (NSString *)
+    // Inform the host that we're done, so it un-blocks its UI. Note: Alternatively you could call super's -didSelectPost, which will similarly complete the extension context.
+    
 }
 
 - (NSArray *)configurationItems {

+ 91 - 0
TumblrDownloader.xcodeproj/project.pbxproj

@@ -18,6 +18,23 @@
 		D386B1241C46991400D7E0C5 /* ShareViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D386B1231C46991400D7E0C5 /* ShareViewController.m */; };
 		D386B1271C46991400D7E0C5 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D386B1251C46991400D7E0C5 /* MainInterface.storyboard */; };
 		D386B12B1C46991400D7E0C5 /* ShareSupport.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = D386B1201C46991400D7E0C5 /* ShareSupport.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
+		D386B14C1C4930B300D7E0C5 /* StoredViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D386B14B1C4930B300D7E0C5 /* StoredViewController.m */; };
+		D386B14F1C49357E00D7E0C5 /* Helper.m in Sources */ = {isa = PBXBuildFile; fileRef = D386B14E1C49357E00D7E0C5 /* Helper.m */; };
+		D386B1541C4B64DB00D7E0C5 /* HelpViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D386B1531C4B64DB00D7E0C5 /* HelpViewController.m */; };
+		D386B15E1C4B73EB00D7E0C5 /* tab_stored.png in Resources */ = {isa = PBXBuildFile; fileRef = D386B15C1C4B73EB00D7E0C5 /* tab_stored.png */; };
+		D386B15F1C4B73EB00D7E0C5 /* tab_stored@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D386B15D1C4B73EB00D7E0C5 /* tab_stored@2x.png */; };
+		D386B1621C4B861D00D7E0C5 /* tab_download.png in Resources */ = {isa = PBXBuildFile; fileRef = D386B1601C4B861D00D7E0C5 /* tab_download.png */; };
+		D386B1631C4B861D00D7E0C5 /* tab_download@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D386B1611C4B861D00D7E0C5 /* tab_download@2x.png */; };
+		D386B1681C4B871B00D7E0C5 /* tab_help.png in Resources */ = {isa = PBXBuildFile; fileRef = D386B1641C4B871B00D7E0C5 /* tab_help.png */; };
+		D386B1691C4B871B00D7E0C5 /* tab_help@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D386B1651C4B871B00D7E0C5 /* tab_help@2x.png */; };
+		D386B16A1C4B871B00D7E0C5 /* tab_libraries.png in Resources */ = {isa = PBXBuildFile; fileRef = D386B1661C4B871B00D7E0C5 /* tab_libraries.png */; };
+		D386B16B1C4B871B00D7E0C5 /* tab_libraries@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D386B1671C4B871B00D7E0C5 /* tab_libraries@2x.png */; };
+		D386B16E1C4B8A4E00D7E0C5 /* Help_Text.png in Resources */ = {isa = PBXBuildFile; fileRef = D386B16C1C4B8A4E00D7E0C5 /* Help_Text.png */; };
+		D386B16F1C4B8A4E00D7E0C5 /* Help_Text@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D386B16D1C4B8A4E00D7E0C5 /* Help_Text@2x.png */; };
+		D386B1721C4B954B00D7E0C5 /* MBProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = D386B1711C4B954B00D7E0C5 /* MBProgressHUD.m */; };
+		D386B1761C4BB08900D7E0C5 /* TasksViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D386B1751C4BB08900D7E0C5 /* TasksViewController.m */; };
+		D386B1791C4BD42500D7E0C5 /* DownloadQueenViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D386B1781C4BD42500D7E0C5 /* DownloadQueenViewController.m */; };
+		D386B17E1C4BEE8C00D7E0C5 /* MobileCoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D386B17D1C4BEE8C00D7E0C5 /* MobileCoreServices.framework */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -66,6 +83,29 @@
 		D386B1281C46991400D7E0C5 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		D386B1301C469FDB00D7E0C5 /* TumblrDownloader.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = TumblrDownloader.entitlements; sourceTree = "<group>"; };
 		D386B1311C46A0F900D7E0C5 /* ShareSupport.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = ShareSupport.entitlements; sourceTree = "<group>"; };
+		D386B14A1C4930B300D7E0C5 /* StoredViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StoredViewController.h; sourceTree = "<group>"; };
+		D386B14B1C4930B300D7E0C5 /* StoredViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StoredViewController.m; sourceTree = "<group>"; };
+		D386B14D1C49357E00D7E0C5 /* Helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Helper.h; sourceTree = "<group>"; };
+		D386B14E1C49357E00D7E0C5 /* Helper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Helper.m; sourceTree = "<group>"; };
+		D386B1521C4B64DB00D7E0C5 /* HelpViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HelpViewController.h; sourceTree = "<group>"; };
+		D386B1531C4B64DB00D7E0C5 /* HelpViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HelpViewController.m; sourceTree = "<group>"; };
+		D386B15C1C4B73EB00D7E0C5 /* tab_stored.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tab_stored.png; path = Assets/tab_stored.png; sourceTree = "<group>"; };
+		D386B15D1C4B73EB00D7E0C5 /* tab_stored@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "tab_stored@2x.png"; path = "Assets/tab_stored@2x.png"; sourceTree = "<group>"; };
+		D386B1601C4B861D00D7E0C5 /* tab_download.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tab_download.png; path = Assets/tab_download.png; sourceTree = "<group>"; };
+		D386B1611C4B861D00D7E0C5 /* tab_download@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "tab_download@2x.png"; path = "Assets/tab_download@2x.png"; sourceTree = "<group>"; };
+		D386B1641C4B871B00D7E0C5 /* tab_help.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tab_help.png; path = Assets/tab_help.png; sourceTree = "<group>"; };
+		D386B1651C4B871B00D7E0C5 /* tab_help@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "tab_help@2x.png"; path = "Assets/tab_help@2x.png"; sourceTree = "<group>"; };
+		D386B1661C4B871B00D7E0C5 /* tab_libraries.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = tab_libraries.png; path = Assets/tab_libraries.png; sourceTree = "<group>"; };
+		D386B1671C4B871B00D7E0C5 /* tab_libraries@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "tab_libraries@2x.png"; path = "Assets/tab_libraries@2x.png"; sourceTree = "<group>"; };
+		D386B16C1C4B8A4E00D7E0C5 /* Help_Text.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Help_Text.png; path = Assets/Help_Text.png; sourceTree = "<group>"; };
+		D386B16D1C4B8A4E00D7E0C5 /* Help_Text@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Help_Text@2x.png"; path = "Assets/Help_Text@2x.png"; sourceTree = "<group>"; };
+		D386B1701C4B954B00D7E0C5 /* MBProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MBProgressHUD.h; sourceTree = "<group>"; };
+		D386B1711C4B954B00D7E0C5 /* MBProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MBProgressHUD.m; sourceTree = "<group>"; };
+		D386B1741C4BB08900D7E0C5 /* TasksViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TasksViewController.h; sourceTree = "<group>"; };
+		D386B1751C4BB08900D7E0C5 /* TasksViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TasksViewController.m; sourceTree = "<group>"; };
+		D386B1771C4BD42500D7E0C5 /* DownloadQueenViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DownloadQueenViewController.h; sourceTree = "<group>"; };
+		D386B1781C4BD42500D7E0C5 /* DownloadQueenViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DownloadQueenViewController.m; sourceTree = "<group>"; };
+		D386B17D1C4BEE8C00D7E0C5 /* MobileCoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MobileCoreServices.framework; path = System/Library/Frameworks/MobileCoreServices.framework; sourceTree = SDKROOT; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
@@ -80,6 +120,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D386B17E1C4BEE8C00D7E0C5 /* MobileCoreServices.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -89,6 +130,7 @@
 		D36ACDB91C44D07E00B2C7CF = {
 			isa = PBXGroup;
 			children = (
+				D386B17D1C4BEE8C00D7E0C5 /* MobileCoreServices.framework */,
 				D36ACDC41C44D07E00B2C7CF /* TumblrDownloader */,
 				D386B1211C46991400D7E0C5 /* ShareSupport */,
 				D36ACDC31C44D07E00B2C7CF /* Products */,
@@ -107,6 +149,7 @@
 		D36ACDC41C44D07E00B2C7CF /* TumblrDownloader */ = {
 			isa = PBXGroup;
 			children = (
+				D386B15B1C4B73DA00D7E0C5 /* Assets */,
 				D386B1301C469FDB00D7E0C5 /* TumblrDownloader.entitlements */,
 				D36ACDC81C44D07E00B2C7CF /* AppDelegate.h */,
 				D36ACDC91C44D07E00B2C7CF /* AppDelegate.m */,
@@ -117,6 +160,14 @@
 				D36ACDD31C44D07E00B2C7CF /* LaunchScreen.storyboard */,
 				D36ACDD61C44D07E00B2C7CF /* Info.plist */,
 				D36ACDC51C44D07E00B2C7CF /* Supporting Files */,
+				D386B1771C4BD42500D7E0C5 /* DownloadQueenViewController.h */,
+				D386B1781C4BD42500D7E0C5 /* DownloadQueenViewController.m */,
+				D386B14A1C4930B300D7E0C5 /* StoredViewController.h */,
+				D386B14B1C4930B300D7E0C5 /* StoredViewController.m */,
+				D386B1741C4BB08900D7E0C5 /* TasksViewController.h */,
+				D386B1751C4BB08900D7E0C5 /* TasksViewController.m */,
+				D386B1521C4B64DB00D7E0C5 /* HelpViewController.h */,
+				D386B1531C4B64DB00D7E0C5 /* HelpViewController.m */,
 			);
 			path = TumblrDownloader;
 			sourceTree = "<group>";
@@ -127,7 +178,11 @@
 				D36ACDC61C44D07E00B2C7CF /* main.m */,
 				D3166D7A1C48F3F50003B6B8 /* Downloader.h */,
 				D3166D7B1C48F3F50003B6B8 /* Downloader.m */,
+				D386B1701C4B954B00D7E0C5 /* MBProgressHUD.h */,
+				D386B1711C4B954B00D7E0C5 /* MBProgressHUD.m */,
 				D3166D831C48F9C20003B6B8 /* Localizable.strings */,
+				D386B14D1C49357E00D7E0C5 /* Helper.h */,
+				D386B14E1C49357E00D7E0C5 /* Helper.m */,
 			);
 			name = "Supporting Files";
 			sourceTree = "<group>";
@@ -144,6 +199,23 @@
 			path = ShareSupport;
 			sourceTree = "<group>";
 		};
+		D386B15B1C4B73DA00D7E0C5 /* Assets */ = {
+			isa = PBXGroup;
+			children = (
+				D386B16C1C4B8A4E00D7E0C5 /* Help_Text.png */,
+				D386B16D1C4B8A4E00D7E0C5 /* Help_Text@2x.png */,
+				D386B1641C4B871B00D7E0C5 /* tab_help.png */,
+				D386B1651C4B871B00D7E0C5 /* tab_help@2x.png */,
+				D386B1661C4B871B00D7E0C5 /* tab_libraries.png */,
+				D386B1671C4B871B00D7E0C5 /* tab_libraries@2x.png */,
+				D386B1601C4B861D00D7E0C5 /* tab_download.png */,
+				D386B1611C4B861D00D7E0C5 /* tab_download@2x.png */,
+				D386B15C1C4B73EB00D7E0C5 /* tab_stored.png */,
+				D386B15D1C4B73EB00D7E0C5 /* tab_stored@2x.png */,
+			);
+			name = Assets;
+			sourceTree = "<group>";
+		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -189,6 +261,9 @@
 		D36ACDBA1C44D07E00B2C7CF /* Project object */ = {
 			isa = PBXProject;
 			attributes = {
+				KnownAssetTags = (
+					New,
+				);
 				LastUpgradeCheck = 0720;
 				ORGANIZATIONNAME = HonorLee;
 				TargetAttributes = {
@@ -240,10 +315,20 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				D386B16B1C4B871B00D7E0C5 /* tab_libraries@2x.png in Resources */,
 				D36ACDD51C44D07E00B2C7CF /* LaunchScreen.storyboard in Resources */,
+				D386B16E1C4B8A4E00D7E0C5 /* Help_Text.png in Resources */,
 				D3166D811C48F9C20003B6B8 /* Localizable.strings in Resources */,
 				D36ACDD21C44D07E00B2C7CF /* Assets.xcassets in Resources */,
+				D386B15E1C4B73EB00D7E0C5 /* tab_stored.png in Resources */,
 				D36ACDD01C44D07E00B2C7CF /* Main.storyboard in Resources */,
+				D386B1621C4B861D00D7E0C5 /* tab_download.png in Resources */,
+				D386B16F1C4B8A4E00D7E0C5 /* Help_Text@2x.png in Resources */,
+				D386B1681C4B871B00D7E0C5 /* tab_help.png in Resources */,
+				D386B16A1C4B871B00D7E0C5 /* tab_libraries.png in Resources */,
+				D386B1691C4B871B00D7E0C5 /* tab_help@2x.png in Resources */,
+				D386B1631C4B861D00D7E0C5 /* tab_download@2x.png in Resources */,
+				D386B15F1C4B73EB00D7E0C5 /* tab_stored@2x.png in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -263,9 +348,15 @@
 			buildActionMask = 2147483647;
 			files = (
 				D36ACDCD1C44D07E00B2C7CF /* ViewController.m in Sources */,
+				D386B14F1C49357E00D7E0C5 /* Helper.m in Sources */,
+				D386B14C1C4930B300D7E0C5 /* StoredViewController.m in Sources */,
 				D36ACDCA1C44D07E00B2C7CF /* AppDelegate.m in Sources */,
+				D386B1541C4B64DB00D7E0C5 /* HelpViewController.m in Sources */,
+				D386B1791C4BD42500D7E0C5 /* DownloadQueenViewController.m in Sources */,
 				D3166D7C1C48F3F50003B6B8 /* Downloader.m in Sources */,
 				D36ACDC71C44D07E00B2C7CF /* main.m in Sources */,
+				D386B1721C4B954B00D7E0C5 /* MBProgressHUD.m in Sources */,
+				D386B1761C4BB08900D7E0C5 /* TasksViewController.m in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

BIN
TumblrDownloader.xcodeproj/project.xcworkspace/xcuserdata/HonorLee.xcuserdatad/UserInterfaceState.xcuserstate


+ 108 - 0
TumblrDownloader.xcodeproj/xcuserdata/HonorLee.xcuserdatad/xcschemes/ShareSupport.xcscheme

@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0720"
+   wasCreatedForAppExtension = "YES"
+   version = "2.0">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "D386B11F1C46991400D7E0C5"
+               BuildableName = "ShareSupport.appex"
+               BlueprintName = "ShareSupport"
+               ReferencedContainer = "container:TumblrDownloader.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "D36ACDC11C44D07E00B2C7CF"
+               BuildableName = "TumblrDownloader.app"
+               BlueprintName = "TumblrDownloader"
+               ReferencedContainer = "container:TumblrDownloader.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "D386B11F1C46991400D7E0C5"
+            BuildableName = "ShareSupport.appex"
+            BlueprintName = "ShareSupport"
+            ReferencedContainer = "container:TumblrDownloader.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = ""
+      selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES"
+      launchAutomaticallySubstyle = "2">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "D36ACDC11C44D07E00B2C7CF"
+            BuildableName = "TumblrDownloader.app"
+            BlueprintName = "TumblrDownloader"
+            ReferencedContainer = "container:TumblrDownloader.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES"
+      launchAutomaticallySubstyle = "2">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "D36ACDC11C44D07E00B2C7CF"
+            BuildableName = "TumblrDownloader.app"
+            BlueprintName = "TumblrDownloader"
+            ReferencedContainer = "container:TumblrDownloader.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 92 - 0
TumblrDownloader.xcodeproj/xcuserdata/HonorLee.xcuserdatad/xcschemes/TumblrDownloader(Chinese).xcscheme

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "0720"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "D36ACDC11C44D07E00B2C7CF"
+               BuildableName = "TumblrDownloader.app"
+               BlueprintName = "TumblrDownloader"
+               ReferencedContainer = "container:TumblrDownloader.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "D36ACDC11C44D07E00B2C7CF"
+            BuildableName = "TumblrDownloader.app"
+            BlueprintName = "TumblrDownloader"
+            ReferencedContainer = "container:TumblrDownloader.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES"
+      language = "zh-Hans">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "D36ACDC11C44D07E00B2C7CF"
+            BuildableName = "TumblrDownloader.app"
+            BlueprintName = "TumblrDownloader"
+            ReferencedContainer = "container:TumblrDownloader.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+      <AdditionalOptions>
+      </AdditionalOptions>
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <BuildableProductRunnable
+         runnableDebuggingMode = "0">
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "D36ACDC11C44D07E00B2C7CF"
+            BuildableName = "TumblrDownloader.app"
+            BlueprintName = "TumblrDownloader"
+            ReferencedContainer = "container:TumblrDownloader.xcodeproj">
+         </BuildableReference>
+      </BuildableProductRunnable>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 2 - 1
TumblrDownloader.xcodeproj/xcuserdata/HonorLee.xcuserdatad/xcschemes/TumblrDownloader.xcscheme

@@ -50,7 +50,8 @@
       ignoresPersistentStateOnLaunch = "NO"
       debugDocumentVersioning = "YES"
       debugServiceExtension = "internal"
-      allowLocationSimulation = "YES">
+      allowLocationSimulation = "YES"
+      language = "en">
       <BuildableProductRunnable
          runnableDebuggingMode = "0">
          <BuildableReference

+ 5 - 0
TumblrDownloader.xcodeproj/xcuserdata/HonorLee.xcuserdatad/xcschemes/xcschememanagement.plist

@@ -5,6 +5,11 @@
 	<key>SchemeUserState</key>
 	<dict>
 		<key>ShareSupport.xcscheme</key>
+		<dict>
+			<key>orderHint</key>
+			<integer>2</integer>
+		</dict>
+		<key>TumblrDownloader(Chinese).xcscheme</key>
 		<dict>
 			<key>orderHint</key>
 			<integer>1</integer>

BIN
TumblrDownloader/.DS_Store


+ 13 - 2
TumblrDownloader/AppDelegate.m

@@ -7,7 +7,7 @@
 //
 
 #import "AppDelegate.h"
-
+#import "ViewController.h"
 @interface AppDelegate ()
 
 @end
@@ -17,7 +17,17 @@
 
 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
     // Override point for customization after application launch.
-    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
+//    [UIApplication sharedApplication].statusBarStyle = UIStatusBarStyleLightContent;
+    [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarMetrics:UIBarMetricsDefault];
+    [[UINavigationBar appearance] setShadowImage:[[UIImage alloc] init]];
+    
+    [[UITabBar appearance]setTintColor:[UIColor blackColor]];
+    [[UITabBar appearance]setBarTintColor:[UIColor whiteColor]];
+    [[UITabBar appearance]setShadowImage:[[UIImage alloc]init]];
+    [[UITabBar appearance] setBackgroundImage:[[UIImage alloc]init]];
+    [[UITabBarItem appearance]setTitlePositionAdjustment:UIOffsetMake(0.0, -5.0)];
+    [[UITabBarItem appearance]setTitlePositionAdjustment:UIOffsetMake(0.0, -5.0)];
+//    [UITabBar appearance]set
     return YES;
 }
 
@@ -33,6 +43,7 @@
 
 - (void)applicationWillEnterForeground:(UIApplication *)application {
     // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
+    
 }
 
 - (void)applicationDidBecomeActive:(UIApplication *)application {

BIN
TumblrDownloader/Assets.xcassets/tab_1.png


BIN
TumblrDownloader/Assets/.DS_Store


BIN
TumblrDownloader/Assets/Help_Text.png


BIN
TumblrDownloader/Assets/Help_Text@2x.png


BIN
TumblrDownloader/Assets/tab_download.png


BIN
TumblrDownloader/Assets/tab_download@2x.png


BIN
TumblrDownloader/Assets/tab_help.png


BIN
TumblrDownloader/Assets/tab_help@2x.png


BIN
TumblrDownloader/Assets/tab_libraries.png


BIN
TumblrDownloader/Assets/tab_libraries@2x.png


BIN
TumblrDownloader/Assets/tab_stored.png


BIN
TumblrDownloader/Assets/tab_stored@2x.png


+ 133 - 102
TumblrDownloader/Base.lproj/Main.storyboard

@@ -3,44 +3,56 @@
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
-        <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
     </dependencies>
     <scenes>
-        <!--待下载-->
+        <!--任务-->
         <scene sceneID="FFK-Lb-21b">
             <objects>
-                <viewController id="lRI-Iw-dTA" sceneMemberID="viewController">
+                <viewController id="lRI-Iw-dTA" customClass="TasksViewController" sceneMemberID="viewController">
                     <layoutGuides>
                         <viewControllerLayoutGuide type="top" id="q0G-bX-9dp"/>
                         <viewControllerLayoutGuide type="bottom" id="7rn-JY-4Jg"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="Lr6-Ec-rxp">
-                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="551"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
                             <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="DA9-pA-54O">
                                 <rect key="frame" x="0.0" y="64" width="600" height="487"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <prototypes>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="4y4-cp-ZPb">
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TaskCellStyle" textLabel="SwI-IC-cbA" style="IBUITableViewCellStyleDefault" id="4y4-cp-ZPb">
                                         <rect key="frame" x="0.0" y="28" width="600" height="44"/>
                                         <autoresizingMask key="autoresizingMask"/>
                                         <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4y4-cp-ZPb" id="xxK-hZ-vB4">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="44"/>
+                                            <rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <label opaque="NO" multipleTouchEnabled="YES" contentMode="left" text="Title" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="SwI-IC-cbA">
+                                                    <rect key="frame" x="15" y="0.0" width="570" height="43"/>
+                                                    <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                                    <color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
+                                                    <nil key="highlightedColor"/>
+                                                </label>
+                                            </subviews>
+                                        </tableViewCellContentView>
+                                    </tableViewCell>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="FkJ-Bj-VLX">
+                                        <rect key="frame" x="0.0" y="72" width="600" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="FkJ-Bj-VLX" id="fYq-6I-gKJ">
+                                            <rect key="frame" x="0.0" y="0.0" width="600" height="43"/>
                                             <autoresizingMask key="autoresizingMask"/>
                                         </tableViewCellContentView>
                                     </tableViewCell>
                                 </prototypes>
                             </tableView>
-                            <navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="vdl-3W-IOG">
+                            <navigationBar contentMode="scaleToFill" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vdl-3W-IOG">
                                 <rect key="frame" x="0.0" y="20" width="600" height="44"/>
-                                <color key="backgroundColor" red="0.0" green="0.75051394509145941" blue="1" alpha="1" colorSpace="calibratedRGB"/>
-                                <color key="barTintColor" red="0.0" green="0.75051394510000002" blue="1" alpha="1" colorSpace="calibratedRGB"/>
-                                <textAttributes key="titleTextAttributes">
-                                    <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                                </textAttributes>
+                                <color key="barTintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                 <items>
-                                    <navigationItem title="Title" id="gWa-wn-rsp"/>
+                                    <navigationItem title="任务" id="gWa-wn-rsp"/>
                                 </items>
                             </navigationBar>
                         </subviews>
@@ -55,136 +67,99 @@
                             <constraint firstItem="DA9-pA-54O" firstAttribute="leading" secondItem="Lr6-Ec-rxp" secondAttribute="leading" id="lYc-Bs-OuM"/>
                         </constraints>
                     </view>
-                    <tabBarItem key="tabBarItem" title="待下载" id="Uvb-Oj-AKd"/>
+                    <tabBarItem key="tabBarItem" title="任务" image="tab_libraries.png" id="Uvb-Oj-AKd"/>
+                    <connections>
+                        <outlet property="TaskTableView" destination="DA9-pA-54O" id="96O-lk-ESd"/>
+                    </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="fOe-7E-bWh" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
             <point key="canvasLocation" x="744" y="-111"/>
         </scene>
-        <!--已完成-->
-        <scene sceneID="bhf-u7-DQ8">
+        <!--已下载-->
+        <scene sceneID="iY4-kG-SLB">
             <objects>
-                <viewController id="2Qi-2r-owq" sceneMemberID="viewController">
+                <viewController id="KwW-wf-qCg" customClass="StoredViewController" sceneMemberID="viewController">
                     <layoutGuides>
-                        <viewControllerLayoutGuide type="top" id="z1Y-37-Q03"/>
-                        <viewControllerLayoutGuide type="bottom" id="EbL-sS-eXJ"/>
+                        <viewControllerLayoutGuide type="top" id="J9V-CO-LLe"/>
+                        <viewControllerLayoutGuide type="bottom" id="Wkg-yA-soM"/>
                     </layoutGuides>
-                    <view key="view" contentMode="scaleToFill" id="n4s-Xo-l55">
+                    <view key="view" contentMode="scaleToFill" id="prM-DW-Wd7">
                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="h7A-WB-6OY">
+                            <navigationBar contentMode="scaleToFill" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="kHa-Oz-TU4">
                                 <rect key="frame" x="0.0" y="20" width="600" height="44"/>
+                                <color key="barTintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                                 <items>
-                                    <navigationItem title="Title" id="VB3-Uk-rM5"/>
+                                    <navigationItem id="w8P-bn-jwE">
+                                        <nil key="title"/>
+                                        <segmentedControl key="titleView" opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" segmentControlStyle="bar" selectedSegmentIndex="0" id="owk-ve-bc0">
+                                            <rect key="frame" x="230" y="7" width="140" height="30"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+                                            <segments>
+                                                <segment title="视频"/>
+                                                <segment title="图片"/>
+                                            </segments>
+                                            <color key="tintColor" cocoaTouchSystemColor="viewFlipsideBackgroundColor"/>
+                                        </segmentedControl>
+                                        <barButtonItem key="rightBarButtonItem" title="Item" id="FU9-Yl-eGz"/>
+                                    </navigationItem>
                                 </items>
                             </navigationBar>
-                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="xix-k3-g5i">
-                                <rect key="frame" x="0.0" y="64" width="600" height="487"/>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="n88-dw-upa">
+                                <rect key="frame" x="187" y="328" width="240" height="128"/>
+                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                            </tableView>
+                            <tableView clipsSubviews="YES" contentMode="scaleToFill" fixedFrame="YES" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="OmZ-IJ-7QL">
+                                <rect key="frame" x="0.0" y="64" width="240" height="128"/>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                                <prototypes>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="QGD-jM-2Yy">
-                                        <rect key="frame" x="0.0" y="28" width="600" height="44"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="QGD-jM-2Yy" id="Wz3-v1-7OT">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="44"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                </prototypes>
                             </tableView>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
-                            <constraint firstItem="xix-k3-g5i" firstAttribute="top" secondItem="h7A-WB-6OY" secondAttribute="bottom" id="0CB-uX-qfT"/>
-                            <constraint firstAttribute="trailing" secondItem="xix-k3-g5i" secondAttribute="trailing" id="5W9-Vc-Ud5"/>
-                            <constraint firstItem="h7A-WB-6OY" firstAttribute="top" secondItem="z1Y-37-Q03" secondAttribute="bottom" id="9ml-Eq-kou"/>
-                            <constraint firstItem="xix-k3-g5i" firstAttribute="leading" secondItem="n4s-Xo-l55" secondAttribute="leading" id="U0q-EV-kUs"/>
-                            <constraint firstAttribute="trailing" secondItem="h7A-WB-6OY" secondAttribute="trailing" id="Wwg-1I-0cB"/>
-                            <constraint firstItem="EbL-sS-eXJ" firstAttribute="top" secondItem="xix-k3-g5i" secondAttribute="bottom" id="Z60-HN-8xD"/>
-                            <constraint firstItem="h7A-WB-6OY" firstAttribute="leading" secondItem="n4s-Xo-l55" secondAttribute="leading" id="dlm-Qt-7et"/>
-                            <constraint firstAttribute="trailing" secondItem="h7A-WB-6OY" secondAttribute="trailing" id="gzk-aV-5Wj"/>
-                            <constraint firstItem="h7A-WB-6OY" firstAttribute="leading" secondItem="n4s-Xo-l55" secondAttribute="leading" id="wV9-Md-8HS"/>
+                            <constraint firstItem="kHa-Oz-TU4" firstAttribute="top" secondItem="J9V-CO-LLe" secondAttribute="bottom" id="5bF-Fz-BLv"/>
+                            <constraint firstItem="kHa-Oz-TU4" firstAttribute="leading" secondItem="prM-DW-Wd7" secondAttribute="leading" id="Fym-Ph-LW4"/>
+                            <constraint firstAttribute="trailing" secondItem="kHa-Oz-TU4" secondAttribute="trailing" id="QMg-ZI-Bh7"/>
                         </constraints>
                     </view>
-                    <tabBarItem key="tabBarItem" title="已完成" id="l3s-Qp-SNw"/>
+                    <tabBarItem key="tabBarItem" tag="2" title="已下载" image="tab_stored.png" id="qrm-F7-CsG"/>
                     <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
                 </viewController>
-                <placeholder placeholderIdentifier="IBFirstResponder" id="5jp-WD-NXT" userLabel="First Responder" sceneMemberID="firstResponder"/>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="kiU-sc-akZ" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
-            <point key="canvasLocation" x="744" y="670"/>
+            <point key="canvasLocation" x="744" y="570"/>
         </scene>
-        <!--队列-->
+        <!--下载队列-->
         <scene sceneID="18H-WV-I8v">
             <objects>
-                <viewController id="ChQ-OW-gSd" sceneMemberID="viewController">
+                <viewController id="ChQ-OW-gSd" customClass="DownloadQueenViewController" sceneMemberID="viewController">
                     <layoutGuides>
                         <viewControllerLayoutGuide type="top" id="92E-q4-lFM"/>
                         <viewControllerLayoutGuide type="bottom" id="v3s-2H-iT2"/>
                     </layoutGuides>
                     <view key="view" contentMode="scaleToFill" id="HAj-gf-aZY">
-                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="551"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <navigationBar contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="22F-fe-0Lo">
+                            <navigationBar contentMode="scaleToFill" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="22F-fe-0Lo">
                                 <rect key="frame" x="0.0" y="20" width="600" height="44"/>
                                 <items>
-                                    <navigationItem title="Title" id="1bI-kf-fwy"/>
+                                    <navigationItem title="下载队列" id="1bI-kf-fwy"/>
                                 </items>
                             </navigationBar>
-                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="eXP-68-Xjx">
+                            <stackView opaque="NO" contentMode="scaleToFill" fixedFrame="YES" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="dWa-A4-DPo">
                                 <rect key="frame" x="0.0" y="64" width="600" height="487"/>
-                                <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                                <constraints>
-                                    <constraint firstAttribute="width" constant="240" id="xQh-CS-9Gq"/>
-                                </constraints>
-                                <prototypes>
-                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="mVg-fm-U3u">
-                                        <rect key="frame" x="0.0" y="28" width="600" height="44"/>
-                                        <autoresizingMask key="autoresizingMask"/>
-                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="mVg-fm-U3u" id="sVp-Fa-8AN">
-                                            <rect key="frame" x="0.0" y="0.0" width="600" height="44"/>
-                                            <autoresizingMask key="autoresizingMask"/>
-                                        </tableViewCellContentView>
-                                    </tableViewCell>
-                                </prototypes>
-                                <variation key="default">
-                                    <mask key="constraints">
-                                        <exclude reference="xQh-CS-9Gq"/>
-                                    </mask>
-                                </variation>
-                            </tableView>
+                            </stackView>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
-                            <constraint firstItem="eXP-68-Xjx" firstAttribute="leading" secondItem="HAj-gf-aZY" secondAttribute="leading" id="3W2-C7-61U"/>
-                            <constraint firstAttribute="trailing" secondItem="eXP-68-Xjx" secondAttribute="trailing" id="8JX-vD-a4S"/>
-                            <constraint firstItem="v3s-2H-iT2" firstAttribute="top" secondItem="eXP-68-Xjx" secondAttribute="bottom" id="9DZ-vu-4Vl"/>
                             <constraint firstAttribute="trailing" secondItem="22F-fe-0Lo" secondAttribute="trailing" id="CFd-zu-ipR"/>
-                            <constraint firstItem="eXP-68-Xjx" firstAttribute="leading" secondItem="HAj-gf-aZY" secondAttribute="leading" id="IFh-o2-15C"/>
-                            <constraint firstAttribute="trailing" secondItem="eXP-68-Xjx" secondAttribute="trailing" id="JHa-NS-XeH"/>
-                            <constraint firstItem="eXP-68-Xjx" firstAttribute="top" secondItem="22F-fe-0Lo" secondAttribute="bottom" id="SwK-Mi-WxL"/>
-                            <constraint firstItem="v3s-2H-iT2" firstAttribute="top" secondItem="eXP-68-Xjx" secondAttribute="bottom" id="YnF-rQ-dVs"/>
-                            <constraint firstItem="v3s-2H-iT2" firstAttribute="top" secondItem="eXP-68-Xjx" secondAttribute="bottom" constant="273" id="Z3h-6p-Oze"/>
-                            <constraint firstItem="eXP-68-Xjx" firstAttribute="top" secondItem="22F-fe-0Lo" secondAttribute="bottom" id="dfo-dY-ai3"/>
                             <constraint firstItem="22F-fe-0Lo" firstAttribute="top" secondItem="92E-q4-lFM" secondAttribute="bottom" id="grX-Uh-adu"/>
-                            <constraint firstItem="eXP-68-Xjx" firstAttribute="top" secondItem="22F-fe-0Lo" secondAttribute="bottom" constant="86" id="v4B-hK-2Ah"/>
                             <constraint firstItem="22F-fe-0Lo" firstAttribute="leading" secondItem="HAj-gf-aZY" secondAttribute="leading" id="wUV-uA-0hQ"/>
-                            <constraint firstItem="eXP-68-Xjx" firstAttribute="leading" secondItem="HAj-gf-aZY" secondAttribute="leadingMargin" constant="52" id="xrq-FQ-dNB"/>
                         </constraints>
-                        <variation key="default">
-                            <mask key="constraints">
-                                <exclude reference="8JX-vD-a4S"/>
-                                <exclude reference="IFh-o2-15C"/>
-                                <exclude reference="dfo-dY-ai3"/>
-                                <exclude reference="v4B-hK-2Ah"/>
-                                <exclude reference="xrq-FQ-dNB"/>
-                                <exclude reference="YnF-rQ-dVs"/>
-                                <exclude reference="Z3h-6p-Oze"/>
-                            </mask>
-                        </variation>
                     </view>
-                    <tabBarItem key="tabBarItem" title="队列中" id="hcI-f6-L65"/>
+                    <tabBarItem key="tabBarItem" title="下载队列" image="tab_download.png" id="hcI-f6-L65"/>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="Doc-qT-UvO" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
@@ -193,7 +168,7 @@
         <!--帮助-->
         <scene sceneID="wQx-7K-ql9">
             <objects>
-                <viewController id="uHM-on-S1a" sceneMemberID="viewController">
+                <viewController id="uHM-on-S1a" customClass="HelpViewController" sceneMemberID="viewController">
                     <layoutGuides>
                         <viewControllerLayoutGuide type="top" id="Uv5-Hg-of9"/>
                         <viewControllerLayoutGuide type="bottom" id="bKe-da-o5t"/>
@@ -202,18 +177,68 @@
                         <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
                         <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
                         <subviews>
-                            <view contentMode="scaleToFill" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="kno-Tp-DgL">
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kno-Tp-DgL">
                                 <rect key="frame" x="0.0" y="20" width="600" height="531"/>
+                                <subviews>
+                                    <textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" editable="NO" selectable="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4BM-RU-1aG">
+                                        <rect key="frame" x="20" y="41" width="560" height="391"/>
+                                        <accessibility key="accessibilityConfiguration">
+                                            <accessibilityTraits key="traits" staticText="YES"/>
+                                            <bool key="isElement" value="NO"/>
+                                        </accessibility>
+                                        <color key="textColor" red="0.98380684279999997" green="0.9814170069" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                                        <fontDescription key="fontDescription" name="HelveticaNeue" family="Helvetica Neue" pointSize="16"/>
+                                        <textInputTraits key="textInputTraits" autocapitalizationType="sentences" spellCheckingType="no" enablesReturnKeyAutomatically="YES"/>
+                                    </textView>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rkL-0Q-Vv4">
+                                        <rect key="frame" x="230" y="440" width="140" height="40"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="80" id="D1N-3O-7d0"/>
+                                            <constraint firstAttribute="width" constant="140" id="S9P-0i-p5M"/>
+                                            <constraint firstAttribute="width" constant="80" id="l5h-Bi-EQZ"/>
+                                        </constraints>
+                                        <state key="normal" title="Open Tumblr"/>
+                                        <variation key="default">
+                                            <mask key="constraints">
+                                                <exclude reference="D1N-3O-7d0"/>
+                                                <exclude reference="l5h-Bi-EQZ"/>
+                                            </mask>
+                                        </variation>
+                                        <connections>
+                                            <action selector="ButtonOnCancel:" destination="uHM-on-S1a" eventType="touchUpOutside" id="pBn-Bh-C0e"/>
+                                            <action selector="ButtonOnOff:" destination="uHM-on-S1a" eventType="touchUpInside" id="BP5-QV-vrn"/>
+                                            <action selector="ButtonOnPress:" destination="uHM-on-S1a" eventType="touchDown" id="o5g-ha-gb2"/>
+                                        </connections>
+                                    </button>
+                                </subviews>
                                 <color key="backgroundColor" red="0.0" green="0.74901960784313726" blue="1" alpha="1" colorSpace="calibratedRGB"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="4BM-RU-1aG" secondAttribute="bottom" constant="99" id="3MI-Op-HMS"/>
+                                    <constraint firstItem="4BM-RU-1aG" firstAttribute="leading" secondItem="kno-Tp-DgL" secondAttribute="leading" constant="20" id="GcG-lM-a1D"/>
+                                    <constraint firstAttribute="trailing" secondItem="4BM-RU-1aG" secondAttribute="trailing" constant="20" id="dgV-mV-0bP"/>
+                                    <constraint firstAttribute="bottom" secondItem="rkL-0Q-Vv4" secondAttribute="bottom" constant="51" id="nsj-HL-h6h"/>
+                                    <constraint firstItem="rkL-0Q-Vv4" firstAttribute="centerX" secondItem="kno-Tp-DgL" secondAttribute="centerX" id="ogt-Ye-6io"/>
+                                    <constraint firstItem="rkL-0Q-Vv4" firstAttribute="top" secondItem="4BM-RU-1aG" secondAttribute="bottom" constant="8" symbolic="YES" id="ohq-cs-H82"/>
+                                    <constraint firstItem="4BM-RU-1aG" firstAttribute="top" secondItem="kno-Tp-DgL" secondAttribute="top" constant="41" id="xCU-UX-0O3"/>
+                                </constraints>
                             </view>
                         </subviews>
                         <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                         <constraints>
-                            <constraint firstItem="bKe-da-o5t" firstAttribute="top" secondItem="kno-Tp-DgL" secondAttribute="bottom" constant="-1" id="mzc-Hr-ztt"/>
+                            <constraint firstItem="kno-Tp-DgL" firstAttribute="leading" secondItem="E8Q-U3-hAh" secondAttribute="leading" id="AGk-at-CEy"/>
+                            <constraint firstItem="bKe-da-o5t" firstAttribute="top" secondItem="kno-Tp-DgL" secondAttribute="bottom" id="K3c-pN-lsE"/>
+                            <constraint firstAttribute="trailing" secondItem="kno-Tp-DgL" secondAttribute="trailing" id="YJV-IL-iPB"/>
+                            <constraint firstAttribute="trailing" secondItem="kno-Tp-DgL" secondAttribute="trailing" id="b1K-Jx-Iba"/>
+                            <constraint firstItem="kno-Tp-DgL" firstAttribute="leading" secondItem="E8Q-U3-hAh" secondAttribute="leading" id="sP7-lV-tit"/>
+                            <constraint firstItem="kno-Tp-DgL" firstAttribute="top" secondItem="Uv5-Hg-of9" secondAttribute="bottom" id="wq9-sU-xld"/>
                         </constraints>
                     </view>
-                    <tabBarItem key="tabBarItem" title="帮助" id="lHx-Th-RK7"/>
+                    <tabBarItem key="tabBarItem" title="帮助" image="tab_help.png" id="lHx-Th-RK7"/>
                     <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
+                    <connections>
+                        <outlet property="HelpTextView" destination="4BM-RU-1aG" id="xTd-6p-LnI"/>
+                        <outlet property="JumpToTumblr" destination="rkL-0Q-Vv4" id="iTm-uH-Nn4"/>
+                    </connections>
                 </viewController>
                 <placeholder placeholderIdentifier="IBFirstResponder" id="AxE-YJ-0FY" userLabel="First Responder" sceneMemberID="firstResponder"/>
             </objects>
@@ -224,15 +249,15 @@
             <objects>
                 <tabBarController id="FsU-Vj-dMB" customClass="ViewController" sceneMemberID="viewController">
                     <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/>
-                    <tabBar key="tabBar" contentMode="scaleToFill" id="kql-wo-lwi">
+                    <tabBar key="tabBar" contentMode="scaleToFill" translucent="NO" id="kql-wo-lwi">
                         <rect key="frame" x="0.0" y="0.0" width="320" height="49"/>
                         <autoresizingMask key="autoresizingMask"/>
-                        <color key="selectedImageTintColor" red="1" green="0.99955752580000001" blue="0.98455774269999996" alpha="1" colorSpace="calibratedRGB"/>
+                        <color key="selectedImageTintColor" red="0.0" green="0.47843137250000001" blue="1" alpha="1" colorSpace="calibratedRGB"/>
                     </tabBar>
                     <connections>
                         <segue destination="ChQ-OW-gSd" kind="relationship" relationship="viewControllers" id="Hrc-Al-8KY"/>
                         <segue destination="lRI-Iw-dTA" kind="relationship" relationship="viewControllers" id="zuR-mL-s4n"/>
-                        <segue destination="2Qi-2r-owq" kind="relationship" relationship="viewControllers" id="kP5-B8-Rf0"/>
+                        <segue destination="KwW-wf-qCg" kind="relationship" relationship="viewControllers" id="fV7-Hr-yn4"/>
                         <segue destination="uHM-on-S1a" kind="relationship" relationship="viewControllers" id="iO9-od-1hL"/>
                     </connections>
                 </tabBarController>
@@ -241,5 +266,11 @@
             <point key="canvasLocation" x="-28" y="-111"/>
         </scene>
     </scenes>
+    <resources>
+        <image name="tab_download.png" width="14" height="17"/>
+        <image name="tab_help.png" width="20" height="20"/>
+        <image name="tab_libraries.png" width="20" height="20"/>
+        <image name="tab_stored.png" width="24" height="16"/>
+    </resources>
     <color key="tintColor" red="0.98380684279999997" green="0.9814170069" blue="1" alpha="1" colorSpace="calibratedRGB"/>
 </document>

+ 13 - 0
TumblrDownloader/DownloadQueenViewController.h

@@ -0,0 +1,13 @@
+//
+//  DownloadQueenViewController.h
+//  TumblrDownloader
+//
+//  Created by HonorLee on 16/1/17.
+//  Copyright © 2016年 HonorLee. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface DownloadQueenViewController : UIViewController
+
+@end

+ 37 - 0
TumblrDownloader/DownloadQueenViewController.m

@@ -0,0 +1,37 @@
+//
+//  DownloadQueenViewController.m
+//  TumblrDownloader
+//
+//  Created by HonorLee on 16/1/17.
+//  Copyright © 2016年 HonorLee. All rights reserved.
+//
+
+#import "DownloadQueenViewController.h"
+
+@interface DownloadQueenViewController ()
+
+@end
+
+@implementation DownloadQueenViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+@end

+ 19 - 0
TumblrDownloader/HelpViewController.h

@@ -0,0 +1,19 @@
+//
+//  HelpViewController.h
+//  TumblrDownloader
+//
+//  Created by HonorLee on 16/1/17.
+//  Copyright © 2016年 HonorLee. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+#import "MBProgressHUD.h"
+
+@interface HelpViewController : UIViewController
+@property (weak, nonatomic) IBOutlet UIButton *JumpToTumblr;
+- (IBAction)ButtonOnPress:(id)sender;
+- (IBAction)ButtonOnOff:(id)sender;
+- (IBAction)ButtonOnCancel:(id)sender;
+@property (strong, nonatomic) IBOutlet UITextView *HelpTextView;
+
+@end

+ 87 - 0
TumblrDownloader/HelpViewController.m

@@ -0,0 +1,87 @@
+//
+//  HelpViewController.m
+//  TumblrDownloader
+//
+//  Created by HonorLee on 16/1/17.
+//  Copyright © 2016年 HonorLee. All rights reserved.
+//
+
+#import "HelpViewController.h"
+#import "Helper.h"
+
+
+@interface HelpViewController ()
+
+@end
+
+@implementation HelpViewController
+MBProgressHUD *HUD;
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    _JumpToTumblr.layer.borderColor = [[UIColor whiteColor]CGColor];
+    _JumpToTumblr.layer.borderWidth = 1;
+    _JumpToTumblr.layer.cornerRadius = 5.0f;
+    [_JumpToTumblr setTitle:NSLocalizedString(@"OpenTumblrBtnText", nil) forState:UIControlStateNormal];
+//    _JumpToTumblr.titleLabel.text = NSLocalizedString(@"OpenTumblrBtnText", nil);
+    _HelpTextView.text = NSLocalizedString(@"HelpText", nil);
+    [_HelpTextView setTextColor:[UIColor whiteColor]];
+    [_HelpTextView setFont:[UIFont fontWithName:@"Helvetica Neue" size:16.0]];
+    
+    HUD = [[MBProgressHUD alloc] initWithView:self.view];
+    HUD.mode = MBProgressHUDModeText;
+    HUD.removeFromSuperViewOnHide = NO;
+    HUD.yOffset = self.view.frame.size.height/2-200;
+    [self.view addSubview:HUD];
+    
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+-(void)viewDidDisappear:(BOOL)animated{
+    [Helper changeStatusBarBackground:[UIColor whiteColor]];
+    [self.tabBarController.tabBar setBarTintColor:[UIColor whiteColor]];
+}
+-(void)viewDidAppear:(BOOL)animated{
+    [Helper changeStatusBarBackground:[UIColor colorWithRed:0 green:191/255.0 blue:1 alpha:1]];
+    [self.tabBarController.tabBar setBarTintColor:[UIColor colorWithRed:0 green:191/255.0 blue:1 alpha:1]];
+}
+/*
+#pragma mark - Navigation
+
+// In a storyboard-based application, you will often want to do a little preparation before navigation
+- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
+    // Get the new view controller using [segue destinationViewController].
+    // Pass the selected object to the new view controller.
+}
+*/
+
+- (IBAction)ButtonOnPress:(id)sender {
+    _JumpToTumblr.alpha = 0.5f;
+    
+}
+
+- (IBAction)ButtonOnOff:(id)sender {
+    _JumpToTumblr.alpha = 1.0f;
+    if ([[UIApplication sharedApplication]canOpenURL:[NSURL URLWithString:@"tumblr://"]]){
+        HUD.labelText = NSLocalizedString(@"OpenTumblrSuccess", nil);
+        [HUD show:YES];
+        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tumblr://"]];
+    }else{
+        HUD.labelText = NSLocalizedString(@"OpenTumblrError", nil);
+        [HUD show:YES];
+    }
+    dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, 2.0*NSEC_PER_SEC);
+    dispatch_after(popTime, dispatch_get_main_queue(), ^{
+        [HUD hide:YES];
+    });
+}
+
+- (IBAction)ButtonOnCancel:(id)sender {
+    _JumpToTumblr.alpha = 1.0f;
+}
+
+@end

+ 14 - 0
TumblrDownloader/Helper.h

@@ -0,0 +1,14 @@
+//
+//  Helper.h
+//  TumblrDownloader
+//
+//  Created by HonorLee on 16/1/15.
+//  Copyright © 2016年 HonorLee. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+
+@interface Helper : NSObject
++(void)changeStatusBarBackground:(UIColor *)color;
+@end

+ 18 - 0
TumblrDownloader/Helper.m

@@ -0,0 +1,18 @@
+//
+//  Helper.m
+//  TumblrDownloader
+//
+//  Created by HonorLee on 16/1/15.
+//  Copyright © 2016年 HonorLee. All rights reserved.
+//
+
+#import "Helper.h"
+
+@implementation Helper
+//Change StatusBar Background
++(void)changeStatusBarBackground:(UIColor *)color{
+    UIView *statusBar = [[[UIApplication sharedApplication]valueForKey:@"statusBarWindow"]valueForKey:@"statusBar"];
+    if([statusBar respondsToSelector:@selector(setBackgroundColor:)])
+        statusBar.backgroundColor = color;
+}
+@end

+ 5 - 1
TumblrDownloader/Info.plist

@@ -2,8 +2,12 @@
 <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
+	<key>LSApplicationQueriesSchemes</key>
+	<array>
+		<string>tumblr</string>
+	</array>
 	<key>UIViewControllerBasedStatusBarAppearance</key>
-	<false/>
+	<true/>
 	<key>CFBundleDevelopmentRegion</key>
 	<string>en</string>
 	<key>CFBundleExecutable</key>

+ 521 - 0
TumblrDownloader/MBProgressHUD.h

@@ -0,0 +1,521 @@
+//
+//  MBProgressHUD.h
+//  Version 0.9.2
+//  Created by Matej Bukovinski on 2.4.09.
+//
+
+// This code is distributed under the terms and conditions of the MIT license. 
+
+// Copyright (c) 2009-2015 Matej Bukovinski
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+#import <Foundation/Foundation.h>
+#import <UIKit/UIKit.h>
+#import <CoreGraphics/CoreGraphics.h>
+
+@protocol MBProgressHUDDelegate;
+
+
+typedef NS_ENUM(NSInteger, MBProgressHUDMode) {
+	/** Progress is shown using an UIActivityIndicatorView. This is the default. */
+	MBProgressHUDModeIndeterminate,
+	/** Progress is shown using a round, pie-chart like, progress view. */
+	MBProgressHUDModeDeterminate,
+	/** Progress is shown using a horizontal progress bar */
+	MBProgressHUDModeDeterminateHorizontalBar,
+	/** Progress is shown using a ring-shaped progress view. */
+	MBProgressHUDModeAnnularDeterminate,
+	/** Shows a custom view */
+	MBProgressHUDModeCustomView,
+	/** Shows only labels */
+	MBProgressHUDModeText
+};
+
+typedef NS_ENUM(NSInteger, MBProgressHUDAnimation) {
+	/** Opacity animation */
+	MBProgressHUDAnimationFade,
+	/** Opacity + scale animation */
+	MBProgressHUDAnimationZoom,
+	MBProgressHUDAnimationZoomOut = MBProgressHUDAnimationZoom,
+	MBProgressHUDAnimationZoomIn
+};
+
+
+#ifndef MB_INSTANCETYPE
+#if __has_feature(objc_instancetype)
+	#define MB_INSTANCETYPE instancetype
+#else
+	#define MB_INSTANCETYPE id
+#endif
+#endif
+
+#ifndef MB_STRONG
+#if __has_feature(objc_arc)
+	#define MB_STRONG strong
+#else
+	#define MB_STRONG retain
+#endif
+#endif
+
+#ifndef MB_WEAK
+#if __has_feature(objc_arc_weak)
+	#define MB_WEAK weak
+#elif __has_feature(objc_arc)
+	#define MB_WEAK unsafe_unretained
+#else
+	#define MB_WEAK assign
+#endif
+#endif
+
+#if NS_BLOCKS_AVAILABLE
+typedef void (^MBProgressHUDCompletionBlock)();
+#endif
+
+
+/** 
+ * Displays a simple HUD window containing a progress indicator and two optional labels for short messages.
+ *
+ * This is a simple drop-in class for displaying a progress HUD view similar to Apple's private UIProgressHUD class.
+ * The MBProgressHUD window spans over the entire space given to it by the initWithFrame constructor and catches all
+ * user input on this region, thereby preventing the user operations on components below the view. The HUD itself is
+ * drawn centered as a rounded semi-transparent view which resizes depending on the user specified content.
+ *
+ * This view supports four modes of operation:
+ *  - MBProgressHUDModeIndeterminate - shows a UIActivityIndicatorView
+ *  - MBProgressHUDModeDeterminate - shows a custom round progress indicator
+ *  - MBProgressHUDModeAnnularDeterminate - shows a custom annular progress indicator
+ *  - MBProgressHUDModeCustomView - shows an arbitrary, user specified view (see `customView`)
+ *
+ * All three modes can have optional labels assigned:
+ *  - If the labelText property is set and non-empty then a label containing the provided content is placed below the
+ *    indicator view.
+ *  - If also the detailsLabelText property is set then another label is placed below the first label.
+ */
+@interface MBProgressHUD : UIView
+
+/**
+ * Creates a new HUD, adds it to provided view and shows it. The counterpart to this method is hideHUDForView:animated:.
+ *
+ * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden.
+ *
+ * @param view The view that the HUD will be added to
+ * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use
+ * animations while appearing.
+ * @return A reference to the created HUD.
+ *
+ * @see hideHUDForView:animated:
+ * @see animationType
+ */
++ (MB_INSTANCETYPE)showHUDAddedTo:(UIView *)view animated:(BOOL)animated;
+
+/**
+ * Finds the top-most HUD subview and hides it. The counterpart to this method is showHUDAddedTo:animated:.
+ *
+ * @note This method sets `removeFromSuperViewOnHide`. The HUD will automatically be removed from the view hierarchy when hidden.
+ *
+ * @param view The view that is going to be searched for a HUD subview.
+ * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
+ * animations while disappearing.
+ * @return YES if a HUD was found and removed, NO otherwise.
+ *
+ * @see showHUDAddedTo:animated:
+ * @see animationType
+ */
++ (BOOL)hideHUDForView:(UIView *)view animated:(BOOL)animated;
+
+/**
+ * Finds all the HUD subviews and hides them. 
+ *
+ * @note This method sets `removeFromSuperViewOnHide`. The HUDs will automatically be removed from the view hierarchy when hidden.
+ *
+ * @param view The view that is going to be searched for HUD subviews.
+ * @param animated If set to YES the HUDs will disappear using the current animationType. If set to NO the HUDs will not use
+ * animations while disappearing.
+ * @return the number of HUDs found and removed.
+ *
+ * @see hideHUDForView:animated:
+ * @see animationType
+ */
++ (NSUInteger)hideAllHUDsForView:(UIView *)view animated:(BOOL)animated;
+
+/**
+ * Finds the top-most HUD subview and returns it. 
+ *
+ * @param view The view that is going to be searched.
+ * @return A reference to the last HUD subview discovered.
+ */
++ (MB_INSTANCETYPE)HUDForView:(UIView *)view;
+
+/**
+ * Finds all HUD subviews and returns them.
+ *
+ * @param view The view that is going to be searched.
+ * @return All found HUD views (array of MBProgressHUD objects).
+ */
++ (NSArray *)allHUDsForView:(UIView *)view;
+
+/**
+ * A convenience constructor that initializes the HUD with the window's bounds. Calls the designated constructor with
+ * window.bounds as the parameter.
+ *
+ * @param window The window instance that will provide the bounds for the HUD. Should be the same instance as
+ * the HUD's superview (i.e., the window that the HUD will be added to).
+ */
+- (id)initWithWindow:(UIWindow *)window;
+
+/**
+ * A convenience constructor that initializes the HUD with the view's bounds. Calls the designated constructor with
+ * view.bounds as the parameter
+ *
+ * @param view The view instance that will provide the bounds for the HUD. Should be the same instance as
+ * the HUD's superview (i.e., the view that the HUD will be added to).
+ */
+- (id)initWithView:(UIView *)view;
+
+/** 
+ * Display the HUD. You need to make sure that the main thread completes its run loop soon after this method call so
+ * the user interface can be updated. Call this method when your task is already set-up to be executed in a new thread
+ * (e.g., when using something like NSOperation or calling an asynchronous call like NSURLRequest).
+ *
+ * @param animated If set to YES the HUD will appear using the current animationType. If set to NO the HUD will not use
+ * animations while appearing.
+ *
+ * @see animationType
+ */
+- (void)show:(BOOL)animated;
+
+/** 
+ * Hide the HUD. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to
+ * hide the HUD when your task completes.
+ *
+ * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
+ * animations while disappearing.
+ *
+ * @see animationType
+ */
+- (void)hide:(BOOL)animated;
+
+/** 
+ * Hide the HUD after a delay. This still calls the hudWasHidden: delegate. This is the counterpart of the show: method. Use it to
+ * hide the HUD when your task completes.
+ *
+ * @param animated If set to YES the HUD will disappear using the current animationType. If set to NO the HUD will not use
+ * animations while disappearing.
+ * @param delay Delay in seconds until the HUD is hidden.
+ *
+ * @see animationType
+ */
+- (void)hide:(BOOL)animated afterDelay:(NSTimeInterval)delay;
+
+/** 
+ * Shows the HUD while a background task is executing in a new thread, then hides the HUD.
+ *
+ * This method also takes care of autorelease pools so your method does not have to be concerned with setting up a
+ * pool.
+ *
+ * @param method The method to be executed while the HUD is shown. This method will be executed in a new thread.
+ * @param target The object that the target method belongs to.
+ * @param object An optional object to be passed to the method.
+ * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will not use
+ * animations while (dis)appearing.
+ */
+- (void)showWhileExecuting:(SEL)method onTarget:(id)target withObject:(id)object animated:(BOOL)animated;
+
+#if NS_BLOCKS_AVAILABLE
+
+/**
+ * Shows the HUD while a block is executing on a background queue, then hides the HUD.
+ *
+ * @see showAnimated:whileExecutingBlock:onQueue:completionBlock:
+ */
+- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block;
+
+/**
+ * Shows the HUD while a block is executing on a background queue, then hides the HUD.
+ *
+ * @see showAnimated:whileExecutingBlock:onQueue:completionBlock:
+ */
+- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block completionBlock:(MBProgressHUDCompletionBlock)completion;
+
+/**
+ * Shows the HUD while a block is executing on the specified dispatch queue, then hides the HUD.
+ *
+ * @see showAnimated:whileExecutingBlock:onQueue:completionBlock:
+ */
+- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue;
+
+/** 
+ * Shows the HUD while a block is executing on the specified dispatch queue, executes completion block on the main queue, and then hides the HUD.
+ *
+ * @param animated If set to YES the HUD will (dis)appear using the current animationType. If set to NO the HUD will
+ * not use animations while (dis)appearing.
+ * @param block The block to be executed while the HUD is shown.
+ * @param queue The dispatch queue on which the block should be executed.
+ * @param completion The block to be executed on completion.
+ *
+ * @see completionBlock
+ */
+- (void)showAnimated:(BOOL)animated whileExecutingBlock:(dispatch_block_t)block onQueue:(dispatch_queue_t)queue
+		  completionBlock:(MBProgressHUDCompletionBlock)completion;
+
+/**
+ * A block that gets called after the HUD was completely hidden.
+ */
+@property (copy) MBProgressHUDCompletionBlock completionBlock;
+
+#endif
+
+/** 
+ * MBProgressHUD operation mode. The default is MBProgressHUDModeIndeterminate.
+ *
+ * @see MBProgressHUDMode
+ */
+@property (assign) MBProgressHUDMode mode;
+
+/**
+ * The animation type that should be used when the HUD is shown and hidden. 
+ *
+ * @see MBProgressHUDAnimation
+ */
+@property (assign) MBProgressHUDAnimation animationType;
+
+/**
+ * The UIView (e.g., a UIImageView) to be shown when the HUD is in MBProgressHUDModeCustomView.
+ * For best results use a 37 by 37 pixel view (so the bounds match the built in indicator bounds). 
+ */
+@property (MB_STRONG) UIView *customView;
+
+/** 
+ * The HUD delegate object. 
+ *
+ * @see MBProgressHUDDelegate
+ */
+@property (MB_WEAK) id<MBProgressHUDDelegate> delegate;
+
+/** 
+ * An optional short message to be displayed below the activity indicator. The HUD is automatically resized to fit
+ * the entire text. If the text is too long it will get clipped by displaying "..." at the end. If left unchanged or
+ * set to @"", then no message is displayed.
+ */
+@property (copy) NSString *labelText;
+
+/** 
+ * An optional details message displayed below the labelText message. This message is displayed only if the labelText
+ * property is also set and is different from an empty string (@""). The details text can span multiple lines. 
+ */
+@property (copy) NSString *detailsLabelText;
+
+/** 
+ * The opacity of the HUD window. Defaults to 0.8 (80% opacity). 
+ */
+@property (assign) float opacity;
+
+/**
+ * The color of the HUD window. Defaults to black. If this property is set, color is set using
+ * this UIColor and the opacity property is not used.  using retain because performing copy on
+ * UIColor base colors (like [UIColor greenColor]) cause problems with the copyZone.
+ */
+@property (MB_STRONG) UIColor *color;
+
+/** 
+ * The x-axis offset of the HUD relative to the centre of the superview. 
+ */
+@property (assign) float xOffset;
+
+/** 
+ * The y-axis offset of the HUD relative to the centre of the superview. 
+ */
+@property (assign) float yOffset;
+
+/**
+ * The amount of space between the HUD edge and the HUD elements (labels, indicators or custom views). 
+ * Defaults to 20.0
+ */
+@property (assign) float margin;
+
+/**
+ * The corner radius for the HUD
+ * Defaults to 10.0
+ */
+@property (assign) float cornerRadius;
+
+/** 
+ * Cover the HUD background view with a radial gradient. 
+ */
+@property (assign) BOOL dimBackground;
+
+/*
+ * Grace period is the time (in seconds) that the invoked method may be run without 
+ * showing the HUD. If the task finishes before the grace time runs out, the HUD will
+ * not be shown at all. 
+ * This may be used to prevent HUD display for very short tasks.
+ * Defaults to 0 (no grace time).
+ * Grace time functionality is only supported when the task status is known!
+ * @see taskInProgress
+ */
+@property (assign) float graceTime;
+
+/**
+ * The minimum time (in seconds) that the HUD is shown. 
+ * This avoids the problem of the HUD being shown and than instantly hidden.
+ * Defaults to 0 (no minimum show time).
+ */
+@property (assign) float minShowTime;
+
+/**
+ * Indicates that the executed operation is in progress. Needed for correct graceTime operation.
+ * If you don't set a graceTime (different than 0.0) this does nothing.
+ * This property is automatically set when using showWhileExecuting:onTarget:withObject:animated:.
+ * When threading is done outside of the HUD (i.e., when the show: and hide: methods are used directly),
+ * you need to set this property when your task starts and completes in order to have normal graceTime 
+ * functionality.
+ */
+@property (assign) BOOL taskInProgress;
+
+/**
+ * Removes the HUD from its parent view when hidden. 
+ * Defaults to NO. 
+ */
+@property (assign) BOOL removeFromSuperViewOnHide;
+
+/** 
+ * Font to be used for the main label. Set this property if the default is not adequate. 
+ */
+@property (MB_STRONG) UIFont* labelFont;
+
+/**
+ * Color to be used for the main label. Set this property if the default is not adequate.
+ */
+@property (MB_STRONG) UIColor* labelColor;
+
+/**
+ * Font to be used for the details label. Set this property if the default is not adequate.
+ */
+@property (MB_STRONG) UIFont* detailsLabelFont;
+
+/** 
+ * Color to be used for the details label. Set this property if the default is not adequate.
+ */
+@property (MB_STRONG) UIColor* detailsLabelColor;
+
+/**
+ * The color of the activity indicator. Defaults to [UIColor whiteColor]
+ * Does nothing on pre iOS 5.
+ */
+@property (MB_STRONG) UIColor *activityIndicatorColor;
+
+/** 
+ * The progress of the progress indicator, from 0.0 to 1.0. Defaults to 0.0. 
+ */
+@property (assign) float progress;
+
+/**
+ * The minimum size of the HUD bezel. Defaults to CGSizeZero (no minimum size).
+ */
+@property (assign) CGSize minSize;
+
+
+/**
+ * The actual size of the HUD bezel.
+ * You can use this to limit touch handling on the bezel area only.
+ * @see https://github.com/jdg/MBProgressHUD/pull/200
+ */
+@property (atomic, assign, readonly) CGSize size;
+
+
+/**
+ * Force the HUD dimensions to be equal if possible. 
+ */
+@property (assign, getter = isSquare) BOOL square;
+
+@end
+
+
+@protocol MBProgressHUDDelegate <NSObject>
+
+@optional
+
+/** 
+ * Called after the HUD was fully hidden from the screen. 
+ */
+- (void)hudWasHidden:(MBProgressHUD *)hud;
+
+@end
+
+
+/**
+ * A progress view for showing definite progress by filling up a circle (pie chart).
+ */
+@interface MBRoundProgressView : UIView 
+
+/**
+ * Progress (0.0 to 1.0)
+ */
+@property (nonatomic, assign) float progress;
+
+/**
+ * Indicator progress color.
+ * Defaults to white [UIColor whiteColor]
+ */
+@property (nonatomic, MB_STRONG) UIColor *progressTintColor;
+
+/**
+ * Indicator background (non-progress) color.
+ * Defaults to translucent white (alpha 0.1)
+ */
+@property (nonatomic, MB_STRONG) UIColor *backgroundTintColor;
+
+/*
+ * Display mode - NO = round or YES = annular. Defaults to round.
+ */
+@property (nonatomic, assign, getter = isAnnular) BOOL annular;
+
+@end
+
+
+/**
+ * A flat bar progress view. 
+ */
+@interface MBBarProgressView : UIView
+
+/**
+ * Progress (0.0 to 1.0)
+ */
+@property (nonatomic, assign) float progress;
+
+/**
+ * Bar border line color.
+ * Defaults to white [UIColor whiteColor].
+ */
+@property (nonatomic, MB_STRONG) UIColor *lineColor;
+
+/**
+ * Bar background color.
+ * Defaults to clear [UIColor clearColor];
+ */
+@property (nonatomic, MB_STRONG) UIColor *progressRemainingColor;
+
+/**
+ * Bar progress color.
+ * Defaults to white [UIColor whiteColor].
+ */
+@property (nonatomic, MB_STRONG) UIColor *progressColor;
+
+@end

File diff suppressed because it is too large
+ 1033 - 0
TumblrDownloader/MBProgressHUD.m


+ 13 - 0
TumblrDownloader/StoredViewController.h

@@ -0,0 +1,13 @@
+//
+//  StoredViewController.h
+//  TumblrDownloader
+//
+//  Created by HonorLee on 16/1/15.
+//  Copyright © 2016年 HonorLee. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface StoredViewController : UIViewController
+
+@end

+ 33 - 0
TumblrDownloader/StoredViewController.m

@@ -0,0 +1,33 @@
+//
+//  StoredViewController.m
+//  TumblrDownloader
+//
+//  Created by HonorLee on 16/1/15.
+//  Copyright © 2016年 HonorLee. All rights reserved.
+//
+
+#import "StoredViewController.h"
+
+@interface StoredViewController ()
+
+@end
+
+@implementation StoredViewController
+
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    
+    // Uncomment the following line to preserve selection between presentations.
+    // self.clearsSelectionOnViewWillAppear = NO;
+    
+    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
+    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
+//    self.tabBarItem
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+@end

+ 13 - 0
TumblrDownloader/TasksViewController.h

@@ -0,0 +1,13 @@
+//
+//  TasksViewController.h
+//  TumblrDownloader
+//
+//  Created by HonorLee on 16/1/17.
+//  Copyright © 2016年 HonorLee. All rights reserved.
+//
+
+#import <UIKit/UIKit.h>
+
+@interface TasksViewController : UIViewController<UITableViewDataSource,UITableViewDelegate,UIScrollViewDelegate>
+@property (strong, nonatomic) IBOutlet UITableView *TaskTableView;
+@end

+ 78 - 0
TumblrDownloader/TasksViewController.m

@@ -0,0 +1,78 @@
+//
+//  TasksViewController.m
+//  TumblrDownloader
+//
+//  Created by HonorLee on 16/1/17.
+//  Copyright © 2016年 HonorLee. All rights reserved.
+//
+
+#import "TasksViewController.h"
+
+@interface TasksViewController ()
+@property NSUserDefaults *userDefaults;
+@property UIRefreshControl *uirefresh;
+@property NSMutableArray *TaskData;
+@end
+
+@implementation TasksViewController
+//UIRefreshControl *uirefresh;
+- (void)viewDidLoad {
+    [super viewDidLoad];
+    // Do any additional setup after loading the view.
+    _TaskTableView.delegate = self;
+    _TaskTableView.dataSource = self;
+    _uirefresh = [[UIRefreshControl alloc]init];
+    _uirefresh.attributedTitle = [[NSAttributedString alloc]initWithString:NSLocalizedString(@"PullToRefresh", nil)];
+    [_TaskTableView addSubview:_uirefresh];
+    [_uirefresh addTarget:self action:@selector(pullToRefresh) forControlEvents:UIControlEventValueChanged];
+    
+    _userDefaults = [[NSUserDefaults alloc]initWithSuiteName:@"group.honorlee.TumblrDownloader"];
+    
+}
+
+- (void)didReceiveMemoryWarning {
+    [super didReceiveMemoryWarning];
+    // Dispose of any resources that can be recreated.
+}
+
+-(void)viewDidAppear:(BOOL)animated{
+    [self pullToRefresh];
+}
+
+#pragma Table Refresh
+-(void)pullToRefresh{
+    NSLog(@"Start refresh");
+    _uirefresh.attributedTitle = [[NSAttributedString alloc]initWithString:NSLocalizedString(@"PullToRefreshing", nil)];
+    [self reloadCellData];
+    [self refreshEnd];
+}
+
+-(void)refreshEnd{
+    [_uirefresh endRefreshing];
+    _uirefresh.attributedTitle = [[NSAttributedString alloc]initWithString:NSLocalizedString(@"PullToRefreshEnd", nil)];
+}
+
+-(void)reloadCellData{
+    [_userDefaults synchronize];
+    _TaskData = [NSMutableArray arrayWithArray:(NSMutableArray *)[_userDefaults objectForKey:@"tasks"]];
+    [_TaskTableView reloadData];
+    NSLog(@"Data loaded");
+}
+
+#pragma TableViewDelegate
+-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
+    UITableViewCell *cell = [_TaskTableView dequeueReusableCellWithIdentifier:@"TaskCellStyle"];
+//    cell.textLabel.
+    cell.textLabel.text = _TaskData[indexPath.row];
+    return cell;
+}
+
+//-tabl
+-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
+    return [_TaskData count];
+}
+-(NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index{
+    return 1;
+}
+
+@end

+ 1 - 1
TumblrDownloader/ViewController.h

@@ -9,6 +9,6 @@
 #import <UIKit/UIKit.h>
 
 @interface ViewController : UITabBarController
-
++(id)Instance;
 @end
 

+ 16 - 4
TumblrDownloader/ViewController.m

@@ -7,13 +7,20 @@
 //
 
 #import "ViewController.h"
+#import "Helper.h"
 
 @interface ViewController ()
 
 @end
 
+static ViewController *_inst;
+
 @implementation ViewController
 
++(id)Instance{
+    return _inst;
+}
+
 - (void)viewDidLoad {
     [super viewDidLoad];
     // Do any additional setup after loading the view, typically from a nib.
@@ -23,12 +30,17 @@
 //    self.tabBar.opaque = YES;
 //    UITabBar *tab = [self.tabBar.items objectAtIndex:0];
 //    [tabBar setTintColor:[UIColor orangeColor]];[CIColor colorWithString:@"#00bfff"];
-    self.tabBar.barTintColor = [UIColor colorWithRed:0/255.0 green:191/255.0 blue:255/255.0 alpha:1];
-    self.tabBar.tintColor = [UIColor whiteColor];
+//    self.tabBar.barTintColor = [UIColor whiteColor];
+//    self.tabBar.tintColor = [UIColor whiteColor];
+    _inst = self;
     self.tabBar.opaque = NO;
     self.tabBar.translucent = NO;
-    [self.tabBar setValue:@(YES) forKeyPath:@"_hidesShadow"];
-    [self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:0/255.0 green:191/255.0 blue:255/255.0 alpha:1]];
+//    [self.tabBar setValue:@(YES) forKeyPath:@"_hidesShadow"];
+//    [self.navigationController.navigationBar setBarTintColor:[UIColor colorWithRed:0/255.0 green:191/255.0 blue:255/255.0 alpha:1]];
+    [Helper changeStatusBarBackground:[UIColor whiteColor]];
+//    self.tabBar.selectionIndicatorImage=[UIImage imageNamed:@"tab_1.png"];
+
+    
 }
 
 - (void)didReceiveMemoryWarning {

+ 8 - 0
TumblrDownloader/en.lproj/Localizable.strings

@@ -5,3 +5,11 @@
   Created by HonorLee on 16/1/15.
   Copyright © 2016年 HonorLee. All rights reserved.
 */
+"OpenTumblrBtnText" = "Open Tumblr";
+"OpenTumblrSuccess" = "Openning Tumblr";
+"OpenTumblrError"   = "Tumblr open error,make sure Tumblr installed";
+"HelpText" = "1. Open Tumblr app\n\n2. Find a post and share it with the Share Button\n\n3. Select share to TumblrDownloader to collect url of this post\n\n4. Open TumblrDownloader and select \"Tasks\"\n\n5. Start or delete task in the url list you collected in Tumblr app";
+
+"PullToRefresh"     = "Pull To Refresh...";
+"PullToRefreshing"  = "Refreshing...";
+"PullToRefreshEnd"  = "Refresh Done!";

+ 8 - 0
TumblrDownloader/zh-Hans.lproj/Localizable.strings

@@ -5,3 +5,11 @@
   Created by HonorLee on 16/1/15.
   Copyright © 2016年 HonorLee. All rights reserved.
 */
+"OpenTumblrBtnText" = "打开Tumblr";
+"OpenTumblrSuccess" = "正在打开Tumblr";
+"OpenTumblrError"   = "打开Tumblr失败,请确定已安装Tumblr";
+"HelpText" = "1. 打开 Tumblr 应用\n\n2. 找到包含了希望搜集的内容的帖子,并点击分享按钮\n\n3. 在弹出的分享界面上选择TumblrDownloader以获取当前帖子的URL地址\n\n4. 打开 TumblrDownloader 并选择\"任务\"分类\n\n5. 在这里你可以开始或删除已搜集的Tumblr下载任务";
+
+"PullToRefresh"     = "下拉刷新...";
+"PullToRefreshing"  = "刷新中...";
+"PullToRefreshEnd"  = "刷新完成!";