diff --git a/GIGA.xcodeproj/project.pbxproj b/GIGA.xcodeproj/project.pbxproj index 3d18081..a2c8d1a 100644 --- a/GIGA.xcodeproj/project.pbxproj +++ b/GIGA.xcodeproj/project.pbxproj @@ -18,6 +18,8 @@ 83346AD1212BF5B70054D597 /* useragreement.html in Resources */ = {isa = PBXBuildFile; fileRef = 83346AD0212BF5B70054D597 /* useragreement.html */; }; 83346AD4212BFF6E0054D597 /* UserGuardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346AD3212BFF6E0054D597 /* UserGuardViewController.m */; }; 83346AD7212C18F50054D597 /* GiGaAppGaurdVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 83346AD6212C18F50054D597 /* GiGaAppGaurdVC.m */; }; + 8338F6B12142182200B4780B /* MaskTime.png in Resources */ = {isa = PBXBuildFile; fileRef = 8338F6B02142182100B4780B /* MaskTime.png */; }; + 8338F6B92142504E00B4780B /* LXCustomSwith.m in Sources */ = {isa = PBXBuildFile; fileRef = 8338F6B82142504E00B4780B /* LXCustomSwith.m */; }; 833DA7762122A62000A5C614 /* GiGaMaskTaskViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 833DA7752122A62000A5C614 /* GiGaMaskTaskViewController.m */; }; 8340BF9E213E3846008F22E4 /* SHineLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8340BF9D213E3846008F22E4 /* SHineLabel.m */; }; 8340BFA2213E60DD008F22E4 /* GIGAMBHUDHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 8340BFA1213E60DD008F22E4 /* GIGAMBHUDHelper.m */; }; @@ -84,7 +86,6 @@ 83835BD0212E8B9C001480F2 /* GiGaQuestionModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 83835BCF212E8B9C001480F2 /* GiGaQuestionModel.m */; }; 838388C4212F934400D14C53 /* pomodoSound.m4a in Resources */ = {isa = PBXBuildFile; fileRef = 838388C3212F934400D14C53 /* pomodoSound.m4a */; }; 838388C8212F9C4200D14C53 /* GiGaLocalNotificationManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 838388C7212F9C4200D14C53 /* GiGaLocalNotificationManager.m */; }; - 838388CA212FA00200D14C53 /* MaskTime.png in Resources */ = {isa = PBXBuildFile; fileRef = 838388C9212FA00200D14C53 /* MaskTime.png */; }; 838388D3212FB7D700D14C53 /* JXTAlertController.m in Sources */ = {isa = PBXBuildFile; fileRef = 838388CE212FB7D700D14C53 /* JXTAlertController.m */; }; 838388D4212FB7D700D14C53 /* JXTAlertView.m in Sources */ = {isa = PBXBuildFile; fileRef = 838388D2212FB7D700D14C53 /* JXTAlertView.m */; }; 838388DA2130046D00D14C53 /* emojizone.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 838388D92130046D00D14C53 /* emojizone.mp4 */; }; @@ -150,6 +151,9 @@ 83346AD3212BFF6E0054D597 /* UserGuardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserGuardViewController.m; sourceTree = ""; }; 83346AD5212C18F50054D597 /* GiGaAppGaurdVC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaAppGaurdVC.h; sourceTree = ""; }; 83346AD6212C18F50054D597 /* GiGaAppGaurdVC.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaAppGaurdVC.m; sourceTree = ""; }; + 8338F6B02142182100B4780B /* MaskTime.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MaskTime.png; sourceTree = ""; }; + 8338F6B72142504E00B4780B /* LXCustomSwith.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LXCustomSwith.h; sourceTree = ""; }; + 8338F6B82142504E00B4780B /* LXCustomSwith.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LXCustomSwith.m; sourceTree = ""; }; 833DA7742122A62000A5C614 /* GiGaMaskTaskViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaMaskTaskViewController.h; sourceTree = ""; }; 833DA7752122A62000A5C614 /* GiGaMaskTaskViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaMaskTaskViewController.m; sourceTree = ""; }; 8340BF9C213E3846008F22E4 /* SHineLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SHineLabel.h; sourceTree = ""; }; @@ -267,7 +271,6 @@ 838388C3212F934400D14C53 /* pomodoSound.m4a */ = {isa = PBXFileReference; lastKnownFileType = file; path = pomodoSound.m4a; sourceTree = ""; }; 838388C6212F9C4200D14C53 /* GiGaLocalNotificationManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiGaLocalNotificationManager.h; sourceTree = ""; }; 838388C7212F9C4200D14C53 /* GiGaLocalNotificationManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiGaLocalNotificationManager.m; sourceTree = ""; }; - 838388C9212FA00200D14C53 /* MaskTime.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = MaskTime.png; sourceTree = ""; }; 838388CD212FB7D700D14C53 /* JXTAlertController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JXTAlertController.h; sourceTree = ""; }; 838388CE212FB7D700D14C53 /* JXTAlertController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JXTAlertController.m; sourceTree = ""; }; 838388CF212FB7D700D14C53 /* JXTAlertManagerHeader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JXTAlertManagerHeader.h; sourceTree = ""; }; @@ -374,15 +377,24 @@ 83346AC8212BD4160054D597 /* Source */ = { isa = PBXGroup; children = ( + 8338F6B02142182100B4780B /* MaskTime.png */, 8342D9FC2131150200D16B1D /* 4481.wav */, 838388D92130046D00D14C53 /* emojizone.mp4 */, - 838388C9212FA00200D14C53 /* MaskTime.png */, 838388C3212F934400D14C53 /* pomodoSound.m4a */, 83346AD0212BF5B70054D597 /* useragreement.html */, ); path = Source; sourceTree = ""; }; + 8338F6B62142504E00B4780B /* CustomSwitch */ = { + isa = PBXGroup; + children = ( + 8338F6B72142504E00B4780B /* LXCustomSwith.h */, + 8338F6B82142504E00B4780B /* LXCustomSwith.m */, + ); + path = CustomSwitch; + sourceTree = ""; + }; 8340BF9F213E6080008F22E4 /* GIGAMBHUDHelper */ = { isa = PBXGroup; children = ( @@ -405,6 +417,7 @@ 8340BFAC213E7374008F22E4 /* Views */ = { isa = PBXGroup; children = ( + 8338F6B62142504E00B4780B /* CustomSwitch */, 8340BFAD213E739D008F22E4 /* GiGaNoNetWorkView.h */, 8340BFAE213E739D008F22E4 /* GiGaNoNetWorkView.m */, ); @@ -1106,7 +1119,6 @@ 83BFAE78213CDE91004EF801 /* GiGaSettingsViewCell.xib in Resources */, 83346AC1212BB50A0054D597 /* PassWordResetVC.xib in Resources */, 83346AD1212BF5B70054D597 /* useragreement.html in Resources */, - 838388CA212FA00200D14C53 /* MaskTime.png in Resources */, 83BFAE68213CCF10004EF801 /* GiGaMineUserViewCell.xib in Resources */, 8340BFA9213E65CA008F22E4 /* GIGACommonLocalizabe.strings in Resources */, 83835BA8212E4748001480F2 /* MAssaageCenterCell.xib in Resources */, @@ -1116,6 +1128,7 @@ 8340BFAB213E665D008F22E4 /* GIGAUserLocalizable.strings in Resources */, 8342D9FD2131150200D16B1D /* 4481.wav in Resources */, 83835BB0212E4FCD001480F2 /* MessageListViewCell.xib in Resources */, + 8338F6B12142182200B4780B /* MaskTime.png in Resources */, 83346ACF212BD7830054D597 /* GiGaWebViewController.xib in Resources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1254,6 +1267,7 @@ 8345C13621414D3B00051717 /* NSString+Unicode.m in Sources */, 83835BC7212E7BBF001480F2 /* GiGaNavTitileView.m in Sources */, 8361B4322121832800238FEB /* GiGaBaseViewController.m in Sources */, + 8338F6B92142504E00B4780B /* LXCustomSwith.m in Sources */, 8357ADD32123C7C6000816F2 /* GiGaAPIResult.m in Sources */, 8340BF9E213E3846008F22E4 /* SHineLabel.m in Sources */, 8361B4352121836700238FEB /* GiGaBaseNavViewController.m in Sources */, @@ -1467,7 +1481,10 @@ ); INFOPLIST_FILE = GIGA/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.gigamask.ios; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; @@ -1494,7 +1511,10 @@ ); INFOPLIST_FILE = GIGA/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = com.gigamask.ios; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE = ""; @@ -1509,7 +1529,11 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = GIGATests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = lianxiang.GIGATests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1523,7 +1547,11 @@ BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = GIGATests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = lianxiang.GIGATests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1536,7 +1564,11 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = GIGAUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = lianxiang.GIGAUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; @@ -1549,7 +1581,11 @@ buildSettings = { CODE_SIGN_STYLE = Automatic; INFOPLIST_FILE = GIGAUITests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); PRODUCT_BUNDLE_IDENTIFIER = lianxiang.GIGAUITests; PRODUCT_NAME = "$(TARGET_NAME)"; TARGETED_DEVICE_FAMILY = "1,2"; diff --git a/GIGA/Assets.xcassets/login/btn_back.imageset/Contents.json b/GIGA/Assets.xcassets/login/btn_back.imageset/Contents.json index 130483e..37bd2b8 100644 --- a/GIGA/Assets.xcassets/login/btn_back.imageset/Contents.json +++ b/GIGA/Assets.xcassets/login/btn_back.imageset/Contents.json @@ -1,9 +1,5 @@ { "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, { "idiom" : "universal", "filename" : "btn_back@2x.png", diff --git a/GIGA/Assets.xcassets/login/btn_back.imageset/btn_back@2x.png b/GIGA/Assets.xcassets/login/btn_back.imageset/btn_back@2x.png index 15675b5..c948e01 100644 Binary files a/GIGA/Assets.xcassets/login/btn_back.imageset/btn_back@2x.png and b/GIGA/Assets.xcassets/login/btn_back.imageset/btn_back@2x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_back.imageset/btn_back@3x.png b/GIGA/Assets.xcassets/login/btn_back.imageset/btn_back@3x.png index 8125e74..aa04842 100644 Binary files a/GIGA/Assets.xcassets/login/btn_back.imageset/btn_back@3x.png and b/GIGA/Assets.xcassets/login/btn_back.imageset/btn_back@3x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_load.imageset/btn_load@2x.png b/GIGA/Assets.xcassets/login/btn_load.imageset/btn_load@2x.png deleted file mode 100644 index fbcec5a..0000000 Binary files a/GIGA/Assets.xcassets/login/btn_load.imageset/btn_load@2x.png and /dev/null differ diff --git a/GIGA/Assets.xcassets/login/btn_load.imageset/btn_load@3x.png b/GIGA/Assets.xcassets/login/btn_load.imageset/btn_load@3x.png deleted file mode 100644 index 8786bc3..0000000 Binary files a/GIGA/Assets.xcassets/login/btn_load.imageset/btn_load@3x.png and /dev/null differ diff --git a/GIGA/Assets.xcassets/login/btn_load.imageset/Contents.json b/GIGA/Assets.xcassets/login/btn_login.imageset/Contents.json similarity index 59% rename from GIGA/Assets.xcassets/login/btn_load.imageset/Contents.json rename to GIGA/Assets.xcassets/login/btn_login.imageset/Contents.json index ef3cc84..221145d 100644 --- a/GIGA/Assets.xcassets/login/btn_load.imageset/Contents.json +++ b/GIGA/Assets.xcassets/login/btn_login.imageset/Contents.json @@ -2,16 +2,12 @@ "images" : [ { "idiom" : "universal", - "scale" : "1x" - }, - { - "idiom" : "universal", - "filename" : "btn_load@2x.png", + "filename" : "btn_login@2x.png", "scale" : "2x" }, { "idiom" : "universal", - "filename" : "btn_load@3x.png", + "filename" : "btn_login@3x.png", "scale" : "3x" } ], diff --git a/GIGA/Assets.xcassets/login/btn_login.imageset/btn_login@2x.png b/GIGA/Assets.xcassets/login/btn_login.imageset/btn_login@2x.png new file mode 100644 index 0000000..106e212 Binary files /dev/null and b/GIGA/Assets.xcassets/login/btn_login.imageset/btn_login@2x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_login.imageset/btn_login@3x.png b/GIGA/Assets.xcassets/login/btn_login.imageset/btn_login@3x.png new file mode 100644 index 0000000..d3d586e Binary files /dev/null and b/GIGA/Assets.xcassets/login/btn_login.imageset/btn_login@3x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_meaasag.imageset/Contents.json b/GIGA/Assets.xcassets/login/btn_meaasag.imageset/Contents.json index c454cc3..f530c0a 100644 --- a/GIGA/Assets.xcassets/login/btn_meaasag.imageset/Contents.json +++ b/GIGA/Assets.xcassets/login/btn_meaasag.imageset/Contents.json @@ -1,9 +1,5 @@ { "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, { "idiom" : "universal", "filename" : "btn_meaasag@2x.png", diff --git a/GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@2x.png b/GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@2x.png index e809918..cfda3e8 100644 Binary files a/GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@2x.png and b/GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@2x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@3x.png b/GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@3x.png index 55e9d29..5ad9324 100644 Binary files a/GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@3x.png and b/GIGA/Assets.xcassets/login/btn_meaasag.imageset/btn_meaasag@3x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_moment_back.imageset/Contents.json b/GIGA/Assets.xcassets/login/btn_moment_back.imageset/Contents.json index e67fafe..4a9e8f2 100644 --- a/GIGA/Assets.xcassets/login/btn_moment_back.imageset/Contents.json +++ b/GIGA/Assets.xcassets/login/btn_moment_back.imageset/Contents.json @@ -1,9 +1,5 @@ { "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, { "idiom" : "universal", "filename" : "btn_moment_back@2x.png", diff --git a/GIGA/Assets.xcassets/login/btn_moment_back.imageset/btn_moment_back@2x.png b/GIGA/Assets.xcassets/login/btn_moment_back.imageset/btn_moment_back@2x.png index d33febd..b7ce42e 100644 Binary files a/GIGA/Assets.xcassets/login/btn_moment_back.imageset/btn_moment_back@2x.png and b/GIGA/Assets.xcassets/login/btn_moment_back.imageset/btn_moment_back@2x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_moment_back.imageset/btn_moment_back@3x.png b/GIGA/Assets.xcassets/login/btn_moment_back.imageset/btn_moment_back@3x.png index 0c11463..ecc96ac 100644 Binary files a/GIGA/Assets.xcassets/login/btn_moment_back.imageset/btn_moment_back@3x.png and b/GIGA/Assets.xcassets/login/btn_moment_back.imageset/btn_moment_back@3x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_right.imageset/Contents.json b/GIGA/Assets.xcassets/login/btn_right.imageset/Contents.json index 6c2fec6..280fbc2 100644 --- a/GIGA/Assets.xcassets/login/btn_right.imageset/Contents.json +++ b/GIGA/Assets.xcassets/login/btn_right.imageset/Contents.json @@ -2,15 +2,12 @@ "images" : [ { "idiom" : "universal", - "filename" : "btn_right.png", - "scale" : "1x" - }, - { - "idiom" : "universal", + "filename" : "btn_right@2x.png", "scale" : "2x" }, { "idiom" : "universal", + "filename" : "btn_right@3x.png", "scale" : "3x" } ], diff --git a/GIGA/Assets.xcassets/login/btn_right.imageset/btn_right.png b/GIGA/Assets.xcassets/login/btn_right.imageset/btn_right.png deleted file mode 100644 index bb6384e..0000000 Binary files a/GIGA/Assets.xcassets/login/btn_right.imageset/btn_right.png and /dev/null differ diff --git a/GIGA/Assets.xcassets/login/btn_right.imageset/btn_right@2x.png b/GIGA/Assets.xcassets/login/btn_right.imageset/btn_right@2x.png new file mode 100644 index 0000000..18e7448 Binary files /dev/null and b/GIGA/Assets.xcassets/login/btn_right.imageset/btn_right@2x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_right.imageset/btn_right@3x.png b/GIGA/Assets.xcassets/login/btn_right.imageset/btn_right@3x.png new file mode 100644 index 0000000..eb743c5 Binary files /dev/null and b/GIGA/Assets.xcassets/login/btn_right.imageset/btn_right@3x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/Contents.json b/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/Contents.json index 5db27e6..48dffc8 100644 --- a/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/Contents.json +++ b/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/Contents.json @@ -1,9 +1,5 @@ { "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, { "idiom" : "universal", "filename" : "btn_tab_desplay@2x.png", diff --git a/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/btn_tab_desplay@2x.png b/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/btn_tab_desplay@2x.png index 1120697..d5152ae 100644 Binary files a/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/btn_tab_desplay@2x.png and b/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/btn_tab_desplay@2x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/btn_tab_desplay@3x.png b/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/btn_tab_desplay@3x.png index 011c019..c60b4ae 100644 Binary files a/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/btn_tab_desplay@3x.png and b/GIGA/Assets.xcassets/login/btn_tab_desplay.imageset/btn_tab_desplay@3x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/Contents.json b/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/Contents.json index f9fd4bf..3058113 100644 --- a/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/Contents.json +++ b/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/Contents.json @@ -1,9 +1,5 @@ { "images" : [ - { - "idiom" : "universal", - "scale" : "1x" - }, { "idiom" : "universal", "filename" : "btn_tab_notselect@2x.png", diff --git a/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/btn_tab_notselect@2x.png b/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/btn_tab_notselect@2x.png index b8f8c13..ddeecb0 100644 Binary files a/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/btn_tab_notselect@2x.png and b/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/btn_tab_notselect@2x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/btn_tab_notselect@3x.png b/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/btn_tab_notselect@3x.png index 0a9c529..23d515a 100644 Binary files a/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/btn_tab_notselect@3x.png and b/GIGA/Assets.xcassets/login/btn_tab_notselect.imageset/btn_tab_notselect@3x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_turndown.imageset/Contents.json b/GIGA/Assets.xcassets/login/btn_turndown.imageset/Contents.json index 9abf196..57ea7eb 100644 --- a/GIGA/Assets.xcassets/login/btn_turndown.imageset/Contents.json +++ b/GIGA/Assets.xcassets/login/btn_turndown.imageset/Contents.json @@ -2,15 +2,12 @@ "images" : [ { "idiom" : "universal", - "filename" : "btn_turndown.png", - "scale" : "1x" - }, - { - "idiom" : "universal", + "filename" : "btn_turndown@2x.png", "scale" : "2x" }, { "idiom" : "universal", + "filename" : "btn_turndown@3x.png", "scale" : "3x" } ], diff --git a/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown.png b/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown.png deleted file mode 100644 index 194482a..0000000 Binary files a/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown.png and /dev/null differ diff --git a/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown@2x.png b/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown@2x.png new file mode 100644 index 0000000..55c2340 Binary files /dev/null and b/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown@2x.png differ diff --git a/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown@3x.png b/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown@3x.png new file mode 100644 index 0000000..6513cfb Binary files /dev/null and b/GIGA/Assets.xcassets/login/btn_turndown.imageset/btn_turndown@3x.png differ diff --git a/GIGA/Assets.xcassets/login/nav_red_moment.imageset/Contents.json b/GIGA/Assets.xcassets/login/nav_red_moment.imageset/Contents.json new file mode 100644 index 0000000..fb1e4c7 --- /dev/null +++ b/GIGA/Assets.xcassets/login/nav_red_moment.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "nav_red_moment@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "nav_red_moment@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/login/nav_red_moment.imageset/nav_red_moment@2x.png b/GIGA/Assets.xcassets/login/nav_red_moment.imageset/nav_red_moment@2x.png new file mode 100644 index 0000000..8dabf02 Binary files /dev/null and b/GIGA/Assets.xcassets/login/nav_red_moment.imageset/nav_red_moment@2x.png differ diff --git a/GIGA/Assets.xcassets/login/nav_red_moment.imageset/nav_red_moment@3x.png b/GIGA/Assets.xcassets/login/nav_red_moment.imageset/nav_red_moment@3x.png new file mode 100644 index 0000000..dbc0009 Binary files /dev/null and b/GIGA/Assets.xcassets/login/nav_red_moment.imageset/nav_red_moment@3x.png differ diff --git a/GIGA/Assets.xcassets/login/nav_redback.imageset/Contents.json b/GIGA/Assets.xcassets/login/nav_redback.imageset/Contents.json new file mode 100644 index 0000000..147d463 --- /dev/null +++ b/GIGA/Assets.xcassets/login/nav_redback.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "nav_redback@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "nav_redback@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/login/nav_redback.imageset/nav_redback@2x.png b/GIGA/Assets.xcassets/login/nav_redback.imageset/nav_redback@2x.png new file mode 100644 index 0000000..36ff8e6 Binary files /dev/null and b/GIGA/Assets.xcassets/login/nav_redback.imageset/nav_redback@2x.png differ diff --git a/GIGA/Assets.xcassets/login/nav_redback.imageset/nav_redback@3x.png b/GIGA/Assets.xcassets/login/nav_redback.imageset/nav_redback@3x.png new file mode 100644 index 0000000..0aeb289 Binary files /dev/null and b/GIGA/Assets.xcassets/login/nav_redback.imageset/nav_redback@3x.png differ diff --git a/GIGA/Assets.xcassets/maskTime/ic_send.imageset/Contents.json b/GIGA/Assets.xcassets/maskTime/ic_send.imageset/Contents.json new file mode 100644 index 0000000..58aae92 --- /dev/null +++ b/GIGA/Assets.xcassets/maskTime/ic_send.imageset/Contents.json @@ -0,0 +1,18 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "ic_send@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "ic_send@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/GIGA/Assets.xcassets/maskTime/ic_send.imageset/ic_send@2x.png b/GIGA/Assets.xcassets/maskTime/ic_send.imageset/ic_send@2x.png new file mode 100644 index 0000000..0087a2d Binary files /dev/null and b/GIGA/Assets.xcassets/maskTime/ic_send.imageset/ic_send@2x.png differ diff --git a/GIGA/Assets.xcassets/maskTime/ic_send.imageset/ic_send@3x.png b/GIGA/Assets.xcassets/maskTime/ic_send.imageset/ic_send@3x.png new file mode 100644 index 0000000..039e13c Binary files /dev/null and b/GIGA/Assets.xcassets/maskTime/ic_send.imageset/ic_send@3x.png differ diff --git a/GIGA/Category/UINavigationBar+Custom.m b/GIGA/Category/UINavigationBar+Custom.m index de5a2ce..8b47a96 100644 --- a/GIGA/Category/UINavigationBar+Custom.m +++ b/GIGA/Category/UINavigationBar+Custom.m @@ -57,7 +57,7 @@ static char overlayKey; -(void)setBackgroundImage{ - [self setBackgroundImage:[UIImage imageNamed:@""] forBarMetrics:UIBarMetricsDefault]; + [self setBackgroundImage:[UIImage imageNamed:@"nav_red_moment"] forBarMetrics:UIBarMetricsDefault]; } diff --git a/GIGA/Common/BaseVC/GiGaBaseViewController.h b/GIGA/Common/BaseVC/GiGaBaseViewController.h index 72484f9..0e92391 100644 --- a/GIGA/Common/BaseVC/GiGaBaseViewController.h +++ b/GIGA/Common/BaseVC/GiGaBaseViewController.h @@ -13,7 +13,7 @@ { UIView *_emptyView; GiGaNoNetWorkView *_noNetWorkView; - UITableView *_tableView; + } @property (nonatomic,strong) UIView * emptyView; diff --git a/GIGA/Common/BaseVC/GiGaBaseViewController.m b/GIGA/Common/BaseVC/GiGaBaseViewController.m index 4893918..c6b50c3 100644 --- a/GIGA/Common/BaseVC/GiGaBaseViewController.m +++ b/GIGA/Common/BaseVC/GiGaBaseViewController.m @@ -25,18 +25,21 @@ // Do any additional setup after loading the view. //[self.navigationController.navigationBar cnSetBackgroundColor:GIGARGB(216, 216, 216, 1)]; - + } +- (void)viewDidAppear:(BOOL)animated{ + [super viewDidAppear:animated]; + +} -(void)viewWillDisappear:(BOOL)animated{ [super viewWillDisappear:animated]; - + [self.navigationController.navigationBar setBackgroundImage]; } -(void)viewWillAppear:(BOOL)animated{ - [super viewWillAppear:animated]; - + } @@ -50,9 +53,6 @@ - (void)showNoNetWorkView { - - - // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ // if (self.currentNetworkStatus < 1) { // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2.f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ diff --git a/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.h b/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.h index 2eaf0ab..ea0b178 100644 --- a/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.h +++ b/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.h @@ -10,4 +10,8 @@ @interface GiGaNavTitileView : UIView - (id)initWithString:(NSString *)str frame:(CGRect)frame; +@property(nonatomic,copy) NSString *titleStr; +@property(nonatomic,strong) UILabel *navlabel; +@property(nonatomic,strong) UIColor *titleColor; + @end diff --git a/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.m b/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.m index 2724d3e..2135969 100644 --- a/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.m +++ b/GIGA/Common/GiGaNavTitileView/GiGaNavTitileView.m @@ -9,20 +9,45 @@ #import "GiGaNavTitileView.h" @implementation GiGaNavTitileView - +@synthesize titleStr = _titleStr; +@synthesize titleColor = _titleColor; - (id)initWithString:(NSString *)str frame:(CGRect)frame { if (self = [super initWithFrame:frame]) { - UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 44)]; - label.textColor = [UIColor whiteColor]; - label.text = str; - label.font = [UIFont fontWithName:@"PingFangSC-Medium" size:18.f]; - label.textAlignment = NSTextAlignmentCenter; - [self addSubview:label]; + self.titleStr = str; + [self creatTitle:frame]; } - return self; } +-(instancetype)initWithFrame:(CGRect)frame{ + if (self = [super initWithFrame:frame]) { + [self creatTitle:frame]; + } + return self; +} +-(void)creatTitle:(CGRect)frame{ + + UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, frame.size.width, 44)]; + label.textColor = [UIColor whiteColor]; + label.text = self.titleStr; + label.font = [UIFont fontWithName:@"PingFangSC-Medium" size:18.f]; + label.textAlignment = NSTextAlignmentCenter; + [self addSubview:label]; + self.navlabel = label; + +} + +- (void)setTitleStr:(NSString *)titleStr{ + + _titleStr = titleStr; + + self.navlabel.text = titleStr; +} + +-(void)setTitleColor:(UIColor *)titleColor{ + _titleColor = titleColor; + self.navlabel.textColor = _titleColor; +} @end diff --git a/GIGA/Common/Source/MaskTime.png b/GIGA/Common/Source/MaskTime.png index 76f739c..62b1352 100644 Binary files a/GIGA/Common/Source/MaskTime.png and b/GIGA/Common/Source/MaskTime.png differ diff --git a/GIGA/Common/Views/CustomSwitch/LXCustomSwith.h b/GIGA/Common/Views/CustomSwitch/LXCustomSwith.h new file mode 100644 index 0000000..8ffd2ff --- /dev/null +++ b/GIGA/Common/Views/CustomSwitch/LXCustomSwith.h @@ -0,0 +1,33 @@ +// +// LXCustomSwith.h +// CustomUISwitch +// +// Created by lianxiang on 2018/9/7. +// Copyright © 2018年 GIGA. All rights reserved. +// + +#import + +typedef NS_ENUM(NSInteger,LXCustomSwithShape){ + LXCustomSwithShapeNormal, + LXCustomSwithShapeRectangle, + LXCustomSwithShapeNoCorner +}; + +@interface LXCustomSwith : UIControl + +@property (nonatomic, getter = isOn) BOOL on; +@property (nonatomic, assign) LXCustomSwithShape shape; +@property (nonatomic, strong) UIColor *onTintColor; +@property (nonatomic, strong) UIColor *tintColor; +@property (nonatomic, strong) UIColor *thumbTintColor; +@property (nonatomic, assign) BOOL shadow; +@property (nonatomic, strong) UIColor *tintBorderColor; +@property (nonatomic, strong) UIColor *onTintBorderColor; +@property (nonatomic, strong) UILabel *onBackLabel;//打开时候的文字 +@property (nonatomic, strong) UILabel *offBackLabel;//关闭时候的文字 +@property (nonatomic, strong) UILabel *thumbLabel;// +@property (nonatomic,copy) NSString *onthumTitle; +@property (nonatomic,copy) NSString *offthumTitle; + +@end diff --git a/GIGA/Common/Views/CustomSwitch/LXCustomSwith.m b/GIGA/Common/Views/CustomSwitch/LXCustomSwith.m new file mode 100644 index 0000000..153efed --- /dev/null +++ b/GIGA/Common/Views/CustomSwitch/LXCustomSwith.m @@ -0,0 +1,403 @@ +// +// LXCustomSwith.m +// CustomUISwitch +// +// Created by lianxiang on 2018/9/7. +// Copyright © 2018年 GIGA. All rights reserved. +// + +#import "LXCustomSwith.h" +#import +#define VW(view) (view.frame.size.width) +#define VH(view) (view.frame.size.height) +static const CGFloat kAnimateDuration = 0.3f; +static const CGFloat kHorizontalAdjustment = 3.0f; +static const CGFloat kThumbShadowOpacity = 0.3f; +static const CGFloat kThumbShadowRadius = 0.5f; +static const CGFloat kSwitchBorderWidth = 1.75f; + +@interface LXCustomSwith() +@property (nonatomic, strong) UIView *onBackgroundView; +@property (nonatomic, strong) UIView *offBackgroundView; +@property (nonatomic, strong) UIView *thumbView; + + + +@end + +@implementation LXCustomSwith + +@synthesize onBackgroundView = _onBackgroundView; +@synthesize offBackgroundView = _offBackgroundView; +@synthesize thumbView = _thumbView; +@synthesize on = _on; +@synthesize shape = _shape; +@synthesize onTintColor = _onTintColor; +@synthesize tintColor = _tintColor; +@synthesize thumbTintColor = _thumbTintColor; +@synthesize shadow = _shadow; +@synthesize onTintBorderColor = _onTintBorderColor; +@synthesize tintBorderColor = _tintBorderColor; +@synthesize onBackLabel = _onBackLabel; +@synthesize offBackLabel = _offBackLabel; +@synthesize offthumTitle = _offthumTitle; +@synthesize onthumTitle = _onthumTitle; + +- (id)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + // Initialization code + [self setupUI]; + } + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)aDecoder{ + if (self = [super initWithCoder:aDecoder]) { + [self setupUI]; + } + return self; + +} + +- (void)setupUI +{ + + self.shape = LXCustomSwithShapeNormal; + + self.onBackgroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; + //打开背景 + [self.onBackgroundView.layer setCornerRadius:self.frame.size.height/2]; + [self.onBackgroundView.layer setShouldRasterize:YES]; + [self.onBackgroundView.layer setRasterizationScale:[UIScreen mainScreen].scale]; + self.onBackgroundView.backgroundColor = [UIColor redColor]; + [self addSubview:self.onBackgroundView]; + + // 关闭 + self.offBackgroundView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; + [self.offBackgroundView setBackgroundColor:[UIColor whiteColor]]; + [self.offBackgroundView.layer setCornerRadius:self.frame.size.height/2]; + [self.offBackgroundView.layer setShouldRasterize:YES]; + [self.offBackgroundView.layer setRasterizationScale:[UIScreen mainScreen].scale]; + [self addSubview:self.offBackgroundView]; + + self.thumbView = [[UIView alloc] init]; + [self.thumbView setUserInteractionEnabled:YES]; + [self.thumbView.layer setCornerRadius:(self.frame.size.height-kHorizontalAdjustment)/2]; + [self.thumbView.layer setShadowOffset:CGSizeMake(0, 1)]; + [self.thumbView.layer setShouldRasterize:YES]; + [self.thumbView.layer setShadowOpacity:kThumbShadowOpacity]; + [self.thumbView.layer setRasterizationScale:[UIScreen mainScreen].scale]; + self.thumbView.backgroundColor = [UIColor greenColor]; + [self addSubview:self.thumbView]; + + self.thumbLabel = [[UILabel alloc] init]; + self.thumbLabel.frame = CGRectMake(kHorizontalAdjustment, 0, self.frame.size.width, self.frame.size.height); + self.offthumTitle = @"关闭"; + self.thumbLabel.text = self.offthumTitle; + [self.thumbLabel sizeToFit]; + self.shadow = YES; + + + self.thumbView.frame = CGRectMake(0,0, self.thumbLabel.frame.size.width + self.frame.size.height, self.frame.size.height); + + self.thumbLabel.center = self.thumbView.center; + [self.thumbView addSubview:self.thumbLabel]; + + + // Default to OFF position + [self.thumbView setCenter:CGPointMake(self.thumbView.frame.size.width/2, self.frame.size.height/2)]; + + // Handle Thumb Tap Gesture + UITapGestureRecognizer *tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSwitchTap:)]; + [tapGestureRecognizer setDelegate:self]; + [self.thumbView addGestureRecognizer:tapGestureRecognizer]; + // Handle Background Tap Gesture + UITapGestureRecognizer *tapBgGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleBgTap:)]; + [tapBgGestureRecognizer setDelegate:self]; + [self addGestureRecognizer:tapBgGestureRecognizer]; + // Handle Thumb Pan Gesture + UIPanGestureRecognizer *panGestureRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)]; + [panGestureRecognizer setDelegate:self]; + [self.thumbView addGestureRecognizer:panGestureRecognizer]; + [self setOn:NO]; +} + +- (void)layoutSubviews{ + [super layoutSubviews]; + [self updateFrame]; +} + +-(void)updateFrame{ + + self.thumbLabel.frame = CGRectMake(kHorizontalAdjustment, 0, self.frame.size.width, self.frame.size.height); + [self.thumbLabel sizeToFit]; + self.thumbView.frame = CGRectMake(0,0, self.thumbLabel.frame.size.width + self.frame.size.height - 10, self.frame.size.height); + self.thumbLabel.center = self.thumbView.center; +} + + +- (BOOL)isOn +{ + return _on; +} + +- (void)setOn:(BOOL)on +{ + if (_on != on) + _on = on; + + if (_on) + { + [self.onBackgroundView setAlpha:1.0]; + self.offBackgroundView.transform = CGAffineTransformMakeScale(0.0, 0.0); + + self.thumbView.center = CGPointMake(self.onBackgroundView.frame.size.width - (self.thumbView.frame.size.width+kHorizontalAdjustment)/2, self.thumbView.center.y); + self.thumbLabel.text = self.onthumTitle; + } + else + { + [self.onBackgroundView setAlpha:0.0]; + self.offBackgroundView.transform = CGAffineTransformMakeScale(1.0, 1.0); + + self.thumbView.center = CGPointMake((self.thumbView.frame.size.width+kHorizontalAdjustment)/2, self.thumbView.center.y); + self.thumbLabel.text = self.offthumTitle; + } +} + +- (void)setShadow:(BOOL)showShadow +{ + if (_shadow != showShadow) + _shadow = showShadow; + + if (showShadow) + { + [self.thumbView.layer setShadowOffset:CGSizeMake(0, 1)]; + [self.thumbView.layer setShadowRadius:kThumbShadowRadius]; + [self.thumbView.layer setShadowOpacity:kThumbShadowOpacity]; + } + else + { + [self.thumbView.layer setShadowRadius:0.0]; + [self.thumbView.layer setShadowOpacity:0.0]; + } +} + +- (void)setOnTintColor:(UIColor *)color +{ + if (_onTintColor != color) + _onTintColor = color; + + [self.onBackgroundView setBackgroundColor:color]; +} + +- (void)setOnTintBorderColor:(UIColor *)color +{ + if (_onTintBorderColor != color) + _onTintBorderColor = color; + + [self.onBackgroundView.layer setBorderColor:color.CGColor]; + + if (color) + [self.onBackgroundView.layer setBorderWidth:kSwitchBorderWidth]; + else + [self.onBackgroundView.layer setBorderWidth:0.0]; +} + +- (void)setTintColor:(UIColor *)color +{ + if (_tintColor != color) + _tintColor = color; + + [self.offBackgroundView setBackgroundColor:color]; +} + +- (void)setTintBorderColor:(UIColor *)color +{ + if (_tintBorderColor != color) + _tintBorderColor = color; + + [self.offBackgroundView.layer setBorderColor:color.CGColor]; + + if (color) + [self.offBackgroundView.layer setBorderWidth:kSwitchBorderWidth]; + else + [self.offBackgroundView.layer setBorderWidth:0.0]; +} + +- (void)setThumbTintColor:(UIColor *)color +{ + if (_thumbTintColor != color) + _thumbTintColor = color; + + [self.thumbView setBackgroundColor:color]; +} + +- (void)setOnthumTitle:(NSString *)onthumTitle{ + + _onthumTitle = onthumTitle; + +} + +- (void)setOffthumTitle:(NSString *)offthumTitle{ + + _offthumTitle = offthumTitle; + self.thumbLabel.text = self.offthumTitle; +} + +#pragma mark - Animation +- (void)animateToDestination:(CGPoint)centerPoint withDuration:(CGFloat)duration switch:(BOOL)on +{ + [UIView animateWithDuration:duration + delay:0.0f + options:UIViewAnimationOptionCurveEaseOut + animations:^{ + self.thumbView.center = centerPoint; + + if (on) + { + [self.onBackgroundView setAlpha:1.0]; + } + else + { + [self.onBackgroundView setAlpha:0.0]; + } + + } + completion:^(BOOL finished) { + if (finished) + { + [self updateSwitch:on]; + } + + }]; + + [UIView animateWithDuration:duration + delay:0.0f + options:UIViewAnimationOptionCurveEaseOut + animations:^{ + if (on) + { + //打开方式:加动画 + // self.offBackgroundView.transform = CGAffineTransformMakeScale(0.0, 0.0); + [self.offBackgroundView setAlpha:0.0]; + } + else + { + // self.offBackgroundView.transform = CGAffineTransformMakeScale(1.0, 1.0); + [self.offBackgroundView setAlpha:1.0]; + } + + } + completion:^(BOOL finished) { + }]; +} + + +#pragma mark - Gesture Recognizers +- (void)handlePan:(UIPanGestureRecognizer *)recognizer +{ + CGPoint translation = [recognizer translationInView:self.thumbView]; + + // Check the new center to see if within the boud + CGPoint newCenter = CGPointMake(recognizer.view.center.x + translation.x, + recognizer.view.center.y); + if (newCenter.x < (recognizer.view.frame.size.width+kHorizontalAdjustment)/2 || newCenter.x > self.onBackgroundView.frame.size.width-(recognizer.view.frame.size.width+kHorizontalAdjustment)/2) + { + // New center is Out of bound. Animate to left or right position + if(recognizer.state == UIGestureRecognizerStateBegan || + recognizer.state == UIGestureRecognizerStateChanged) + { + CGPoint velocity = [recognizer velocityInView:self.thumbView]; + + if (velocity.x >= 0) + { + // Animate move to right + [self animateToDestination:CGPointMake(self.onBackgroundView.frame.size.width - (self.thumbView.frame.size.width+kHorizontalAdjustment)/2, recognizer.view.center.y) withDuration:kAnimateDuration switch:YES]; + } + else + { + // Animate move to left + [self animateToDestination:CGPointMake((self.thumbView.frame.size.width+kHorizontalAdjustment)/2, recognizer.view.center.y) withDuration:kAnimateDuration switch:NO]; + } + + } + + return; + } + + // Only allow vertical pan + recognizer.view.center = CGPointMake(recognizer.view.center.x + translation.x, + recognizer.view.center.y); + [recognizer setTranslation:CGPointMake(0, 0) inView:self.thumbView]; + + CGPoint velocity = [recognizer velocityInView:self.thumbView]; + + if(recognizer.state == UIGestureRecognizerStateEnded) + { + if (velocity.x >= 0) + { + if (recognizer.view.center.x < self.onBackgroundView.frame.size.width - (self.thumbView.frame.size.width+kHorizontalAdjustment)/2) + { + // Animate move to right + [self animateToDestination:CGPointMake(self.onBackgroundView.frame.size.width - (self.thumbView.frame.size.width+kHorizontalAdjustment)/2, recognizer.view.center.y) withDuration:kAnimateDuration switch:YES]; + } + } + else + { + // Animate move to left + [self animateToDestination:CGPointMake((self.thumbView.frame.size.width+kHorizontalAdjustment)/2, recognizer.view.center.y) withDuration:kAnimateDuration switch:NO]; + } + } +} + +- (void)handleSwitchTap:(UIPanGestureRecognizer *)recognizer +{ + if (recognizer.state == UIGestureRecognizerStateEnded) + { + if (self.isOn) + { + // Animate move to left + [self animateToDestination:CGPointMake((self.thumbView.frame.size.width+kHorizontalAdjustment)/2, recognizer.view.center.y) withDuration:kAnimateDuration switch:NO]; + } + else + { + // Animate move to right + [self animateToDestination:CGPointMake(self.onBackgroundView.frame.size.width - (self.thumbView.frame.size.width+kHorizontalAdjustment)/2, recognizer.view.center.y) withDuration:kAnimateDuration switch:YES]; + } + } +} + +- (void)handleBgTap:(UITapGestureRecognizer *)recognizer +{ + if (recognizer.state == UIGestureRecognizerStateEnded) + { + if (self.isOn) + { + // Animate move to left + [self animateToDestination:CGPointMake((self.thumbView.frame.size.width+kHorizontalAdjustment)/2, self.thumbView.center.y) withDuration:kAnimateDuration switch:NO]; + } + else + { + // Animate move to right + [self animateToDestination:CGPointMake(self.onBackgroundView.frame.size.width - (self.thumbView.frame.size.width+kHorizontalAdjustment)/2, self.thumbView.center.y) withDuration:kAnimateDuration switch:YES]; + } + } +} + + +- (void)updateSwitch:(BOOL)on +{ + if (_on != on) _on = on; + if (_on) { + self.thumbLabel.text = self.onthumTitle; + }else{ + self.thumbLabel.text = self.offthumTitle; + } + + [self sendActionsForControlEvents:UIControlEventValueChanged]; +} + + +@end diff --git a/GIGA/Modules/AppAD/GiGaAdDetailViewController/GiGaAdDetailViewController.h b/GIGA/Modules/AppAD/GiGaAdDetailViewController/GiGaAdDetailViewController.h index 70446e4..071f5bb 100644 --- a/GIGA/Modules/AppAD/GiGaAdDetailViewController/GiGaAdDetailViewController.h +++ b/GIGA/Modules/AppAD/GiGaAdDetailViewController/GiGaAdDetailViewController.h @@ -7,7 +7,7 @@ // #import - -@interface GiGaAdDetailViewController : UIViewController +#import "GiGaBaseViewController.h" +@interface GiGaAdDetailViewController : GiGaBaseViewController @end diff --git a/GIGA/Modules/AppAD/GiGaAdDetailViewController/GiGaAdDetailViewController.m b/GIGA/Modules/AppAD/GiGaAdDetailViewController/GiGaAdDetailViewController.m index a4f79c4..efcb3ac 100644 --- a/GIGA/Modules/AppAD/GiGaAdDetailViewController/GiGaAdDetailViewController.m +++ b/GIGA/Modules/AppAD/GiGaAdDetailViewController/GiGaAdDetailViewController.m @@ -16,8 +16,10 @@ - (void)viewDidLoad { [super viewDidLoad]; - self.title = @"广告详情"; + //self.title = @"广告详情"; + [self addNavTitile:@"广告详情"]; // Do any additional setup after loading the view. + } - (void)didReceiveMemoryWarning { diff --git a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m index ff73de4..472f68c 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.m @@ -14,6 +14,7 @@ #import "GiGaNetManager.h" #import "MBProgressHUD.h" #import "GiGaAttributedLabel.h" +#import "UINavigationBar+Custom.h" @interface GiGaRegistViewController () @property (weak, nonatomic) IBOutlet UITextField *phoneNumberTextField; @@ -42,14 +43,32 @@ [self.sendCodeBtn addTarget:self action:@selector(sendCodeBtnAction:) forControlEvents:UIControlEventTouchUpInside]; [self.registBtn addTarget:self action:@selector(registBtnAction:) forControlEvents:UIControlEventTouchUpInside]; [self.checkBtn addTarget:self action:@selector(checkBtnAction:) forControlEvents:UIControlEventTouchUpInside]; - + + [self resetBackimg]; } +-(void)resetBackimg{ + UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom]; + backBtn.frame = CGRectMake(0, 0, 40, 40); + [backBtn setImage:[UIImage imageNamed:@"nav_redback"] forState:UIControlStateNormal]; + [backBtn setImageEdgeInsets:UIEdgeInsetsMake(0,-14, 0, 14)]; + //backBtn.backgroundColor = [UIColor redColor]; + [backBtn addTarget:self action:@selector(backItemAction) forControlEvents:UIControlEventTouchUpInside]; + UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn]; + self.navigationItem.leftBarButtonItem = backItem; +} +-(void)backItemAction{ + + [self.navigationController popViewControllerAnimated:YES]; +} -(void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; +} +-(void)viewWillAppear:(BOOL)animated{ + [super viewWillAppear:animated]; + [self.navigationController.navigationBar setClearNav]; } - -(void)dealloc{ if (_timer) { [_timer unfireTimer]; @@ -114,8 +133,8 @@ -(void)confirmUI{ - self.useragreementLabel.highlightedTextColor = [UIColor lightGrayColor]; - self.useragreementLabel.textColor = GIGAUIColorFromRGBA(0x919191); + self.useragreementLabel.highlightedTextColor = GIGARGB(219, 23, 37, 1); + self.useragreementLabel.textColor = GIGARGB(145,145,145, 1); self.useragreementLabel.delegate = self; self.useragreementLabel.enabledTextCheckingTypes= NSTextCheckingTypePhoneNumber|NSTextCheckingTypeAddress|NSTextCheckingTypeLink; self.useragreementLabel.linkAttributes = [NSDictionary dictionaryWithObject:[NSNumber numberWithBool:NO] forKey:(NSString *)kCTUnderlineStyleAttributeName]; @@ -130,7 +149,7 @@ [mutableAttributedString addAttribute:(NSString *)kCTFontAttributeName value:(__bridge id)font range:fontRange]; - [mutableAttributedString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(__bridge id)[[UIColor colorWithRed:0/255.0 green:222/255.0 blue:189/255.0 alpha:1/1.0] CGColor] range:fontRange]; + [mutableAttributedString addAttribute:(NSString *)kCTForegroundColorAttributeName value:(__bridge id)[GIGARGB(219, 23, 37, 1) CGColor] range:fontRange]; } return mutableAttributedString; diff --git a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib index dea3d3a..0dbd7a6 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib +++ b/GIGA/Modules/LogIn/Controller/GiGaRegistViewController.xib @@ -72,7 +72,7 @@ - + @@ -91,7 +91,7 @@ diff --git a/GIGA/Modules/LogIn/Controller/GiGaWebViewController.m b/GIGA/Modules/LogIn/Controller/GiGaWebViewController.m index 9dd0332..d1f5d8e 100644 --- a/GIGA/Modules/LogIn/Controller/GiGaWebViewController.m +++ b/GIGA/Modules/LogIn/Controller/GiGaWebViewController.m @@ -10,6 +10,8 @@ #import "NJKWebViewProgressView.h" #import "NJKWebViewProgress.h" #import "UIView+Toast.h" +#import "GiGaNavTitileView.h" + @interface GiGaWebViewController () { NJKWebViewProgressView *_progressView; @@ -17,11 +19,12 @@ } @property (weak, nonatomic) IBOutlet UIWebView *webview; - +@property (nonatomic,strong) GiGaNavTitileView *navTitleView; @end @implementation GiGaWebViewController + - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. @@ -44,9 +47,12 @@ } -(void)viewWillAppear:(BOOL)animated{ + [super viewWillAppear:animated]; [self.navigationController.navigationBar addSubview:_progressView]; + } -(void)viewWillDisappear:(BOOL)animated{ + [super viewWillDisappear:animated]; [_progressView removeFromSuperview]; } -(void)loadWeb{ @@ -85,9 +91,21 @@ #pragma mark -NJKWebViewProgressDelegate -(void)webViewProgress:(NJKWebViewProgress *)webViewProgress updateProgress:(float)progress{ [_progressView setProgress:progress animated:YES]; - self.title = [_webview stringByEvaluatingJavaScriptFromString:@"document.title"]; - NSLog(@"%@",self.title); + NSString * title = [_webview stringByEvaluatingJavaScriptFromString:@"document.title"]; + //or + //[self addNavTitile:title]; + [self setnavTitle:title]; +} + +-(void)setnavTitle:(NSString *)title{ + if (!_navTitleView) { + _navTitleView = [[GiGaNavTitileView alloc] initWithFrame:CGRectMake(0, 0, 200, 44)]; + self.navigationItem.titleView = _navTitleView; + //[_navTitleView setTitleColor:[UIColor yellowColor]]; + } + + [_navTitleView setTitleStr:title]; } - (void)webViewDidStartLoad:(UIWebView *)webView{ diff --git a/GIGA/Modules/LogIn/Controller/PassWordResetVC.m b/GIGA/Modules/LogIn/Controller/PassWordResetVC.m index eaa5385..c7c0bc2 100644 --- a/GIGA/Modules/LogIn/Controller/PassWordResetVC.m +++ b/GIGA/Modules/LogIn/Controller/PassWordResetVC.m @@ -24,6 +24,7 @@ @implementation PassWordResetVC - (void)viewDidLoad { + [super viewDidLoad]; //self.title = @"重置密码"; [self addNavTitile:@"重置密码"]; @@ -31,6 +32,9 @@ _time = 60; [self.codeSendBtn addTarget:self action:@selector(codeSendBtnAction:) forControlEvents:UIControlEventTouchUpInside]; [self.confirmBtn addTarget:self action:@selector(confirmBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + + + } -(void)confirmUI{ diff --git a/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib b/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib index 05d6bd0..21f5a62 100644 --- a/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib +++ b/GIGA/Modules/LogIn/Controller/PassWordResetVC.xib @@ -65,7 +65,7 @@ diff --git a/GIGA/Modules/Mask/Controller/GiGaFlingCommitVC.m b/GIGA/Modules/Mask/Controller/GiGaFlingCommitVC.m index d4c650d..e174917 100644 --- a/GIGA/Modules/Mask/Controller/GiGaFlingCommitVC.m +++ b/GIGA/Modules/Mask/Controller/GiGaFlingCommitVC.m @@ -15,18 +15,64 @@ #import "IQKeyboardManager.h" #import #import "NSString+Unicode.h" +#import "GIGAMBHUDHelper.h" +#import "LXCustomSwith.h" //弹幕控制器 @interface GiGaFlingCommitVC () @property (nonatomic,strong) GiGaFlyingCommitInputView *commitInputView; @property (nonatomic,strong) SocketIOClient *client; @property (nonatomic,strong) SocketManager *manager; - +@property (nonatomic,strong) LXCustomSwith *danmuSwitch; @end @implementation GiGaFlingCommitVC +- (LXCustomSwith *)danmuSwitch{ + if (!_danmuSwitch) { + _danmuSwitch = [[LXCustomSwith alloc] initWithFrame:CGRectMake(KMainW - 50 - 25 , 64 + PhoneX_TopMargin +10, 50, 18)]; + + [_danmuSwitch setOffthumTitle:@"弹幕"]; + [_danmuSwitch setOnthumTitle:@"弹幕"]; + [_danmuSwitch setOnTintColor:GIGARGB(91, 0, 2, 1)]; + [_danmuSwitch setTintColor:GIGARGB(91, 0, 2, 1)]; + [_danmuSwitch setThumbTintColor:GIGARGB(203, 42, 50, 1)]; + _danmuSwitch.on = YES; + _danmuSwitch.thumbLabel.font = GIGA_TEXTFONTMEDIUM(10); + _danmuSwitch.thumbLabel.textColor = [UIColor whiteColor]; + [_danmuSwitch addTarget:self action:@selector(mycuntomSwitchAction:) forControlEvents:UIControlEventValueChanged]; + } + + return _danmuSwitch; +} + +- (GiGaFlyingCommitInputView *)commitInputView{ + + if (!_commitInputView) { + _commitInputView = [[GiGaFlyingCommitInputView alloc] initWithFrame:self.view.bounds]; + [_commitInputView setPalceholderText:@"请输入弹幕"]; + } + return _commitInputView; +} + +//弹幕按钮 + +-(void)mycuntomSwitchAction:(id)sender{ + + LXCustomSwith *nkswitch = (LXCustomSwith *)sender; + if (nkswitch.isOn) + NSLog(@"switchPressed ON"); + else + [self.manager disconnectSocket:self.client]; + [self.manager disconnect]; + [self.client disconnect]; + self.client = nil; + self.manager = nil; + [self dismissViewControllerAnimated:YES completion:nil]; + NSLog(@"switchPressed OFF"); +} + -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; NC_ADD_TARGET_NAME_OBJECT(self, @selector(maskTimeEnd), kUserNoti_MASKEND, nil); @@ -46,9 +92,13 @@ [super viewDidLoad]; // Do any additional setup after loading the view. - [self.view addSubview: self.commitInputView]; - weakify(self); + [self.view addSubview: self.commitInputView]; + [self.view addSubview:self.danmuSwitch]; + [self.view bringSubviewToFront:self.danmuSwitch]; + + + weakify(self); self.commitInputView.SendCommentHandler = ^(NSString *content) { GILog(@"发送->:%@",content); NSArray *arr = @[@{ @@ -62,7 +112,6 @@ }; //开启弹幕 - [[LXDanMuManager shareInstance] createDanmuWithTrackSpeedArray:@[@1.00,@1.00,@3.00,@4.00] centerY:KMainH / 4 trackWidth:KMainW showInView:self.view]; [[LXDanMuManager shareInstance] start]; //socket @@ -73,26 +122,27 @@ -(void)connetction{ NSURL* url = [[NSURL alloc] initWithString:@"http://wsyts.s1.natapp.cc"]; -// NSDictionary* headers = @{@"EncodeUTF8":@YES}; - SocketManager *manager = [[SocketManager alloc] initWithSocketURL:url config:@{@"log": @NO, @"forcePolling": @YES,@"connectParams":@{@"token":@""},@"doubleEncodeUTF8":@YES}]; - + SocketManager *manager = [[SocketManager alloc] initWithSocketURL:url config:@{@"log": @NO, @"forcePolling": @YES,@"connectParams":@{@"token":@""}}]; _manager = manager; _client = manager.defaultSocket; - [self.manager connect]; + weakify(self); [self.client on:@"connect" callback:^(NSArray* data, SocketAckEmitter* ack) { + GIGA_WIndowTost(@"客户端上线"); NSLog(@"*************\n\niOS客户端上线\n\n*************"); }]; [self.client on:@"connectedSocket" callback:^(NSArray * _Nonnull event, SocketAckEmitter * _Nonnull ack) { + [GIGAMBHUDHelper messageAddto:self.view title:@"弹幕链接成功"]; NSLog(@"connectedSocket:%@",event); + }]; - [self.client on:@"onTalk" callback:^(NSArray * _Nonnull envent, SocketAckEmitter * _Nonnull ack) { + [self.client on:@"onTalk" callback:^(NSArray * _Nonnull data, SocketAckEmitter * _Nonnull ack) { - NSString *json =envent[0]; + NSString *json =data[0]; NSLog(@"callback json***:%@",json); NSDictionary *dic = [GiGaHelper dictionaryWithJsonString:json]; @@ -105,11 +155,16 @@ } }]; + [self.client on:@"disconnect" callback:^(NSArray * _Nonnull event, SocketAckEmitter * _Nonnull ack) { + + GIGA_WIndowTost(@"客户端下线"); NSLog(@"*************\n\niOS客户端下线\n\n*************%@",event?event[0]:@""); }]; [self.client on:@"error" callback:^(NSArray * _Nonnull event, SocketAckEmitter * _Nonnull ack) { + + [GIGAMBHUDHelper messageAddto:self.view title:@"连接弹幕"]; // NSString *htmlString =event[0]; // htmlString = [self htmlEntityDecode:htmlString]; // @@ -119,17 +174,8 @@ // // NSLog(@"*************\n\n%@\n\n*************",event?event[0]:@""); GILog(@"请求超时"); - - }]; -} - -- (GiGaFlyingCommitInputView *)commitInputView{ - if (!_commitInputView) { - _commitInputView = [[GiGaFlyingCommitInputView alloc] initWithFrame:self.view.bounds]; - [_commitInputView setPalceholderText:@"请输入弹幕"]; - } - return _commitInputView; + }]; } @@ -156,13 +202,5 @@ NSLog(@"dealloc"); } -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ - [self.manager disconnectSocket:self.client]; - [self.manager disconnect]; - [self.client disconnect]; - self.client = nil; - self.manager = nil; - [self dismissViewControllerAnimated:YES completion:nil]; -} @end diff --git a/GIGA/Modules/Mask/Controller/GiGaMaskTaskViewController.m b/GIGA/Modules/Mask/Controller/GiGaMaskTaskViewController.m index 7da2025..24edc9d 100644 --- a/GIGA/Modules/Mask/Controller/GiGaMaskTaskViewController.m +++ b/GIGA/Modules/Mask/Controller/GiGaMaskTaskViewController.m @@ -81,7 +81,7 @@ if (!_cicleProgressView) { - _cicleProgressView = [[MaskTimeCircularProgressView alloc] initWithFrame:CGRectMake(100, 500, 136, 136) backColor:GIGARGB(22, 22, 22, 1) progressColor:[UIColor blueColor] lineWidth:10 timeinterval:10]; + _cicleProgressView = [[MaskTimeCircularProgressView alloc] initWithFrame:CGRectMake(100, 500, 136, 136) backColor:GIGARGB(88, 0, 2, 1) progressColor:[UIColor blueColor] lineWidth:10 timeinterval:10]; _cicleProgressView.delegate = self; _cicleProgressView.hidden = YES; @@ -133,7 +133,7 @@ return _waringView; } -//弹幕 +#pragma mark 弹幕 -(void)createInputView{ GiGaFlingCommitVC* GiGaFlingVC = [[GiGaFlingCommitVC alloc] init]; @@ -150,8 +150,10 @@ #pragma mark - 生命周期 -(void)viewWillAppear:(BOOL)animated{ [super viewWillAppear:animated]; + } + -(void)viewDidAppear:(BOOL)animated{ [super viewDidAppear:animated]; if([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) { @@ -174,7 +176,7 @@ - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. - + self.automaticallyAdjustsScrollViewInsets = NO; [self setUpNav]; [self initUI]; [self addNotify]; @@ -207,7 +209,7 @@ [self.view layoutIfNeeded]; [UIView animateWithDuration:1.0 animations:^{ [self.maskImageView mas_updateConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(self.attachPoint.y - 87); + make.top.mas_equalTo(self.attachPoint.y - 87 + 4); }]; [self.faceView mas_updateConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(self.attachPoint.y -124); @@ -290,6 +292,7 @@ make.size.mas_equalTo(CGSizeMake(117, 25)); make.centerX.mas_equalTo(self.view.mas_centerX); }]; + //startTest [self.startTestButton mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(self.view.mas_top).offset(486); @@ -297,25 +300,6 @@ make.centerX.mas_equalTo(self.view.mas_centerX); }]; - - -// UIButton *testBtn = [UIButton buttonWithType:UIButtonTypeCustom]; -// [testBtn setTitle:@"测试肤质" forState:UIControlStateNormal]; -// [testBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; -// testBtn.backgroundColor = [UIColor blueColor]; -// [testBtn addTarget:self action:@selector(testBtnAcion:) forControlEvents:UIControlEventTouchUpInside]; -// testBtn.layer.masksToBounds = YES; -// testBtn.layer.cornerRadius = 4; -// [self.view addSubview:testBtn]; -// -// [testBtn mas_makeConstraints:^(MASConstraintMaker *make) { -// make.centerX.mas_equalTo(self.view.mas_centerX); -// make.width.mas_equalTo(150); -// make.height.mas_equalTo(40); -// make.bottom.mas_equalTo(self.view.mas_bottom).offset(-130); -// }]; - - [self.view layoutIfNeeded]; CGFloat Y = CGRectGetMaxY(self.faceView.frame) + (CGRectGetMaxY(self.maskImageView.frame) - CGRectGetMaxY(self.faceView.frame)) / 2; CGFloat X = CGRectGetMidX(self.view.frame); @@ -374,11 +358,11 @@ MPMediaItemArtwork *arwork = [[MPMediaItemArtwork alloc] initWithImage:[UIImage imageNamed:@"MaskTime.png"]]; NSDictionary *dic = @{ MPMediaItemPropertyTitle:@"面膜时间", - MPMediaItemPropertyAlbumArtist:@"专辑专辑专辑专辑", - MPMediaItemPropertyArtist:@"lianxiang", - MPMediaItemPropertyAlbumTitle:@"hahah", + MPMediaItemPropertyAlbumArtist:@"面膜时间", + MPMediaItemPropertyArtist:@"敷膜中", + MPMediaItemPropertyAlbumTitle:@"敷膜中", MPMediaItemPropertyGenre:@"???", - MPMediaItemPropertyLyrics:@"歌词", + MPMediaItemPropertyLyrics:@"面膜", MPMediaItemPropertyPodcastTitle:@"PodcastTitle", MPMediaItemPropertyArtwork:arwork }; @@ -424,8 +408,8 @@ #pragma mark 开始测试 -(void)testBtnAcion:(UIButton *)btn{ - [self createInputView]; - return; +// [self createInputView]; +// return; BOOL isUserLogin = [GiGaUserDefault isUserLogin]; diff --git a/GIGA/Modules/Mask/View/GiGaFlyingCommitInputView.m b/GIGA/Modules/Mask/View/GiGaFlyingCommitInputView.m index 29ae811..0b0443c 100644 --- a/GIGA/Modules/Mask/View/GiGaFlyingCommitInputView.m +++ b/GIGA/Modules/Mask/View/GiGaFlyingCommitInputView.m @@ -7,6 +7,8 @@ // #import "GiGaFlyingCommitInputView.h" +static const CGFloat kInputViewH = 44.f; + @interface GiGaFlyingCommitInputView() @property(nonatomic,strong) UIView *commitInputView; @property(nonatomic,strong) UITextField * inputTextField; @@ -19,7 +21,7 @@ self = [super initWithFrame:frame]; if (self) { - self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1]; + //self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.1]; UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(dismissSelfViewTap)]; [self addGestureRecognizer:tap]; @@ -32,28 +34,41 @@ -(void)creatInputView{ - UIView *commitView =[[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - 60, self.bounds.size.width, 60)]; -// commitView.frame = CGRectMake(0, self.frame.size.height-commitView.frame.size.height, self.frame.size.width, commitView.frame.size.height); + UIView *commitView =[[UIView alloc] initWithFrame:CGRectMake(0, self.bounds.size.height - kInputViewH, self.bounds.size.width, kInputViewH)]; + self.commitInputView = commitView; - self.commitInputView.backgroundColor = [UIColor redColor]; + self.commitInputView.backgroundColor = GIGARGB(241, 241, 241, 1); [self addSubview:self.commitInputView]; UIButton *sendBtn = [UIButton buttonWithType:UIButtonTypeCustom]; - CGFloat topMargin = 5; + CGFloat leftMargin = 10; - sendBtn.frame = CGRectMake(self.frame.size.width - leftMargin - 60,topMargin,60,40); + sendBtn.frame = CGRectMake(self.frame.size.width - leftMargin - 60,commitView.frame.size.height /2 - 20,60,40); [sendBtn addTarget:self action:@selector(sendBtnAction:) forControlEvents:UIControlEventTouchUpInside]; - [sendBtn setTitle:@"发送" forState:UIControlStateNormal]; + //[sendBtn setTitle:@"发送" forState:UIControlStateNormal]; + [sendBtn setImage:[UIImage imageNamed:@"ic_send"] forState:UIControlStateNormal]; [sendBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; - sendBtn.backgroundColor = [UIColor purpleColor]; sendBtn.layer.masksToBounds = YES; sendBtn.layer.cornerRadius = 4; [commitView addSubview:sendBtn]; - UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(10, 5,self.frame.size.width - sendBtn.frame.size.width - 10*2 - 5, 30)]; - textField.backgroundColor = [UIColor lightGrayColor]; + UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(44, commitView.frame.size.height /2 -15,self.frame.size.width - sendBtn.frame.size.width - 44 - 10 - leftMargin, 30)]; + textField.backgroundColor = [UIColor whiteColor]; + textField.placeholder = @"请输入弹幕"; + textField.layer.shadowColor = GIGARGB(190, 190, 190, 1).CGColor; + textField.layer.shadowOffset = CGSizeMake(5, 5); + textField.layer.shadowOpacity = 0.5; + textField.layer.shadowRadius = 4; + + textField.layer.masksToBounds = YES; + textField.layer.cornerRadius = 2; + textField.layer.borderWidth = 1; + textField.layer.borderColor = [UIColor whiteColor].CGColor; textField.clearButtonMode = UITextFieldViewModeWhileEditing; textField.delegate = self; textField.returnKeyType = UIReturnKeySend; + UIView *textLeftview = [[UIView alloc] initWithFrame:CGRectMake(0, 0,10, textField.frame.size.height)]; + textField.leftView = textLeftview; + textField.leftViewMode = UITextFieldViewModeAlways; [commitView addSubview:textField]; self.inputTextField = textField; @@ -155,7 +170,7 @@ - (void) keyboardWillHide:(NSNotification *)note { - self.commitInputView.frame = CGRectMake(0, self.bounds.size.height - 60, self.bounds.size.width, 60); + self.commitInputView.frame = CGRectMake(0, self.bounds.size.height - kInputViewH, self.bounds.size.width, kInputViewH); } - (void)dealloc diff --git a/GIGA/Modules/Mask/View/MaskTimeCircularProgressView.m b/GIGA/Modules/Mask/View/MaskTimeCircularProgressView.m index 6ddf4fa..720e60f 100644 --- a/GIGA/Modules/Mask/View/MaskTimeCircularProgressView.m +++ b/GIGA/Modules/Mask/View/MaskTimeCircularProgressView.m @@ -78,7 +78,6 @@ _countLabel.outLineColor = [UIColor whiteColor]; _countLabel.blurColor = [UIColor whiteColor]; _countLabel.oinsideColor = [UIColor whiteColor]; - _countLabel.text = @"00:00"; _countLabel.font = [UIFont fontWithName:GIGA_FONTBOLD size:22]; } @@ -86,6 +85,7 @@ } - (void)setLineWidth:(CGFloat)lineWidth{ + CAShapeLayer *backgroundLayer = [self createRingLayerWithCenter:CGPointMake(CGRectGetWidth(self.frame) / 2, CGRectGetHeight(self.frame) / 2) radius:CGRectGetWidth(self.bounds) / 2 - lineWidth / 2 lineWidth:lineWidth color:self.backColor]; _lineWidth = lineWidth; [self.layer addSublayer:backgroundLayer]; @@ -102,7 +102,7 @@ CAGradientLayer *gradientLayer1 = [CAGradientLayer layer]; gradientLayer1.frame = CGRectMake(0, 0, width, height); - gradientLayer1.colors = @[(__bridge id) [UIColor colorWithRed:151/255.0 green:253/255.0 blue:255/255.0 alpha:1/1.0].CGColor,(__bridge id)[UIColor colorWithRed:165/255.0 green:81/255.0 blue:216/255.0 alpha:1/1.0].CGColor]; + gradientLayer1.colors = @[(__bridge id) [UIColor colorWithRed:255/255.0 green:107/255.0 blue:107/255.0 alpha:1/1.0].CGColor,(__bridge id)[UIColor colorWithRed:187/255.0 green:79/255.0 blue:253/255.0 alpha:1/1.0].CGColor]; //纵向变化 gradientLayer1.startPoint = CGPointMake(0.5, 0);