70 Commits

Author SHA1 Message Date
Artem Kislitsyn 1af7dcbbfd fix misspelling 2014-11-10 16:41:55 +03:00
Artem Kislitsyn c69dac49de clean an rename 2014-11-10 16:15:28 +03:00
Artem Kislitsyn d696da3975 clean and rename 2014-11-10 15:25:43 +03:00
Artem Kislitsyn 5e4659defb clean project 2014-11-08 09:07:00 +03:00
Artem Kislitsyn 287cc8744c rake 2014-11-08 06:02:16 +03:00
Artem Kislitsyn b6e01aba13 minor 2014-11-08 05:52:44 +03:00
Artem Kislitsyn 98c5249ded move 2014-11-07 22:42:02 +03:00
Artem Kislitsyn b830b211b5 fix storyboard 2014-11-07 20:16:15 +03:00
Artem Kislitsyn 5e43edd33c clean println 2014-11-07 17:07:15 +03:00
Artem Kislitsyn f017f66db0 sdk 2014-11-07 13:22:24 +03:00
Artem Kislitsyn a3aa546007 minor 2014-11-07 13:18:39 +03:00
Artem Kislitsyn e3e89a1ab5 minor 2014-11-07 13:18:21 +03:00
Artem Kislitsyn 2d84a2ee48 sdk 2014-11-07 13:11:12 +03:00
Artem Kislitsyn 645d8d61c0 rake 2014-11-07 12:54:13 +03:00
Artem Kislitsyn b7788e4c5f minor 2014-11-07 12:05:01 +03:00
Artem Kislitsyn 635e7faa34 rake 2014-11-07 11:17:48 +03:00
Artem Kislitsyn 5a5c5dcf4d rake 2014-11-07 11:15:02 +03:00
Artem Kislitsyn 8546874916 rakefile 2014-11-07 10:51:37 +03:00
Artem Kislitsyn dd547a3caa minor 2014-11-07 08:16:27 +03:00
Artem Kislitsyn 4ab0c2ea86 minor 2014-11-07 08:12:34 +03:00
Artem Kislitsyn 7d1f5975d1 minoe 2014-11-07 00:50:56 +03:00
Artem Kislitsyn 0119fad3a4 travis update 2014-11-07 00:42:53 +03:00
Artem Kislitsyn 9bcb4fc08c fix travis 2014-11-06 22:05:18 +03:00
Artem Kislitsyn 23c34310dc update readme 2014-11-06 22:03:41 +03:00
Artem Kislitsyn 6e6d7866f1 minor 2014-11-06 22:00:19 +03:00
Artem Kislitsyn 3c93bd1119 clean code 2014-11-06 21:54:27 +03:00
Artem Kislitsyn 1e29da03c4 fix specification plist 2014-11-06 21:43:25 +03:00
Artem Kislitsyn c2bd3fd5c3 clean code, refatctor 2014-11-06 18:35:36 +03:00
Artem Kislitsyn 182a3f1f0f fix images default states 2014-11-06 18:25:52 +03:00
Artem Kislitsyn e233dabdfe fix title 2014-11-06 17:39:04 +03:00
Artem Kislitsyn 4da43bcd98 fix color for each state 2014-11-06 17:15:18 +03:00
Artem Kislitsyn d51e255bc8 fix travis file 2014-11-06 15:29:40 +03:00
Artem Kislitsyn 0fbd37ca95 shared sheme 2014-11-06 15:22:09 +03:00
Artem Kislitsyn 1c741d54a7 fix 2014-11-06 15:00:01 +03:00
Artem Kislitsyn 975aaf7010 minor 2014-11-06 14:47:30 +03:00
Artem Kislitsyn 91ef1690aa travis yml 2014-11-06 14:04:27 +03:00
Artem Kislitsyn dd6686a287 yesterday update readme fix and fix some bugs 2014-11-06 06:47:27 +03:00
Artem Kislitsyn 43b854d72f update 2014-11-05 18:25:14 +03:00
Artem Kislitsyn 4dd9675c11 update readme 2014-11-05 18:22:29 +03:00
Artem Kislitsyn 8d82dff58b fix serialization images bug 2014-11-05 15:44:48 +03:00
Artem Kislitsyn 004f42136a change format 2014-11-05 12:20:21 +03:00
Artem Kislitsyn 9d46f86b58 fix plist fix bugs 2014-11-05 11:44:37 +03:00
Artem Kislitsyn 9eccb3272a plist update 2014-11-04 19:35:10 +03:00
Artem Kislitsyn b56be3a215 minor fix 2014-11-04 19:32:56 +03:00
Artem Kislitsyn afdc370b5c minor 2014-11-04 19:26:10 +03:00
Artem Kislitsyn 030f08537c Deseraialize to ApperanceObject 2014-11-04 18:11:04 +03:00
Artem Kislitsyn 296859d7ff dictionary serilizator 2014-11-04 12:54:25 +03:00
Artem Kislitsyn 3a116e77ba Apearance seriliztion with tests 2014-11-03 20:48:17 +03:00
Artem Kislitsyn 984da055fc add serialization controlStateValue 2014-11-03 16:49:03 +03:00
Artem Kislitsyn 56d331ffeb test control 2014-11-03 12:25:59 +03:00
Artem Kislitsyn cba3741ad0 system types to dictionary 2014-11-01 12:58:44 +03:00
Artem Kislitsyn 16f519c8a4 font deseraliation 2014-10-31 21:10:58 +03:00
Artem Kislitsyn 73c9d6d5ec deserealistaion method 2014-10-31 19:16:17 +03:00
Artem Kislitsyn eaeb885f19 serilization 2014-10-31 15:13:11 +03:00
Artem Kislitsyn ddf851bf46 fix bugs 2014-10-31 11:36:55 +03:00
Artem Kislitsyn be076751c8 fix testst 2014-10-30 20:12:59 +03:00
Artem Kislitsyn 0f68711a98 fix smaltite state 2014-10-30 20:07:20 +03:00
Artem Kislitsyn a30e5388e5 fix images 2014-10-30 19:07:47 +03:00
Artem Kislitsyn d27d437e93 clean code 2014-10-30 14:19:37 +03:00
Artem Kislitsyn 6e1a2e4908 fix minor 2014-10-29 21:54:36 +03:00
Artem Kislitsyn 46467d44d3 part setting refactored 2014-10-29 21:52:20 +03:00
Artem Kislitsyn 78d6ad7769 reimplement some propertice of Adaptive controller 2014-10-29 21:14:25 +03:00
Artem Kislitsyn e6a282db55 fix issue 2014-10-29 18:22:55 +03:00
Artem Kislitsyn a25dc67f0b minor 2014-10-29 16:37:36 +03:00
Artem Kislitsyn 35a949661a minor 2014-10-28 21:08:31 +03:00
Artem Kislitsyn 42738ac663 test for new functionality 2014-10-28 19:08:47 +03:00
Artem Kislitsyn d744048ae8 redesign arhichecture 2014-10-23 09:58:50 +04:00
Artem Kislitsyn 4ee86d0bba fizx protocols 2014-10-22 12:43:32 +04:00
Artem Kislitsyn 6b768ba24b serizable protocol 2014-10-22 12:32:16 +04:00
Artem Kislitsyn 40b465d515 new structur 2014-10-22 11:47:19 +04:00
168 changed files with 3273 additions and 1533 deletions
+6
View File
@@ -0,0 +1,6 @@
language: objective-c
script: "rake test:ios"
#xcode_project: AdaptiveController/AdaptiveController.xcodeproj # path to your xcodeproj folder
#xcode_scheme: AdaptiveController
#xcode_project: AdaptiveController/AdaptiveController.xcodeproj # path to your xcodeproj folder
#xcode_scheme: AdaptiveControllerTests
@@ -7,11 +7,12 @@
objects = {
/* Begin PBXBuildFile section */
6A156E3E1A08B38E002A69AD /* DictioanarySerializer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A156E3D1A08B38E002A69AD /* DictioanarySerializer.swift */; };
6A36BD4219FFDEDA00C19F61 /* ControlStateValueTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A36BD4119FFDEDA00C19F61 /* ControlStateValueTest.swift */; };
6A3E3A1C19E05E5B00C7504B /* AdaptiveLaunchesState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A3E3A1B19E05E5B00C7504B /* AdaptiveLaunchesState.swift */; };
6A3ED0CA19ED02DA006F06DD /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A3ED0C919ED02DA006F06DD /* DateExtension.swift */; };
6A3ED0CC19ED058F006F06DD /* AdaptiveDateStateTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A3ED0CB19ED058F006F06DD /* AdaptiveDateStateTest.swift */; };
6A3ED0CE19ED05D8006F06DD /* AdaptiveLaunchesStateTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A3ED0CD19ED05D8006F06DD /* AdaptiveLaunchesStateTest.swift */; };
6A6270A619F1653900D02B1A /* watch@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6A6270A519F1653900D02B1A /* watch@2x.png */; };
6AAE857719D329C6005672CA /* AdaptiveButtonAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AAE857319D329C6005672CA /* AdaptiveButtonAppearance.swift */; };
6AAE857819D329C6005672CA /* AdaptiveButtonsStateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AAE857419D329C6005672CA /* AdaptiveButtonsStateManager.swift */; };
6AAE857919D329C6005672CA /* AdaptiveDateState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AAE857519D329C6005672CA /* AdaptiveDateState.swift */; };
@@ -19,16 +20,33 @@
6AD1EC2619EFA9BA003F36A4 /* ControlStateValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD1EC2519EFA9BA003F36A4 /* ControlStateValue.swift */; };
6AD1EC2919EFB8E2003F36A4 /* ControlStateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD1EC2819EFB8E2003F36A4 /* ControlStateProtocol.swift */; };
6AD1EC2B19F1165E003F36A4 /* TestTabBarItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD1EC2A19F1165E003F36A4 /* TestTabBarItem.swift */; };
6AD4002719F7896900630034 /* ButtonStateAppearanceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD4002619F7896900630034 /* ButtonStateAppearanceProtocol.swift */; };
6AD4002919F792FA00630034 /* ControlStateAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD4002819F792FA00630034 /* ControlStateAppearance.swift */; };
6AD4002B19F7A0B800630034 /* AppearanceSerializationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD4002A19F7A0B800630034 /* AppearanceSerializationProtocol.swift */; };
6AE723351A04EE6F003416B6 /* ControlStateAppearanceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AE723341A04EE6F003416B6 /* ControlStateAppearanceTest.swift */; };
6AE723381A04F7AE003416B6 /* AdaptiveDateState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AAE857519D329C6005672CA /* AdaptiveDateState.swift */; };
6AE723391A04F7B1003416B6 /* AdaptiveLaunchesState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A3E3A1B19E05E5B00C7504B /* AdaptiveLaunchesState.swift */; };
6AE7233A1A04F7B4003416B6 /* AdaptiveButtonsStateManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AAE857419D329C6005672CA /* AdaptiveButtonsStateManager.swift */; };
6AE7233B1A04F7B6003416B6 /* AdaptiveButtonAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AAE857319D329C6005672CA /* AdaptiveButtonAppearance.swift */; };
6AE7233C1A04F7BA003416B6 /* ControlStateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD1EC2819EFB8E2003F36A4 /* ControlStateProtocol.swift */; };
6AE7233D1A04F7BD003416B6 /* ButtonStateAppearanceProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD4002619F7896900630034 /* ButtonStateAppearanceProtocol.swift */; };
6AE7233E1A04F7BF003416B6 /* AppearanceSerializationProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD4002A19F7A0B800630034 /* AppearanceSerializationProtocol.swift */; };
6AE7233F1A04F7C3003416B6 /* ControlStateValue.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD1EC2519EFA9BA003F36A4 /* ControlStateValue.swift */; };
6AE723401A04F7E5003416B6 /* AdaptiveState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AAE857619D329C6005672CA /* AdaptiveState.swift */; };
6AE723411A04F7ED003416B6 /* ControlStateAppearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD4002819F792FA00630034 /* ControlStateAppearance.swift */; };
6AE723431A078071003416B6 /* ColorExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AE723421A078071003416B6 /* ColorExtension.swift */; };
6AE723451A07C8E1003416B6 /* AdaptiveButtonAppearanceTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AE723441A07C8E1003416B6 /* AdaptiveButtonAppearanceTest.swift */; };
6AFBC6D719D313D600D42578 /* AdaptiveController.h in Headers */ = {isa = PBXBuildFile; fileRef = 6AFBC6D619D313D600D42578 /* AdaptiveController.h */; settings = {ATTRIBUTES = (Public, ); }; };
6AFBC6E119D313D600D42578 /* AdaptiveControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AFBC6E019D313D600D42578 /* AdaptiveControllerTests.swift */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
6A156E3D1A08B38E002A69AD /* DictioanarySerializer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DictioanarySerializer.swift; sourceTree = "<group>"; };
6A36BD4119FFDEDA00C19F61 /* ControlStateValueTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlStateValueTest.swift; sourceTree = "<group>"; };
6A3E3A1B19E05E5B00C7504B /* AdaptiveLaunchesState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdaptiveLaunchesState.swift; sourceTree = "<group>"; };
6A3ED0C919ED02DA006F06DD /* DateExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = DateExtension.swift; path = "../../Samples/adaptive-dates-tabbar/adaptive-tab-bar/DateExtension.swift"; sourceTree = "<group>"; };
6A3ED0CB19ED058F006F06DD /* AdaptiveDateStateTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdaptiveDateStateTest.swift; sourceTree = "<group>"; };
6A3ED0CD19ED05D8006F06DD /* AdaptiveLaunchesStateTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdaptiveLaunchesStateTest.swift; sourceTree = "<group>"; };
6A6270A519F1653900D02B1A /* watch@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "watch@2x.png"; sourceTree = "<group>"; };
6AAE857319D329C6005672CA /* AdaptiveButtonAppearance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdaptiveButtonAppearance.swift; sourceTree = "<group>"; };
6AAE857419D329C6005672CA /* AdaptiveButtonsStateManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdaptiveButtonsStateManager.swift; sourceTree = "<group>"; };
6AAE857519D329C6005672CA /* AdaptiveDateState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdaptiveDateState.swift; sourceTree = "<group>"; };
@@ -36,6 +54,12 @@
6AD1EC2519EFA9BA003F36A4 /* ControlStateValue.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlStateValue.swift; sourceTree = "<group>"; };
6AD1EC2819EFB8E2003F36A4 /* ControlStateProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlStateProtocol.swift; sourceTree = "<group>"; };
6AD1EC2A19F1165E003F36A4 /* TestTabBarItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TestTabBarItem.swift; sourceTree = "<group>"; };
6AD4002619F7896900630034 /* ButtonStateAppearanceProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonStateAppearanceProtocol.swift; sourceTree = "<group>"; };
6AD4002819F792FA00630034 /* ControlStateAppearance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlStateAppearance.swift; sourceTree = "<group>"; };
6AD4002A19F7A0B800630034 /* AppearanceSerializationProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppearanceSerializationProtocol.swift; sourceTree = "<group>"; };
6AE723341A04EE6F003416B6 /* ControlStateAppearanceTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ControlStateAppearanceTest.swift; sourceTree = "<group>"; };
6AE723421A078071003416B6 /* ColorExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ColorExtension.swift; sourceTree = "<group>"; };
6AE723441A07C8E1003416B6 /* AdaptiveButtonAppearanceTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdaptiveButtonAppearanceTest.swift; sourceTree = "<group>"; };
6AFBC6D119D313D600D42578 /* AdaptiveController.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AdaptiveController.framework; sourceTree = BUILT_PRODUCTS_DIR; };
6AFBC6D519D313D600D42578 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6AFBC6D619D313D600D42578 /* AdaptiveController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AdaptiveController.h; sourceTree = "<group>"; };
@@ -62,6 +86,14 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
6A156E3C1A08B322002A69AD /* Serializator */ = {
isa = PBXGroup;
children = (
6A156E3D1A08B38E002A69AD /* DictioanarySerializer.swift */,
);
name = Serializator;
sourceTree = "<group>";
};
6AAE857B19D329E0005672CA /* CustomAdaptiveStates */ = {
isa = PBXGroup;
children = (
@@ -91,12 +123,22 @@
6AD1EC2719EFB521003F36A4 /* ControlStates */ = {
isa = PBXGroup;
children = (
6AD1EC2819EFB8E2003F36A4 /* ControlStateProtocol.swift */,
6AD1EC2519EFA9BA003F36A4 /* ControlStateValue.swift */,
6AD4002819F792FA00630034 /* ControlStateAppearance.swift */,
);
name = ControlStates;
sourceTree = "<group>";
};
6AD4002C19F7A12200630034 /* Protocols */ = {
isa = PBXGroup;
children = (
6AD4002A19F7A0B800630034 /* AppearanceSerializationProtocol.swift */,
6AD4002619F7896900630034 /* ButtonStateAppearanceProtocol.swift */,
6AD1EC2819EFB8E2003F36A4 /* ControlStateProtocol.swift */,
);
name = Protocols;
sourceTree = "<group>";
};
6AFBC6C719D313D600D42578 = {
isa = PBXGroup;
children = (
@@ -118,6 +160,9 @@
6AFBC6D319D313D600D42578 /* AdaptiveController */ = {
isa = PBXGroup;
children = (
6AE723421A078071003416B6 /* ColorExtension.swift */,
6A156E3C1A08B322002A69AD /* Serializator */,
6AD4002C19F7A12200630034 /* Protocols */,
6AD1EC2719EFB521003F36A4 /* ControlStates */,
6AD1EC2319EFA903003F36A4 /* Appearance */,
6AAE857C19D32A14005672CA /* AdaptiveStates */,
@@ -139,12 +184,14 @@
6AFBC6DD19D313D600D42578 /* AdaptiveControllerTests */ = {
isa = PBXGroup;
children = (
6A6270A519F1653900D02B1A /* watch@2x.png */,
6AE723441A07C8E1003416B6 /* AdaptiveButtonAppearanceTest.swift */,
6AE723341A04EE6F003416B6 /* ControlStateAppearanceTest.swift */,
6A3ED0C919ED02DA006F06DD /* DateExtension.swift */,
6AFBC6E019D313D600D42578 /* AdaptiveControllerTests.swift */,
6A3ED0CB19ED058F006F06DD /* AdaptiveDateStateTest.swift */,
6A3ED0CD19ED05D8006F06DD /* AdaptiveLaunchesStateTest.swift */,
6AD1EC2A19F1165E003F36A4 /* TestTabBarItem.swift */,
6A36BD4119FFDEDA00C19F61 /* ControlStateValueTest.swift */,
6AFBC6DE19D313D600D42578 /* Supporting Files */,
);
path = AdaptiveControllerTests;
@@ -254,7 +301,6 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6A6270A619F1653900D02B1A /* watch@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -266,12 +312,17 @@
buildActionMask = 2147483647;
files = (
6AAE857819D329C6005672CA /* AdaptiveButtonsStateManager.swift in Sources */,
6AD4002919F792FA00630034 /* ControlStateAppearance.swift in Sources */,
6A3E3A1C19E05E5B00C7504B /* AdaptiveLaunchesState.swift in Sources */,
6AAE857719D329C6005672CA /* AdaptiveButtonAppearance.swift in Sources */,
6AD4002B19F7A0B800630034 /* AppearanceSerializationProtocol.swift in Sources */,
6AD1EC2619EFA9BA003F36A4 /* ControlStateValue.swift in Sources */,
6AAE857919D329C6005672CA /* AdaptiveDateState.swift in Sources */,
6AD1EC2919EFB8E2003F36A4 /* ControlStateProtocol.swift in Sources */,
6A156E3E1A08B38E002A69AD /* DictioanarySerializer.swift in Sources */,
6AAE857A19D329C6005672CA /* AdaptiveState.swift in Sources */,
6AE723431A078071003416B6 /* ColorExtension.swift in Sources */,
6AD4002719F7896900630034 /* ButtonStateAppearanceProtocol.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -279,11 +330,24 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6AE723411A04F7ED003416B6 /* ControlStateAppearance.swift in Sources */,
6AE723351A04EE6F003416B6 /* ControlStateAppearanceTest.swift in Sources */,
6AE7233B1A04F7B6003416B6 /* AdaptiveButtonAppearance.swift in Sources */,
6AD1EC2B19F1165E003F36A4 /* TestTabBarItem.swift in Sources */,
6AE7233D1A04F7BD003416B6 /* ButtonStateAppearanceProtocol.swift in Sources */,
6AE723391A04F7B1003416B6 /* AdaptiveLaunchesState.swift in Sources */,
6A3ED0CE19ED05D8006F06DD /* AdaptiveLaunchesStateTest.swift in Sources */,
6AE7233F1A04F7C3003416B6 /* ControlStateValue.swift in Sources */,
6AE7233E1A04F7BF003416B6 /* AppearanceSerializationProtocol.swift in Sources */,
6AE723451A07C8E1003416B6 /* AdaptiveButtonAppearanceTest.swift in Sources */,
6A3ED0CA19ED02DA006F06DD /* DateExtension.swift in Sources */,
6A3ED0CC19ED058F006F06DD /* AdaptiveDateStateTest.swift in Sources */,
6AFBC6E119D313D600D42578 /* AdaptiveControllerTests.swift in Sources */,
6A36BD4219FFDEDA00C19F61 /* ControlStateValueTest.swift in Sources */,
6AE7233C1A04F7BA003416B6 /* ControlStateProtocol.swift in Sources */,
6AE723401A04F7E5003416B6 /* AdaptiveState.swift in Sources */,
6AE723381A04F7AE003416B6 /* AdaptiveDateState.swift in Sources */,
6AE7233A1A04F7B4003416B6 /* AdaptiveButtonsStateManager.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -395,6 +459,7 @@
INFOPLIST_FILE = AdaptiveController/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_SWIFT_FLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "";
@@ -415,6 +480,7 @@
INFOPLIST_FILE = AdaptiveController/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
OTHER_SWIFT_FLAGS = "";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "";
@@ -4,12 +4,12 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>AdaptiveController.xcscheme</key>
<key>AdaptiveController.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>AdaptiveControllerTests.xcscheme</key>
<key>AdaptiveControllerTests.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
@@ -0,0 +1,379 @@
//
// AdaptiveButtonApperance.swift
// AdaptiveTabBarControllerSample
//
// Created by Arcilite on 18.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
public let defaultFont = UIFont(name: "Helvetica", size: 14.0)
public let kNotTitle = ""
public class AdaptiveButtonAppearance: NSObject,AppearanceSerializationProtocol {
public typealias StateObject = ControlStateValue
public typealias DictionaryObject = Dictionary <String,AnyObject>
private var stateDictionary:Dictionary <String,ControlStateValue> = Dictionary<String,ControlStateValue>()
public func setAllCommonApperanceFrom(adaptiveButtonApperance:AdaptiveButtonAppearance){
for (state, object) in adaptiveButtonApperance.stateDictionary {
self.stateDictionary.updateValue(ControlStateValue(styleValueStates: object), forKey: state)
}
}
public func setImageNamesForStatesImageExtesions(imageName :String ,imageExtensionsForState:Dictionary <String,String>){
setImageNamesForStatesImageExtesions(imageName, imageExtensionsForState: imageExtensionsForState, controlState:UIControlState.Normal)
setImageNamesForStatesImageExtesions(imageName, imageExtensionsForState: imageExtensionsForState, controlState:UIControlState.Highlighted)
setImageNamesForStatesImageExtesions(imageName, imageExtensionsForState: imageExtensionsForState, controlState:UIControlState.Selected)
}
public func setImageNamesForStatesImageExtesions(imageName :String ,imageExtensionsForState:Dictionary <String,String>, controlState:UIControlState) {
self.setButtonImage(UIImage(named: imageName)!, state: kDefaultAdaptiveState)
for (state,imageExtension) in imageExtensionsForState {
self.setButtonImage(UIImage(named: imageName+imageExtension)!, state: state ,controlState:controlState)
self.setButtonImageName(imageName,state: state ,controlState:controlState)
}
}
func getStateObjectForState(state:String) -> ControlStateValue!{
if let stateObject = stateDictionary[state] {
return stateObject
}else{
return nil
}
}
func getOrCreateStateObjectForState(state:String) -> ControlStateValue!{
if let stateObject = stateDictionary[state] {
return stateObject
}else{
var stateObject = ControlStateValue()
stateDictionary.updateValue(stateObject, forKey: state)
return stateObject
}
}
func getOrCreateStateAppearenceObject(controlStateValueObject:ControlStateValue, controlState:UIControlState)->ControlStateAppearance{
if let stateObject = controlStateValueObject.getControlApearenceFor(controlState) {
return stateObject
}else{
if let stateObject = controlStateValueObject.getControlApearenceFor(UIControlState.Normal) {
controlStateValueObject.setControlApearence(stateObject,state: controlState)
return stateObject
}else{
let stateObject = ControlStateAppearance()
stateObject.titleColor = nil
stateObject.title = nil
controlStateValueObject.setControlApearence(stateObject,state: controlState)
return stateObject
}
}
}
public func setButonTitle(title:NSString, state:String){
setButonTitle(title, state:state, controlState:UIControlState.Normal)
}
public func getButonTitleForState(state:NSString)->String!{
return getButonTitleForState(state, controlState: UIControlState.Normal)
}
public func setButonTitle(title:NSString, state:String, controlState:UIControlState){
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = getOrCreateStateAppearenceObject(controlStateValueObject,controlState: controlState)
controlStateAppearanceObject.title = title
}
public func getButonTitleForState(state:NSString ,controlState:UIControlState)->String!{
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState)
if let title = controlStateAppearanceObject.title{
return title
}else{
let controlStateValueObject = getOrCreateStateObjectForState(kDefaultAdaptiveState)
let controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState)
return controlStateAppearanceObject.title!
}
}
public func setButonTitleFontForState(font:UIFont, state:String){
setButonTitleFont(font, state: state, controlState: UIControlState.Normal)
}
public func getButonTitleFontForState(state:NSString)->UIFont{
if let font = getButonTitleFontForState(state, controlState: UIControlState.Normal){
return font
}else{
return defaultFont!
}
}
public func getButonTitleFontForState(state:NSString ,controlState:UIControlState)->UIFont!{
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState)
return controlStateAppearanceObject.font!
}
public func setButonTitleFont(font:UIFont, state:String, controlState:UIControlState){
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = getOrCreateStateAppearenceObject(controlStateValueObject,controlState: controlState)
controlStateAppearanceObject.font = font
}
public func setButtonImage(image:UIImage, state:String){
setButtonImage(image, state: state, controlState: UIControlState.Normal)
print("set State \(state)")
}
public func setButtonImage(image:UIImage, state:String, controlState:UIControlState){
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = getOrCreateStateAppearenceObject(controlStateValueObject,controlState: controlState)
controlStateAppearanceObject.image = image
print("set State \(state)")
}
public func setButtonImageName(imageName:String, state:String){
setButtonImageName(imageName, state: state, controlState: UIControlState.Normal)
print("set State \(state)")
}
public func setButtonImageName(imageName:String, state:String, controlState:UIControlState){
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = getOrCreateStateAppearenceObject(controlStateValueObject,controlState: controlState)
controlStateAppearanceObject.imageName = imageName
print("set State \(state)")
}
public func getButonImageForState(state:NSString)->UIImage!{
return getButonImageForState(state, controlState: UIControlState.Normal)
}
public func getButonImageForState(state:NSString, controlState:UIControlState)->UIImage?{
var controlStateValueObject = getOrCreateStateObjectForState(state)
if var controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState){
if let image = controlStateAppearanceObject.image{
return image
}else{
var controlStateValueObject = getOrCreateStateObjectForState(kDefaultAdaptiveState)
var controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState)
if let image = controlStateAppearanceObject.image{
return controlStateAppearanceObject.image!
}else{
controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(UIControlState.Normal)
return controlStateAppearanceObject.image!
}
}
}else{
return nil
}
}
public func getButonImageNameForState(state:NSString)->NSString!{
return getButonImageNameForState(state, controlState: UIControlState.Normal)
}
public func getButonImageNameForState(state:NSString, controlState:UIControlState)->NSString?{
var controlStateValueObject = getOrCreateStateObjectForState(state)
if var controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState){
return controlStateAppearanceObject.imageName
}else{
return nil
}
}
public func setBackgroundButonImage(image:UIImage, state:String){
setBackgroundButonImage(image, state: state)
}
public func setBackgroundButtonImage(image:UIImage, state:String, controlState:UIControlState){
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = getOrCreateStateAppearenceObject(controlStateValueObject,controlState: controlState)
controlStateAppearanceObject.backgroundImage = image
print("set State \(state)")
}
public func getBackgroundImageForState(state:NSString)->UIImage?{
return getBackgroundButonImageForState(state, controlState: UIControlState.Normal)
}
public func getBackgroundButonImageForState(state:NSString, controlState:UIControlState)->UIImage?{
var controlStateValueObject = getOrCreateStateObjectForState(state)
if var controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState){
if let image = controlStateAppearanceObject.backgroundImage{
return image
}else{
var controlStateValueObject = getOrCreateStateObjectForState(kDefaultAdaptiveState)
var controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState)
return controlStateAppearanceObject.backgroundImage!
}
}else{
return nil
}
}
public func setImageInsets(insets:UIEdgeInsets, state:String){
setImageInsets(insets, state: state,controlState:UIControlState.Normal)
}
public func setImageInsets(insets:UIEdgeInsets, state:String, controlState:UIControlState){
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = getOrCreateStateAppearenceObject(controlStateValueObject,controlState: controlState)
controlStateAppearanceObject.imageInsets = insets
}
public func getImageInsetsForState(state:NSString)->UIEdgeInsets!{
return getImageInsetsForState(state, controlState: UIControlState.Normal)
}
public func getImageInsetsForState(state:NSString ,controlState:UIControlState)->UIEdgeInsets!{
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState)
return controlStateAppearanceObject.imageInsets!
}
public func setTitleOffset(offset:UIOffset, state:String){
setTitleOffset(offset, state: state, controlState: UIControlState.Normal)
}
public func setTitleOffset(offset:UIOffset, state:String, controlState:UIControlState){
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = getOrCreateStateAppearenceObject(controlStateValueObject,controlState: controlState)
controlStateAppearanceObject.titleOffset = offset
}
public func getTitleOffsetForState(state:NSString)->UIOffset!{
return getTitleOffsetForState(state,controlState:UIControlState.Normal)
}
public func getTitleOffsetForState(state:NSString ,controlState:UIControlState)->UIOffset!{
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState)
return controlStateAppearanceObject.titleOffset!
}
public func setTitleColor(color:UIColor, state:String){
setTitleColor(color, state: state,controlState:UIControlState.Normal)
setTitleColor(color, state: state,controlState:UIControlState.Highlighted)
setTitleColor(color, state: state,controlState:UIControlState.Selected)
}
public func setTitleColor(color:UIColor, state:String, controlState:UIControlState){
let controlStateValueObject = getOrCreateStateObjectForState(state)
let controlStateAppearanceObject = getOrCreateStateAppearenceObject(controlStateValueObject,controlState: controlState)
controlStateAppearanceObject.titleColor = color
}
public func getTitleColorForState(state:NSString)->UIColor!{
return getTitleColorForState(state, controlState: UIControlState.Normal)
}
public func getTitleColorForState(state:NSString ,controlState:UIControlState)->UIColor!{
var controlStateValueObject = getOrCreateStateObjectForState(state)
var controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState)
if let curentTitleColor = controlStateAppearanceObject.titleColor{
return curentTitleColor
}else{
let controlStateValueObject = getStateObjectForState(kDefaultAdaptiveState)
let controlStateAppearanceObject = controlStateValueObject.getControlApearenceFor(controlState)
return controlStateAppearanceObject.titleColor!
}
}
public func setObjectDictionary(dictionary:Dictionary <String,DictionaryObject>){
for (key,object ) in dictionary{
let appearanceDictionary = object as Dictionary <String,DictionaryObject>
let appearanceObject = ControlStateValue()
appearanceObject.setObjectDictionary(appearanceDictionary)
stateDictionary.updateValue(appearanceObject, forKey: key)
}
}
public func getObjectDictionary() -> Dictionary<String,DictionaryObject>{
var controlStatesDictionary = Dictionary<String,DictionaryObject>()
for (key,object ) in stateDictionary{
let appearance = object as ControlStateValue
let appearanceDictionary = appearance.getObjectDictionary()
controlStatesDictionary.updateValue(appearanceDictionary, forKey: key)
}
return controlStatesDictionary
}
}
@@ -36,28 +36,23 @@ public let tabColor = UIColor(red: 169/255, green: 79/255, blue: 152/255, alpha:
public let selected = "Selected"
public let highlighted = "Higlihted"
public class AdaptiveButtonsStateManager: NSObject {
public class AdaptiveButtonsStateManager {
public convenience init (state:AdaptiveState,buttonsAray:[AdaptiveApperanceProtocol],buttonsAppearance:[AdaptiveButtonAppearance]){
self.init()
self.setButtonsState(state, buttonsAray: buttonsAray, buttonsAppearance: buttonsAppearance)
}
public func setButtonsState(state:AdaptiveState,buttonsAray:[AdaptiveApperanceProtocol],buttonsAppearance:[AdaptiveButtonAppearance]){
public class func setupButtonsAppearanceFromState(state:AdaptiveState,buttonsAray:[AdaptiveApperanceProtocol],buttonsAppearances:[AdaptiveButtonAppearance]){
var state:String = state.currentItemState!
var countElements = buttonsAray.count > buttonsAppearance.count ? buttonsAppearance.count : buttonsAray.count
var countElements = buttonsAray.count > buttonsAppearances.count ? buttonsAppearances.count : buttonsAray.count
for var index = 0; index < countElements; ++index {
println("index is \(index)")
println("buttons count array is \(buttonsAray.count)")
var button :AdaptiveApperanceProtocol = buttonsAray[index]
var buttonApperance = buttonsAppearance[index]
var buttonApperance = buttonsAppearances[index]
let title = buttonApperance.getButonTitleForState(state)
println("title: /(title)")
println(NSString(format:"title %@",title))
button.setTitleToAdaptiveButton!(title)
@@ -65,16 +60,6 @@ public class AdaptiveButtonsStateManager: NSObject {
if let image = buttonApperance.getButonImageForState(state) {
button.setImageToAdaptiveButton?(image)
}else{
}
if let selectedImage = buttonApperance.getButonImageForState(state+selected) {
button.setSelectedImageToAdaptiveButton?(selectedImage)
}
if let highlightedImage = buttonApperance.getButonImageForState(state+highlighted) {
button.setHighlightedToAdaptiveButton?(highlightedImage)
}
if let backgroundImage = buttonApperance.getButonImageForState(state) {
@@ -93,6 +78,18 @@ public class AdaptiveButtonsStateManager: NSObject {
button.setTitleColorToAdaptiveButton?(titleColor)
}
if let selectedImage = buttonApperance.getButonImageForState(state,controlState:UIControlState.Selected){
button.setSelectedImageToAdaptiveButton?(selectedImage)
}else{
if let selectedImage = buttonApperance.getButonImageForState(state,controlState:UIControlState.Normal){
button.setSelectedImageToAdaptiveButton?(selectedImage)
}
}
if let highlightedImage = buttonApperance.getButonImageForState(state,controlState:UIControlState.Highlighted) {
button.setHighlightedToAdaptiveButton?(highlightedImage)
}
}
@@ -8,8 +8,8 @@
import UIKit
public let kSmallTitleAdaptiveState = "kImageAdaptiveState"
public let kImageAdaptiveState = "kNormalImageAdaptiveState"
public let kSmallTitleAdaptiveState = "kSmallTitleAdaptiveState"
public let kImageAdaptiveState = "kImageAdaptiveState"
public class AdaptiveDateState: AdaptiveState {
@@ -18,13 +18,11 @@ public class AdaptiveLaunchesState : AdaptiveState {
}
public convenience init(curentCountLaunches:Int,countLaunchesToSmallTextState:Int,countLaunchesToImageState:Int) {
public convenience init(curentCountLaunches:Int,countLaunchesToSmallTextState:Int,countLaunchesToImageState:Int){
self.init()
self.currentItemState = stateRemainDays(curentCountLaunches,countLaunchesToSmallTextState: countLaunchesToSmallTextState,countLaunchesToImageState: countLaunchesToImageState);
//print(currentItemState)
}
internal func stateRemainDays (curentCountLaunches:Int,countLaunchesToSmallTextState:Int,countLaunchesToImageState:Int)->String{
@@ -9,7 +9,7 @@
import UIKit
public let kDefaultAdaptiveState:String = "DefaultAdaptiveState"
public let kDefaultAdaptiveState:String = "kDefaultAdaptiveState"
public class AdaptiveState: NSObject {
@@ -0,0 +1,16 @@
//
// AppearanceSerializationProtocol.swift
// AdaptiveController
//
// Created by Arcilite on 22.10.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import Foundation
protocol AppearanceSerializationProtocol {
typealias DictionaryObject
func getObjectDictionary() -> Dictionary<String,DictionaryObject>
func setObjectDictionary(dictionary:Dictionary<String,DictionaryObject>)
}
@@ -0,0 +1,24 @@
//
// ButtonStateApparenceProtocol.swift
// AdaptiveController
//
// Created by Arcilite on 22.10.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
protocol ButtonStateAppearanceProtocol :AppearanceSerializationProtocol{
var title: AnyObject?{get set}
var font: AnyObject?{get set}
var imageName: AnyObject?{get set}
var backgroundImageName:AnyObject?{get set}
var titleOffset:AnyObject?{get set}
var imageInsets:AnyObject?{get set}
var titleColor:AnyObject?{get set}
var backgroundColor:AnyObject?{get set}
var enabled:Bool?{get set}
}
@@ -0,0 +1,20 @@
//
// ColorExtension.swift
// AdaptiveController
//
// Created by Arcilite on 03.11.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import Foundation
extension UIColor {
convenience init(rgb: UInt) {
self.init(
red: CGFloat((rgb & 0xFF0000) >> 16) / 255.0,
green: CGFloat((rgb & 0x00FF00) >> 8) / 255.0,
blue: CGFloat(rgb & 0x0000FF) / 255.0,
alpha: CGFloat(1.0)
)
}
}
@@ -0,0 +1,263 @@
//
// ControlStateAppearance.swift
// AdaptiveController
//
// Created by Arcilite on 22.10.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
let titleKey = "title"
let fontKey = "font"
let imageNameKey = "imageName"
let backgroundImageNameKey = "backgroundImageName"
let titleOffsetKey = "titleOffset"
let imageInsetsKey = "imageInsets"
let colorKey = "color"
let backgroundColorKey = "backgroundColor"
let horizontalKey = "horizontal"
let verticalKey = "vertical"
let heightKey = "height"
let widthKey = "width"
let leftKey = "left"
let topKey = "top"
let rightKey = "right"
let bottomKey = "bottom"
let fontNameKey = "fontName"
let fontSizeKey = "fontSize"
let redColor = "red"
let greenColor = "green"
let blueColor = "blue"
let alphaColor = "alpha"
public class ControlStateAppearance: AppearanceSerializationProtocol{
typealias DictionaryObject = AnyObject
typealias StateObject = AnyObject
public var title: String?
public var font: UIFont?
public var imageName: String?
public var image: UIImage?
public var backgroundImageName:String?
public var backgroundImage: UIImage?
public var titleOffset:UIOffset?
public var imageInsets:UIEdgeInsets?
public var titleColor:UIColor?
public var backgroundColor:UIColor?
public var enabled:Bool?
public init(){
title = ""
font = defaultFont
titleOffset = defaultOffset
imageInsets = defaultImageModeInsets
titleColor = UIColor.blackColor()
backgroundColor = UIColor.clearColor()
}
public convenience init(appearanceFullStyle:ControlStateAppearance?){
self.init()
font = appearanceFullStyle?.font
titleOffset = appearanceFullStyle?.titleOffset
imageInsets = appearanceFullStyle?.imageInsets
titleColor = appearanceFullStyle?.titleColor
backgroundColor = appearanceFullStyle?.backgroundColor
imageName = appearanceFullStyle?.imageName
backgroundImageName = appearanceFullStyle?.backgroundImageName
image = appearanceFullStyle?.image
backgroundImage = appearanceFullStyle?.backgroundImage
}
public convenience init(appearanceStyle:ControlStateAppearance?){
self.init()
font = appearanceStyle?.font
titleOffset = appearanceStyle?.titleOffset
imageInsets = appearanceStyle?.imageInsets
titleColor = appearanceStyle?.titleColor
backgroundColor = appearanceStyle?.backgroundColor
title = nil
}
func colorToDctionary(color:UIColor) -> Dictionary<String,AnyObject>{
var components = CGColorGetComponents(color.CGColor)
var colorDictionary = Dictionary<String,AnyObject>()
if CGColorGetNumberOfComponents(color.CGColor) == 2{
colorDictionary[redColor] = components[0]
colorDictionary[greenColor] = components[0]
colorDictionary[blueColor] = components[0]
colorDictionary[alphaColor] = components[1]
}else{
colorDictionary[redColor] = components[0]
colorDictionary[greenColor] = components[1]
colorDictionary[blueColor] = components[2]
colorDictionary[alphaColor] = components[3]
}
print(colorDictionary)
return colorDictionary
}
func dictionaryToColor(colorDictionary: Dictionary<String,CGFloat>?) -> UIColor{
if let colorValueDictioanary = colorDictionary {
var red:CGFloat = 0
if let redValue = colorValueDictioanary [redColor]{
red = redValue
}
var green:CGFloat = 0
if let greenValue = colorValueDictioanary [greenColor]{
green = greenValue
}
var blue:CGFloat = 0
if let blueValue = colorValueDictioanary [blueColor]{
blue = blueValue
}
var alpha:CGFloat = 0
if let alphaValue = colorValueDictioanary [alphaColor]{
alpha = alphaValue
}
return UIColor(red: red, green: green, blue: blue, alpha: alpha)
}else{
return UIColor.clearColor()
}
}
func dictionaryToInsets(insetsDictionary: Dictionary<String,CGFloat>?) -> UIEdgeInsets!{
if let insetsDictionary = insetsDictionary{
var left:CGFloat = 0
if let leftDictioanaryValue = insetsDictionary [leftKey]{
left = leftDictioanaryValue
}
var top:CGFloat = 0
if let topDictioanaryValue = insetsDictionary [topKey]{
top = topDictioanaryValue
}
var right:CGFloat = 0
if let rightDictionary = insetsDictionary[rightKey]{
right = rightDictionary
}
var bottom:CGFloat = 0
if let bottomDictionaryValue = insetsDictionary[bottomKey]{
bottom = bottomDictionaryValue
}
return UIEdgeInsetsMake(top, left, bottom, right)
}else{
return UIEdgeInsetsZero
}
}
func dictionaryToOffset(offsetDictionary: Dictionary<String,CGFloat>?) -> UIOffset{
var horizontal:CGFloat = 0
if let horizontalFromDictionary = offsetDictionary![horizontalKey]{
horizontal = horizontalFromDictionary
}
var vertical:CGFloat = 0
if let verticalFromDictionary = offsetDictionary![verticalKey]{
vertical = verticalFromDictionary
}
return UIOffsetMake(horizontal, vertical)
}
func dictionaryToFont(fontDictionary: Dictionary<String,AnyObject>) -> UIFont{
var fontName:String = fontDictionary [fontNameKey]! as String
var fontSize:CGFloat = fontDictionary [fontSizeKey]! as CGFloat
return UIFont( name: fontName, size:fontSize )!
}
func setObjectDictionary(dictionary:Dictionary<String,DictionaryObject>){
title = dictionary[titleKey] as? String
font = dictionaryToFont(dictionary[fontKey] as Dictionary <String, AnyObject>)
titleOffset = dictionaryToOffset(dictionary[titleOffsetKey] as? Dictionary <String, CGFloat>)
imageInsets = dictionaryToInsets(dictionary[imageInsetsKey] as? Dictionary <String, CGFloat>)
titleColor = dictionaryToColor(dictionary[colorKey]! as? Dictionary <String, CGFloat>)
backgroundColor = dictionaryToColor(dictionary[backgroundColorKey]! as? Dictionary <String, CGFloat>)
if let imageName = dictionary[imageNameKey] as? String{
image = UIImage(named:imageName)
self.imageName = imageName
}
if let backgroundImageName = dictionary[backgroundImageNameKey] as? String{
backgroundImage = UIImage(named:backgroundImageName)
}
}
func getObjectDictionary() -> Dictionary<String,DictionaryObject>{
var controlStateDictionary = Dictionary<String,AnyObject>()
if title != nil {
controlStateDictionary[titleKey] = title!
}else{
controlStateDictionary[titleKey] = ""
}
var fontDictionary = Dictionary<String,AnyObject>()
fontDictionary[fontNameKey] = font?.fontName
fontDictionary[fontSizeKey] = font?.pointSize
controlStateDictionary[fontKey] = fontDictionary
var offsetDictionary = Dictionary<String,AnyObject>()
offsetDictionary[horizontalKey] = titleOffset?.horizontal
offsetDictionary[verticalKey] = titleOffset?.vertical
controlStateDictionary[titleOffsetKey] = offsetDictionary
var insetsDictionary = Dictionary<String,AnyObject>()
insetsDictionary[bottomKey] = imageInsets?.bottom
insetsDictionary[topKey] = imageInsets?.top
insetsDictionary[leftKey] = imageInsets?.left
insetsDictionary[rightKey] = imageInsets?.right
controlStateDictionary[imageInsetsKey] = insetsDictionary
if titleColor != nil{
controlStateDictionary[colorKey] = colorToDctionary(titleColor!)
}else{
controlStateDictionary[colorKey] = UIColor(red: 0, green: 0, blue: 0, alpha: 0)
}
controlStateDictionary[backgroundColorKey] = colorToDctionary(backgroundColor!)
controlStateDictionary[imageNameKey] = imageName
controlStateDictionary[backgroundImageNameKey] = backgroundImageName
return controlStateDictionary
}
}
@@ -8,12 +8,10 @@
import Foundation
protocol ControlStateProtocol {
protocol ControlStateProtocol:AppearanceSerializationProtocol {
typealias StateEnum
typealias StateObject
var normalState: StateEnum?{get set}
var selectedState: StateEnum?{get set}
var highlightedState: StateEnum?{get set}
var controlStates: Dictionary <String,StateObject>{get set}
}
@@ -0,0 +1,87 @@
//
// ControlState.swift
// AdaptiveController
//
// Created by Arcilite on 16.10.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
public class ControlStateValue:ControlStateProtocol{
public typealias StateObject = ControlStateAppearance
public typealias DictionaryObject = Dictionary <String,AnyObject>
public var controlStates: Dictionary <String,StateObject> = Dictionary <String,ControlStateAppearance>()
private var contolStatesMappingDictionary = ["\((UIControlState.Normal).rawValue)":"UIControlStateNormal",
"\((UIControlState.Highlighted).rawValue)":"UIControlStateHighlighted",
"\((UIControlState.Selected).rawValue)":"UIControlStateSelected"]
public init(){
self.controlStates = Dictionary<String,ControlStateAppearance>()
}
public convenience init(valueForNormalState:ControlStateAppearance) {
self.init()
self.setControlApearence(valueForNormalState, state: UIControlState.Normal)
self.setControlApearence(valueForNormalState, state: UIControlState.Highlighted)
self.setControlApearence(valueForNormalState, state: UIControlState.Selected)
}
public convenience init(styleValueStates:ControlStateValue) {
self.init()
for (state, object) in styleValueStates.controlStates {
self.controlStates.updateValue( ControlStateAppearance(appearanceStyle: object), forKey: state)
}
// self.setControlApearence(valueForNormalState!, state: UIControlState.Normal)
}
public func getObjectDictionary() -> Dictionary<String,DictionaryObject>{
var controlStatesDictionary = Dictionary<String,DictionaryObject>()
for (key,object ) in controlStates{
var appearance = object as ControlStateAppearance
var appearanceDictionary = appearance.getObjectDictionary()
controlStatesDictionary.updateValue(appearanceDictionary, forKey: key)
}
return controlStatesDictionary
}
public func setObjectDictionary(dictionary:Dictionary <String,DictionaryObject>){
for (key,object ) in dictionary{
var appearanceDictionary = object as Dictionary <String,AnyObject>
var appearanceObject = ControlStateAppearance()
appearanceObject.setObjectDictionary(appearanceDictionary)
controlStates.updateValue(appearanceObject, forKey: key)
}
}
public func setControlApearence(appearance:ControlStateAppearance,state:UIControlState){
var stateKey = "\(state.rawValue)"
var mapedKey = contolStatesMappingDictionary[stateKey]
self.controlStates.updateValue(appearance, forKey: mapedKey!)
}
public func getControlApearenceFor(state:UIControlState) -> ControlStateAppearance!{
var stateKey:String = "\(state.rawValue)"
var mapedKey = contolStatesMappingDictionary[stateKey]
var stateObject = self.controlStates[mapedKey!]
return stateObject
}
}
@@ -0,0 +1,59 @@
//
// DictioanarySeriliazator.swift
// AdaptiveController
//
// Created by Arcilite on 04.11.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
public class DictioanarySerializer: NSObject {
let rootKey:NSString = "Root"
public typealias DictionaryObject = Dictionary <String,AnyObject>
public func buttonApperancesToArrayDictionary(buttonApearances:[AdaptiveButtonAppearance]) -> Array<Dictionary<String, AnyObject>>{
var buttonsApearancesDictionaryArray = Array<Dictionary<String, AnyObject>>()
for appeareance in buttonApearances{
buttonsApearancesDictionaryArray.append(appeareance.getObjectDictionary())
}
return buttonsApearancesDictionaryArray
}
public func saveStateDictionary(buttonApearances:[AdaptiveButtonAppearance],filePath:String){
var dataArray = buttonApperancesToArrayDictionary(buttonApearances)
var data : NSArray = dataArray as NSArray
data.writeToFile(filePath, atomically: true)
}
public func dictionaryAppearancesToArrayApperances(buttonApearancesDictionary:Array<Dictionary<String, DictionaryObject>>) -> [AdaptiveButtonAppearance]{
var buttonsApearancesDictionaryArray = [AdaptiveButtonAppearance]()
for appeareanceDictionary in buttonApearancesDictionary{
var appearance = AdaptiveButtonAppearance()
appearance.setObjectDictionary(appeareanceDictionary)
buttonsApearancesDictionaryArray.append(appearance)
}
return buttonsApearancesDictionaryArray
}
public func parseFromPlistToButtonAppearances(filePath:String)->[AdaptiveButtonAppearance] {
if countElements(filePath) > 0 {
// The file saved previously
// Check for existence of the file
if NSFileManager.defaultManager().fileExistsAtPath(filePath){
let resultArray = NSArray(contentsOfFile: filePath)
var appearancesDictionaryArray = resultArray as Array<Dictionary<String, DictionaryObject>>
return dictionaryAppearancesToArrayApperances(appearancesDictionaryArray)
}
}
return [AdaptiveButtonAppearance]()
}
}
@@ -0,0 +1,76 @@
//
// AdaptiveButtonAppearanceTest.swift
// AdaptiveController
//
// Created by Arcilite on 03.11.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import XCTest
import UIKit
class AdaptiveButtonAppearanceTest: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testExample() {
// This is an example of a functional test case.
var imageExtensionsForStates:Dictionary = [ kSmallTitleAdaptiveState:"_smalltitle",
kImageAdaptiveState:"_bigimage",
kSmallTitleAdaptiveState+selected :"_smalltitle",
kImageAdaptiveState+selected:"_bigimage" ]
var watchAppearance = AdaptiveButtonAppearance();
watchAppearance.setButonTitle("watch", state: kDefaultAdaptiveState)
watchAppearance.setButonTitle("watch2", state: kSmallTitleAdaptiveState)
watchAppearance.setButonTitle("", state: kImageAdaptiveState)
watchAppearance.setTitleColor(UIColor.whiteColor(), state: kDefaultAdaptiveState)
watchAppearance.setTitleColor(UIColor.whiteColor(), state: kSmallTitleAdaptiveState)
watchAppearance.setTitleColor(UIColor.whiteColor(), state: kImageAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultFont!, state: kDefaultAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultSmallTitleModeFont!, state: kSmallTitleAdaptiveState)
watchAppearance.setImageInsets(defaultInsets, state: kDefaultAdaptiveState);
watchAppearance.setImageInsets(defaultSmallTitleModeImageInsets, state: kSmallTitleAdaptiveState)
watchAppearance.setTitleOffset(defaultOffset, state: kDefaultAdaptiveState)
watchAppearance.setImageInsets(defaultImageModeInsets, state: kImageAdaptiveState);
var appearanceDictionary = watchAppearance.getObjectDictionary()
var testAppearance = AdaptiveButtonAppearance()
testAppearance.setObjectDictionary(appearanceDictionary)
// XCTAssert(testAppearance.getTitleColorForState(kDefaultAdaptiveState) == UIColor.whiteColor(), "Fail color")
XCTAssert(UIOffsetEqualToOffset(testAppearance.getTitleOffsetForState(kDefaultAdaptiveState),defaultOffset), "Fail offset")
XCTAssert(UIEdgeInsetsEqualToEdgeInsets(defaultInsets, testAppearance.getImageInsetsForState(kDefaultAdaptiveState)), "Fail insets")
//
// XCTAssert(tabBarItem.text!.isEqualToString(""), "Fail text")
// XCTAssert(tabBarItem.font!.isEqual(defaultFont), "Fail font")
XCTAssert(true, "Pass")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock() {
// Put the code you want to measure the time of here.
}
}
}
@@ -126,17 +126,15 @@ class AdaptiveControllerTests: XCTestCase {
var watchAppearance = AdaptiveButtonAppearance();
watchAppearance.setButonTitle("watch", state: kDefaultAdaptiveState)
watchAppearance.setButonTitle("watch2", state: kSmallTitleAdaptiveState)
watchAppearance.setButonTitle("", state: kImageAdaptiveState)
watchAppearance.setTitleColor(UIColor.whiteColor(), state: kDefaultAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultFont, state: kDefaultAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultFont!, state: kDefaultAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultSmallTitleModeFont, state: kSmallTitleAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultSmallTitleModeFont!, state: kSmallTitleAdaptiveState)
//watchAppearance.setImageNamesForStatesImageExtesions("watch", imageExtensionsForState:imageExtensionsForStates)
let mockImage = MockUIImage()
mockImage.checkImageString = "default Image"
@@ -0,0 +1,69 @@
//
// ControlStateAppearanceTest.swift
// AdaptiveController
//
// Created by Arcilite on 01.11.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import XCTest
import AdaptiveController
//extension ControlStateAppearance{
//
// public func getObjectDictionary() -> Dictionary<String,AnyObject>{
// return getObjectDictionary()
// }
// public func setObjectDictionary(dictionary:Dictionary<String,AnyObject>){
// setObjectDictionary(dictionary)
// }
//}
class ControlStateAppearanceTest: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testControlstateAppearance() {
var appearance = ControlStateAppearance();
appearance.font = UIFont(name: "Arial", size: 12)
appearance.title = "2"
appearance.imageInsets = UIEdgeInsetsMake(2, 2, 2, 2)
appearance.titleOffset = UIOffsetMake(2, 2)
appearance.titleColor = UIColor(red: 0, green: 0, blue: 0, alpha: 1)
appearance.backgroundColor = UIColor(red: 0, green: 7, blue: 0, alpha: 1)
var appearance1 = ControlStateAppearance();
appearance1.setObjectDictionary( appearance.getObjectDictionary())
XCTAssert(appearance.titleColor == appearance1.titleColor, "Fail color")
XCTAssert(appearance.backgroundColor == appearance1.backgroundColor, "Fail color")
XCTAssert(appearance1.titleColor == appearance.titleColor, "Fail color")
XCTAssert(UIOffsetEqualToOffset(appearance1.titleOffset!,appearance.titleOffset!), "Fail offset")
XCTAssert(UIEdgeInsetsEqualToEdgeInsets(appearance.imageInsets!, appearance1.imageInsets!), "Fail insets")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock() {
// Put the code you want to measure the time of here.
}
}
}
@@ -0,0 +1,87 @@
//
// ControlStateValueTest.swift
// AdaptiveController
//
// Created by Arcilite on 28.10.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import XCTest
import AdaptiveController
class ControlStateValueTest: XCTestCase {
override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testControlStateAppearance() {
var appearance = ControlStateAppearance()
appearance.font = UIFont(name: "Arial", size: 12)
appearance.title = "2"
appearance.imageInsets = UIEdgeInsetsMake(2, 2, 2, 2)
appearance.titleOffset = UIOffsetMake(2, 2)
appearance.titleColor = UIColor(red: 0, green: 0, blue: 0, alpha: 1)
appearance.backgroundColor = UIColor(red: 0, green: 7, blue: 0, alpha: 1)
var value = ControlStateValue(valueForNormalState: appearance)
value.setControlApearence(appearance,state:UIControlState.Normal)
var object:ControlStateAppearance = value.getControlApearenceFor(UIControlState.Normal)
XCTAssert(object.title! == appearance.title , "Pass")
}
func testControlStateAppearanceSerialization() {
var appearance = ControlStateAppearance()
appearance.font = UIFont(name: "Arial", size: 12)
appearance.title = "2"
appearance.imageInsets = UIEdgeInsetsMake(2, 2, 2, 2)
appearance.titleOffset = UIOffsetMake(2, 2)
appearance.titleColor = UIColor(red: 0, green: 0, blue: 0, alpha: 1)
appearance.backgroundColor = UIColor(red: 0, green: 7, blue: 0, alpha: 1)
var value = ControlStateValue(valueForNormalState: appearance)
value.setControlApearence(appearance,state:UIControlState.Normal)
var object:ControlStateAppearance = value.getControlApearenceFor(UIControlState.Normal)
XCTAssert(object.title! == appearance.title , "Pass")
var value1 = ControlStateValue()
value1.setObjectDictionary(value.getObjectDictionary())
var object1:ControlStateAppearance = value.getControlApearenceFor(UIControlState.Normal)
XCTAssert(object1.title! == appearance.title , "Pass")
XCTAssert(appearance.titleColor == object1.titleColor, "Fail color")
XCTAssert(appearance.backgroundColor == object1.backgroundColor, "Fail color")
XCTAssert(appearance.titleColor == object1.titleColor, "Fail color")
XCTAssert(UIOffsetEqualToOffset(appearance.titleOffset!,object1.titleOffset!), "Fail offset")
XCTAssert(UIEdgeInsetsEqualToEdgeInsets(appearance.imageInsets!, object1.imageInsets!), "Fail insets")
}
func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock() {
// Put the code you want to measure the time of here.
}
}
}

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View File
-33
View File
@@ -1,33 +0,0 @@
# Contributing to a Project
Now that youve found the material for understanding the project, here is how you can take action.
### Create an Issue
If you find a bug in a project youre using (and you dont know how to fix it), have trouble following the documentation or have a question about the project create an issue! Theres nothing to it and whatever issue youre having, youre likely not the only one, so others will find your issue helpful, too. For more information on how issues work, check out our Issues guide.
#### Issues Pro Tips
Check existing issues for your issue. Duplicating an issue is slower for both parties so search through open and closed issues to see if what youre running into has been addressed already.
Be clear about what your problem is: what was the expected outcome, what happened instead? Detail how someone else can recreate the problem.
Link to demos recreating the problem on things like JSFiddle or CodePen.
Include system details like what the browser, library or operating system youre using and its version.
Paste error output or logs in your issue or in a Gist. If pasting them in the issue, wrap it in three backticks: ``` so that it renders nicely.
### Pull Request
If youre able to patch the bug or add the feature yourself fantastic, make a pull request with the code! Be sure youve read any documents on contributing, understand the license and have signed a CLA if required. Once youve submitted a pull request the maintainer(s) can compare your branch to the existing one and decide whether or not to incorporate (pull in) your changes.
#### Pull Request Pro Tips
Fork the repository and clone it locally. Connect your local to the original upstream repository by adding it as a remote. Pull in changes from upstream often so that you stay up to date so that when you submit your pull request, merge conflicts will be less likely. See more detailed instructions here.
Create a branch for your edits.
Be clear about what problem is occurring and how someone can recreate that problem or why your feature will help. Then be equally as clear about the steps you took to make your changes.
Its best to test. Run your changes against any existing tests if they exist and create new ones when needed. Whether tests exist or not, make sure your changes dont break the existing project.
Include screenshots of the before and after if your changes include differences in HTML/CSS. Drag and drop the images into the body of your pull request.
Contribute in the style of the project to the best of your abilities. This may mean using indents, semi colons or comments differently than you would in your own repository, but makes it easier for the maintainer to merge, others to understand and maintain in the future.
#### Open Pull Requests
Once youve opened a pull request a discussion will start around your proposed changes. Other contributors and users may chime in, but ultimately the decision is made by the maintainer(s). You may be asked to make some changes to your pull request, if so, add more commits to your branch and push them theyll automatically go into the existing pull request.
If your pull request is merged great! If it is not, no sweat, it may not be what the project maintainer had in mind, or they were already working on it. This happens, so our recommendation is to take any feedback youve received and go forth and pull request again or create your own open source project.
+34 -18
View File
@@ -1,10 +1,4 @@
![Header](https://cdn.rawgit.com/Ramotion/adaptive-tab-bar/header.svg)
# Adaptive Tab Bar
[![CocoaPods](https://img.shields.io/cocoapods/p/AdaptiveController.svg)](https://cocoapods.org/pods/AdaptiveController)
[![CocoaPods](https://img.shields.io/cocoapods/v/RAMPaperSwitch.svg)](http://cocoapods.org/pods/AdaptiveController)
[![Twitter](https://img.shields.io/badge/Twitter-@Ramotion-blue.svg?style=flat)](http://twitter.com/Ramotion)
[![Travis](https://img.shields.io/travis/Ramotion/adaptive-tab-bar.svg)](https://travis-ci.org/Ramotion/adaptive-tab-bar)
AdaptiveController is a 'Progressive Reduction' Swift module for adding custom states to Native or Custom UI elements.
@@ -58,7 +52,7 @@ And then you should setup an array of items Appearance object. You should set th
First, you should setup a dictionary for the extension of the image for each UI state:
```swift
var imageExtensionsForStates:Dictionary = [ kSmallTitleAdaptiveState:"_smalltitle", kImageAdaptiveState:"_bigimage", kSmallTitleAdaptiveState+selected :"_smalltitle", kImageAdaptiveState+selected:"_bigimage" ]
var imageExtensionsForStates:Dictionary = [ kSmallTitleAdaptiveState:"_smalltitle", kImageAdaptiveState:"_bigimage"]
```
Then you should set the Appearance for each UITabBarItem title for each state, fonts for each state, a default image if you describe an extension for each state, or if you do not describe an extension, you should setup each image for each state.
@@ -93,6 +87,36 @@ Then you should setup the appearance insets for each state:
watchAppearance.setImageInsets(defaultImageModeInsets, state: kImageAdaptiveState);
```
And you can setup the appearance insets for each Control state but this setting is optional:
```swift
watchAppearance.setImageInsets(defaultInsets, state: kDefaultAdaptiveState controlState:UIControlState.Highlighted);
watchAppearance.setImageInsets(defaultSmallTitleModeImageInsets, state: kSmallTitleAdaptiveState controlState:UIControlState.Highlighted)
watchAppearance.setTitleOffset(defaultOffset, state: kDefaultAdaptiveState controlState:UIControlState.Highlighted)
watchAppearance.setImageInsets(defaultImageModeInsets, state: kImageAdaptiveState controlState:UIControlState.Highlighted);
```
In alternative way you can setup all appearances settings in plist like on image
![Mou icon](http://i.imgur.com/zLP8zHF.png)
sample of plist you can find in example-date-adaptive-tab-bar project file named appearances.plist
for setuping button appearences from plist you can use this code:
```swift
var seriliazator = DictioanarySeriliazator()
var butonsApperances = seriliazator.getButtonApperances(path!)
```
for debugging button appearences you can save your aperances in plist for this you can use next code:
```swift
var paths = NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String
paths = paths.stringByAppendingPathComponent("appearances.plist")
seriliazator.saveStateDictionary(butonsApperances,filePath:paths)
```
Then you should setup сustom UITabBarItems which conform to the AdaptiveButtonsProtocol:
```swift
@@ -170,16 +194,8 @@ In AdaptiveDateState, we add custom init methods which decided what states have
You can customize different UI components if they adopt to the AdaptiveApperanceProtocol.
## Licence
##About us
Adaptive tab bar is released under the MIT license.
See [LICENSE](./LICENSE.md) for details.
## About
The project maintained by [app development agency](http://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=paper-switch) [Ramotion Inc.](http://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=adaptive-tab-bar)]
See our other [open-source projects](https://github.com/ramotion) or [hire](http://ramotion.com?utm_source=gthb&utm_medium=special&utm_campaign=adaptive-tab-bar) us to design, develop, and grow your product.
[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=https://github.com/ramotion/adaptive-tab-bar)
[![Twitter Follow](https://img.shields.io/twitter/follow/ramotion.svg?style=social)](https://twitter.com/ramotion)
[Ramotion](http://Ramotion.com) is an iPhone app design and development company. We are ready for new interesting iOS App Development projects.
Follow us on [twitter](http://twitter.com/ramotion).
+14
View File
@@ -0,0 +1,14 @@
def run(command)
system(command) or raise "RAKE TASK FAILED: #{command}"
end
namespace "test" do
desc "Run unit tests for all iOS targets"
task :ios do |t|
run "xcodebuild -project AdaptiveController/AdaptiveController.xcodeproj -scheme AdaptiveController"
run "xcodebuild -project AdaptiveController/AdaptiveController.xcodeproj -scheme AdaptiveControllerTests test"
end
end
task default: ["test:ios"]
@@ -0,0 +1,67 @@
//
// AppDelegate.swift
// adaptive-tab-bar
//
// Created by Arcilite on 15.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import CoreGraphics
import QuartzCore
import AdaptiveController
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
UITabBar.appearance().selectedImageTintColor = tabColor
UITabBar.appearance().barTintColor = UIColor.clearColor()
UITabBar.appearance().shadowImage = UIImage()
UITabBar.appearance().selectionIndicatorImage = UIImage(named: "backgroud_tab")
UITabBar.appearance().itemPositioning = UITabBarItemPositioning.Fill
UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: UIColor.whiteColor()],forState: UIControlState.Normal)
UITabBarItem.appearance().setTitleTextAttributes([NSForegroundColorAttributeName: tabColor],forState: UIControlState.Selected)
var tabBarController:UITabBarController = self.window?.rootViewController as UITabBarController
var tabBar:UITabBar = tabBarController.tabBar
tabBar.barTintColor = tabColor
tabBar.clipsToBounds = true
var installDate = NSDate(dateString:"2014-9-22")
var adaptiveState = AdaptiveDateState(installDate: installDate,currentDate:NSDate(),countDaysToSmallTextState:countDaysToSmallTextState,countDaysToImageState:countDaysToImageState)
let path = NSBundle.mainBundle().pathForResource("appearances", ofType: "plist")
var serializer = DictioanarySerializer()
var butonsApperances = serializer.parseFromPlistToButtonApperances(path!)
var arrayButtons = tabBar.items as [UITabBarItem]
AdaptiveButtonsStateManager.setupButtonsAppearanceFromState(adaptiveState,buttonsAray:arrayButtons ,buttonsAppearances: butonsApperances)
return true
}
}
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="49e-Tb-3d3">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="49e-Tb-3d3">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--First-->
<scene sceneID="hNz-n2-bh7">
<objects>
<viewController id="9pv-A4-QxB" customClass="WatchViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="9pv-A4-QxB" customClass="WatchViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ia1-K6-d13"/>
<viewControllerLayoutGuide type="bottom" id="4ug-Mw-9AY"/>
@@ -29,19 +30,23 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="bTY-b5-lYl">
<rect key="frame" x="0.0" y="0.0" width="640" height="550"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="bTY-b5-lYl">
<rect key="frame" x="0.0" y="0.0" width="640" height="551"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="4ug-Mw-9AY" firstAttribute="top" secondItem="bTY-b5-lYl" secondAttribute="bottom" id="57C-0I-UhP"/>
<constraint firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="6BV-lF-sBN"/>
<constraint firstItem="A5M-7J-77L" firstAttribute="top" secondItem="KQZ-1w-vlD" secondAttribute="bottom" constant="8" symbolic="YES" id="cfb-er-3JN"/>
<constraint firstItem="A5M-7J-77L" firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="e1l-AV-tCB"/>
<constraint firstAttribute="centerY" secondItem="KQZ-1w-vlD" secondAttribute="centerY" id="exm-UA-ej4"/>
<constraint firstItem="bTY-b5-lYl" firstAttribute="top" secondItem="tsR-hK-woN" secondAttribute="top" id="kWQ-y6-H6g"/>
<constraint firstAttribute="trailing" secondItem="bTY-b5-lYl" secondAttribute="trailing" constant="-40" id="sYy-Hj-V1a"/>
<constraint firstItem="bTY-b5-lYl" firstAttribute="leading" secondItem="tsR-hK-woN" secondAttribute="leading" id="ueh-EO-Puf"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="First" id="acW-dT-cKf" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
<tabBarItem key="tabBarItem" title="First" id="acW-dT-cKf" customClass="AdaptiveTabBarItem" customModule="example_date_adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/>
</objects>
@@ -50,7 +55,7 @@
<!--Second-->
<scene sceneID="wg7-f3-ORb">
<objects>
<viewController id="8rJ-Kc-sve" customClass="MessageViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="8rJ-Kc-sve" customClass="MessageViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="L7p-HK-0SC"/>
<viewControllerLayoutGuide type="bottom" id="Djb-ko-YwX"/>
@@ -72,19 +77,23 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="d3m-k5-qah">
<rect key="frame" x="0.0" y="0.0" width="640" height="550"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="d3m-k5-qah">
<rect key="frame" x="0.0" y="0.0" width="640" height="551"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="d3m-k5-qah" secondAttribute="trailing" constant="-40" id="8KS-iG-8XT"/>
<constraint firstItem="NDk-cv-Gan" firstAttribute="top" secondItem="zEq-FU-wV5" secondAttribute="bottom" constant="8" symbolic="YES" id="Day-4N-Vmt"/>
<constraint firstItem="NDk-cv-Gan" firstAttribute="centerX" secondItem="zEq-FU-wV5" secondAttribute="centerX" id="JgO-Fn-dHn"/>
<constraint firstItem="d3m-k5-qah" firstAttribute="leading" secondItem="QS5-Rx-YEW" secondAttribute="leading" id="X9o-k0-h62"/>
<constraint firstAttribute="centerX" secondItem="zEq-FU-wV5" secondAttribute="centerX" id="qqM-NS-xev"/>
<constraint firstAttribute="centerY" secondItem="zEq-FU-wV5" secondAttribute="centerY" id="qzY-Ky-pLD"/>
<constraint firstItem="d3m-k5-qah" firstAttribute="top" secondItem="QS5-Rx-YEW" secondAttribute="top" id="tA2-Eh-fSb"/>
<constraint firstItem="Djb-ko-YwX" firstAttribute="top" secondItem="d3m-k5-qah" secondAttribute="bottom" id="zws-Zn-RsZ"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Second" image="second" id="cPa-gy-q4n" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
<tabBarItem key="tabBarItem" title="Second" image="second" id="cPa-gy-q4n" customClass="AdaptiveTabBarItem" customModule="example_count_launches_adaptive_tabbar"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4Nw-L8-lE0" sceneMemberID="firstResponder"/>
</objects>
@@ -93,7 +102,7 @@
<!--Tab Bar View Controller-->
<scene sceneID="yl2-sM-qoP">
<objects>
<tabBarController id="49e-Tb-3d3" customClass="TabBarViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<tabBarController id="49e-Tb-3d3" customClass="TabBarViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<nil key="simulatedBottomBarMetrics"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="W28-zg-YXA">
<rect key="frame" x="0.0" y="975" width="768" height="49"/>
@@ -115,7 +124,7 @@
<!--Item-->
<scene sceneID="60i-zg-cAx">
<objects>
<viewController id="BiK-DX-JK5" customClass="UserViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BiK-DX-JK5" customClass="UserViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="oSS-7K-rER"/>
<viewControllerLayoutGuide type="bottom" id="Ba7-rp-yUE"/>
@@ -124,13 +133,19 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="jtr-dW-8XE">
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="jtr-dW-8XE">
<rect key="frame" x="0.0" y="0.0" width="640" height="555"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="jtr-dW-8XE" secondAttribute="trailing" constant="-40" id="68Q-YE-GnZ"/>
<constraint firstItem="jtr-dW-8XE" firstAttribute="leading" secondItem="Z9a-At-6Ll" secondAttribute="leading" id="9Lc-1F-lVY"/>
<constraint firstAttribute="bottom" secondItem="jtr-dW-8XE" secondAttribute="bottom" constant="45" id="iHg-vq-ehR"/>
<constraint firstItem="jtr-dW-8XE" firstAttribute="top" secondItem="Z9a-At-6Ll" secondAttribute="top" id="zds-Uy-hOW"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Item" id="g86-Lf-lWF" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
<tabBarItem key="tabBarItem" title="Item" id="g86-Lf-lWF" customClass="AdaptiveTabBarItem" customModule="example_date_adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ds1-lP-WuT" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@@ -139,7 +154,7 @@
<!--Item-->
<scene sceneID="RUI-wr-KlE">
<objects>
<viewController id="aXk-96-nwf" customClass="MenuViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="aXk-96-nwf" customClass="MenuViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Aha-rh-ib6"/>
<viewControllerLayoutGuide type="bottom" id="aNR-L8-QaD"/>
@@ -148,13 +163,20 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="GGw-pn-6CX">
<rect key="frame" x="0.0" y="0.0" width="640" height="550"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="GGw-pn-6CX">
<rect key="frame" x="0.0" y="0.0" width="640" height="551"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="GGw-pn-6CX" firstAttribute="top" secondItem="UyR-nf-sp6" secondAttribute="topMargin" id="JNr-AP-tWr"/>
<constraint firstItem="GGw-pn-6CX" firstAttribute="top" secondItem="UyR-nf-sp6" secondAttribute="topMargin" id="MSj-7q-ac7"/>
<constraint firstItem="GGw-pn-6CX" firstAttribute="leading" secondItem="UyR-nf-sp6" secondAttribute="leading" id="SZF-JG-V57"/>
<constraint firstItem="aNR-L8-QaD" firstAttribute="top" secondItem="GGw-pn-6CX" secondAttribute="bottom" id="YDT-AA-Wjy"/>
<constraint firstItem="aNR-L8-QaD" firstAttribute="top" secondItem="GGw-pn-6CX" secondAttribute="bottom" id="nys-sX-kRN"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Item" id="RnB-fU-3RS" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
<tabBarItem key="tabBarItem" title="Item" id="RnB-fU-3RS" customClass="AdaptiveTabBarItem" customModule="example_date_adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Hsc-p3-elF" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@@ -163,7 +185,7 @@
<!--Item-->
<scene sceneID="B98-FR-Rjt">
<objects>
<viewController id="BgE-dr-gW8" customClass="MoreViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BgE-dr-gW8" customClass="MoreViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="r9s-DG-v8Y"/>
<viewControllerLayoutGuide type="bottom" id="mju-qR-F4m"/>
@@ -172,13 +194,19 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="fel-JW-y8K">
<rect key="frame" x="0.0" y="0.0" width="640" height="550"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="fel-JW-y8K">
<rect key="frame" x="16" y="0.0" width="568" height="551"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="mju-qR-F4m" firstAttribute="top" secondItem="fel-JW-y8K" secondAttribute="bottom" id="czL-kW-Gi5"/>
<constraint firstItem="fel-JW-y8K" firstAttribute="top" secondItem="dgq-yB-Neb" secondAttribute="top" id="h6H-Nt-0EU"/>
<constraint firstItem="fel-JW-y8K" firstAttribute="leading" secondItem="dgq-yB-Neb" secondAttribute="leading" constant="16" id="lvq-kK-shl"/>
<constraint firstAttribute="trailing" secondItem="fel-JW-y8K" secondAttribute="trailing" constant="16" id="mnN-oR-w60"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Item" id="uWZ-JL-cND" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
<tabBarItem key="tabBarItem" title="Item" id="uWZ-JL-cND" customClass="AdaptiveTabBarItem" customModule="example_date_adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="xAq-zT-Wnn" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@@ -9,21 +9,23 @@
import UIKit
import AdaptiveController
class AdaptiveTabBarItem: UITabBarItem , AdaptiveApperanceProtocol {
extension UITabBarItem : AdaptiveApperanceProtocol {
override init(){
super.init()
}
// override init(){
// super.init()
//
// }
func setFontToAdaptiveButton(font: UIFont){
public func setFontToAdaptiveButton(font: UIFont){
self.setTitleTextAttributes(NSDictionary(objects: [font], forKeys: [NSFontAttributeName]), forState: UIControlState.Normal)
}
func setTitleToAdaptiveButton(text: NSString){
public func setTitleToAdaptiveButton(text: NSString){
self.title = text
}
@@ -31,19 +33,19 @@ class AdaptiveTabBarItem: UITabBarItem , AdaptiveApperanceProtocol {
self.image = image
}
func setSelectedImageToAdaptiveButton(image: UIImage?){
public func setSelectedImageToAdaptiveButton(image: UIImage?){
self.selectedImage = image
}
func setImageInsetsToAdaptiveButton(insets: UIEdgeInsets){
public func setImageInsetsToAdaptiveButton(insets: UIEdgeInsets){
self.imageInsets = insets
}
func setTitleOffsetToAdaptiveButton(offset: UIOffset){
public func setTitleOffsetToAdaptiveButton(offset: UIOffset){
self.setTitlePositionAdjustment(offset)
}
func setTitleColorToAdaptiveButton(color: UIColor){
public func setTitleColorToAdaptiveButton(color: UIColor){
var dictionary = self.titleTextAttributesForState(UIControlState.Normal)
dictionary.updateValue(color, forKey: NSForegroundColorAttributeName)
self.setTitleTextAttributes(dictionary, forState: UIControlState.Normal)
@@ -9,9 +9,8 @@
import UIKit
extension NSDate{
convenience
init(dateString:String) {
convenience init(dateString:String) {
let dateStringFormatter = NSDateFormatter()
dateStringFormatter.dateFormat = "yyyy-MM-dd"
dateStringFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX")
@@ -0,0 +1,871 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>kDefaultAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>1</real>
<key>green</key>
<real>1</real>
<key>red</key>
<real>1</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>14</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>0</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>0</real>
</dict>
<key>imageName</key>
<string>watch</string>
<key>title</key>
<string>watch</string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kImageAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>14</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>-6</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>6</real>
</dict>
<key>imageName</key>
<string>watch_bigimage</string>
<key>title</key>
<string></string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kSmallTitleAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>1</real>
<key>green</key>
<real>1</real>
<key>red</key>
<real>1</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>10</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>0</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>0</real>
</dict>
<key>imageName</key>
<string>watch_smalltitle</string>
<key>title</key>
<string>watch</string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>kDefaultAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>1</real>
<key>green</key>
<real>1</real>
<key>red</key>
<real>1</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>14</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>0</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>0</real>
</dict>
<key>imageName</key>
<string>messages</string>
<key>title</key>
<string>message</string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kImageAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>14</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>-6</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>6</real>
</dict>
<key>imageName</key>
<string>messages_bigimage</string>
<key>title</key>
<string></string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kSmallTitleAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>1</real>
<key>green</key>
<real>1</real>
<key>red</key>
<real>1</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>10</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>0</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>0</real>
</dict>
<key>imageName</key>
<string>messages_smalltitle</string>
<key>title</key>
<string>message</string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>kDefaultAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>1</real>
<key>green</key>
<real>1</real>
<key>red</key>
<real>1</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>14</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>0</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>0</real>
</dict>
<key>imageName</key>
<string>man</string>
<key>title</key>
<string>user</string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kImageAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>14</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>-6</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>6</real>
</dict>
<key>imageName</key>
<string>man_bigimage</string>
<key>title</key>
<string></string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kSmallTitleAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>1</real>
<key>green</key>
<real>1</real>
<key>red</key>
<real>1</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>10</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>0</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>0</real>
</dict>
<key>imageName</key>
<string>man_smalltitle</string>
<key>title</key>
<string>user</string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>kDefaultAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>1</real>
<key>green</key>
<real>1</real>
<key>red</key>
<real>1</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>14</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>0</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>0</real>
</dict>
<key>imageName</key>
<string>menu</string>
<key>title</key>
<string>dial</string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kImageAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>14</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>-6</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>6</real>
</dict>
<key>imageName</key>
<string>menu_bigimage</string>
<key>title</key>
<string></string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kSmallTitleAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>1</real>
<key>green</key>
<real>1</real>
<key>red</key>
<real>1</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>10</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>0</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>0</real>
</dict>
<key>imageName</key>
<string>menu_smalltitle</string>
<key>title</key>
<string>dial</string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>kDefaultAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>1</real>
<key>green</key>
<real>1</real>
<key>red</key>
<real>1</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>14</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>0</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>0</real>
</dict>
<key>imageName</key>
<string>more</string>
<key>title</key>
<string>more</string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kImageAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>14</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>-6</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>6</real>
</dict>
<key>imageName</key>
<string>more_bigimage</string>
<key>title</key>
<string></string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kSmallTitleAdaptiveState</key>
<dict>
<key>UIControlStateNormal</key>
<dict>
<key>backgroundColor</key>
<dict>
<key>alpha</key>
<real>0</real>
<key>blue</key>
<real>0</real>
<key>green</key>
<real>0</real>
<key>red</key>
<real>0</real>
</dict>
<key>color</key>
<dict>
<key>alpha</key>
<real>1</real>
<key>blue</key>
<real>1</real>
<key>green</key>
<real>1</real>
<key>red</key>
<real>1</real>
</dict>
<key>font</key>
<dict>
<key>fontName</key>
<string>Helvetica</string>
<key>fontSize</key>
<real>10</real>
</dict>
<key>imageInsets</key>
<dict>
<key>bottom</key>
<real>0</real>
<key>left</key>
<real>0</real>
<key>right</key>
<real>0</real>
<key>top</key>
<real>0</real>
</dict>
<key>imageName</key>
<string>more_smalltitle</string>
<key>title</key>
<string>more</string>
<key>titleOffset</key>
<dict>
<key>horizontal</key>
<real>0</real>
<key>vertical</key>
<real>0</real>
</dict>
</dict>
</dict>
</dict>
</array>
</plist>
@@ -0,0 +1,901 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>DefaultAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>1</real>
<key>greenColor</key>
<real>1</real>
<key>redColor</key>
<real>1</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>14</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>0</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<real>0</real>
<key>topKey</key>
<real>0</real>
</dict>
<key>imageNameKey</key>
<string>watch</string>
<key>title</key>
<string>watch</string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kImageAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>14</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<integer>-6</integer>
<key>leftKey</key>
<integer>0</integer>
<key>rightKey</key>
<integer>0</integer>
<key>topKey</key>
<integer>6</integer>
</dict>
<key>imageNameKey</key>
<string>watch_bigimage</string>
<key>title</key>
<string></string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kSmallTitleAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>1</real>
<key>greenColor</key>
<real>1</real>
<key>redColor</key>
<real>1</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>10</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>0</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<real>0</real>
<key>topKey</key>
<real>0</real>
</dict>
<key>imageNameKey</key>
<string>watch_smalltitle</string>
<key>title</key>
<string>watch</string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>DefaultAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>1</real>
<key>greenColor</key>
<real>1</real>
<key>redColor</key>
<real>1</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>14</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>0</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<real>0</real>
<key>topKey</key>
<real>0</real>
</dict>
<key>imageNameKey</key>
<string>messages</string>
<key>title</key>
<string>message</string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kImageAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>14</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>-6</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<integer>0</integer>
<key>topKey</key>
<real>6</real>
</dict>
<key>imageNameKey</key>
<string>messages_bigimage</string>
<key>title</key>
<string></string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kSmallTitleAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>1</real>
<key>greenColor</key>
<real>1</real>
<key>redColor</key>
<real>1</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>10</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>0</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<real>0</real>
<key>topKey</key>
<real>0</real>
</dict>
<key>imageNameKey</key>
<string>messages_smalltitle</string>
<key>title</key>
<string>message</string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>DefaultAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>1</real>
<key>greenColor</key>
<real>1</real>
<key>redColor</key>
<real>1</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>14</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>0</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<real>0</real>
<key>topKey</key>
<real>0</real>
</dict>
<key>imageNameKey</key>
<string>man</string>
<key>title</key>
<string>user</string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kImageAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>14</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>-6</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<integer>0</integer>
<key>topKey</key>
<real>6</real>
</dict>
<key>imageNameKey</key>
<string>man_bigimage</string>
<key>title</key>
<string></string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kSmallTitleAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>1</real>
<key>greenColor</key>
<real>1</real>
<key>redColor</key>
<real>1</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>10</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>0</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<real>0</real>
<key>topKey</key>
<real>0</real>
</dict>
<key>imageNameKey</key>
<string>man_smalltitle</string>
<key>title</key>
<string>user</string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>DefaultAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>1</real>
<key>greenColor</key>
<real>1</real>
<key>redColor</key>
<real>1</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>14</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>0</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<real>0</real>
<key>topKey</key>
<real>0</real>
</dict>
<key>imageNameKey</key>
<string>menu</string>
<key>title</key>
<string>dial</string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kImageAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>14</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>-6</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<integer>0</integer>
<key>topKey</key>
<integer>6</integer>
</dict>
<key>imageNameKey</key>
<string>menu_bigimage</string>
<key>title</key>
<string></string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kSmallTitleAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>1</real>
<key>greenColor</key>
<real>1</real>
<key>redColor</key>
<real>1</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>10</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>0</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<real>0</real>
<key>topKey</key>
<real>0</real>
</dict>
<key>imageNameKey</key>
<string>menu_smalltitle</string>
<key>title</key>
<string>dial</string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
</dict>
<dict>
<key>DefaultAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>1</real>
<key>greenColor</key>
<real>1</real>
<key>redColor</key>
<real>1</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>14</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>0</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<real>0</real>
<key>topKey</key>
<real>0</real>
</dict>
<key>imageNameKey</key>
<string>more</string>
<key>title</key>
<string>more</string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kImageAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>14</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>-6</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<integer>0</integer>
<key>topKey</key>
<real>6</real>
</dict>
<key>imageNameKey</key>
<string>more_bigimage</string>
<key>title</key>
<string></string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
<key>kSmallTitleAdaptiveState</key>
<dict>
<key>UIControlState.Normal</key>
<dict>
<key>backgroundColorKey</key>
<dict>
<key>alphaColor</key>
<real>0</real>
<key>blueColor</key>
<real>0</real>
<key>greenColor</key>
<real>0</real>
<key>redColor</key>
<real>0</real>
</dict>
<key>backgroundImageNameKey</key>
<string></string>
<key>colorKey</key>
<dict>
<key>alphaColor</key>
<real>1</real>
<key>blueColor</key>
<real>1</real>
<key>greenColor</key>
<real>1</real>
<key>redColor</key>
<real>1</real>
</dict>
<key>fontKey</key>
<dict>
<key>fontNameKey</key>
<string>Helvetica</string>
<key>fontSizeKey</key>
<real>10</real>
</dict>
<key>imageInsetsKey</key>
<dict>
<key>bottomKey</key>
<real>0</real>
<key>leftKey</key>
<real>0</real>
<key>rightKey</key>
<real>0</real>
<key>topKey</key>
<real>0</real>
</dict>
<key>imageNameKey</key>
<string>more_smalltitle</string>
<key>title</key>
<string>more</string>
<key>titleOffsetKey</key>
<dict>
<key>xKey</key>
<real>0</real>
<key>yKey</key>
<real>0</real>
</dict>
</dict>
</dict>
</dict>
</array>
</plist>
@@ -7,6 +7,7 @@
objects = {
/* Begin PBXBuildFile section */
6A156E401A091169002A69AD /* appearances.plist in Resources */ = {isa = PBXBuildFile; fileRef = 6A156E3F1A091169002A69AD /* appearances.plist */; };
6A3ED0C819ED0236006F06DD /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A87F54B19C8532500E8F31B /* DateExtension.swift */; };
6A55590219E2C20900ED3B5C /* AdaptiveController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6A55590119E2C20900ED3B5C /* AdaptiveController.framework */; };
6A55590819E2CF7200ED3B5C /* MenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A55590319E2CF7200ED3B5C /* MenuViewController.swift */; };
@@ -49,6 +50,7 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
6A156E3F1A091169002A69AD /* appearances.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = appearances.plist; sourceTree = "<group>"; };
6A55590119E2C20900ED3B5C /* AdaptiveController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AdaptiveController.framework; path = "../../AdaptiveController/build/Debug-iphoneos/AdaptiveController.framework"; sourceTree = "<group>"; };
6A55590319E2CF7200ED3B5C /* MenuViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MenuViewController.swift; path = UIControllers/MenuViewController.swift; sourceTree = "<group>"; };
6A55590419E2CF7200ED3B5C /* MessageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MessageViewController.swift; path = UIControllers/MessageViewController.swift; sourceTree = "<group>"; };
@@ -142,6 +144,7 @@
6AD5A2F619C6C95E00606826 /* Supporting Files */ = {
isa = PBXGroup;
children = (
6A156E3F1A091169002A69AD /* appearances.plist */,
6AD5A2F719C6C95E00606826 /* Info.plist */,
);
name = "Supporting Files";
@@ -256,6 +259,7 @@
files = (
6AD5A30019C6C95E00606826 /* Main.storyboard in Resources */,
6AD5A30519C6C95E00606826 /* LaunchScreen.xib in Resources */,
6A156E401A091169002A69AD /* appearances.plist in Resources */,
6AD5A30219C6C95E00606826 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
</Bucket>
@@ -4,7 +4,7 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>example-date-adaptive-tab-bar.xcscheme</key>
<key>example-date-adaptive-tab-bar.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
@@ -39,20 +39,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
tabBar.barTintColor = tabColor
tabBar.clipsToBounds = true
var curentCountLaunches = 10
var curentCountLaunches = 6
var adaptiveState = AdaptiveLaunchesState(curentCountLaunches:curentCountLaunches,countLaunchesToSmallTextState:countDaysForSmaltextState,countLaunchesToImageState:countDaysForImageModeState)
var buttonsAppearances = buttonsAppearancesGenerate() //func butonsApprencesGenerate() -> [AdaptiveButtonApperance]
var buttonsAppearances = buttonsAppearancesGenerate()
var arrayButtons = tabBar.items as [AdaptiveTabBarItem]
AdaptiveButtonsStateManager(state: adaptiveState,buttonsAray:arrayButtons ,buttonsAppearance: buttonsAppearances)
AdaptiveButtonsStateManager.setupButtonsAppearanceFromState(adaptiveState,buttonsAray:arrayButtons ,buttonsAppearances: buttonsAppearances)
return true
}
@@ -69,13 +66,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var watchAppearance = AdaptiveButtonAppearance();
watchAppearance.setButonTitle("watch", state: kDefaultAdaptiveState)
watchAppearance.setButonTitle("watch", state: kSmallTitleAdaptiveState)
watchAppearance.setButonTitle("", state: kImageAdaptiveState)
watchAppearance.setTitleColor(UIColor.whiteColor(), state: kDefaultAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultFont, state: kDefaultAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultFont!, state: kDefaultAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultSmallTitleModeFont, state: kSmallTitleAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultSmallTitleModeFont!, state: kSmallTitleAdaptiveState)
watchAppearance.setImageNamesForStatesImageExtesions("watch", imageExtensionsForState:imageExtensionsForStates)
@@ -94,6 +91,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
userAperance.setAllCommonApperanceFrom(watchAppearance)
userAperance.setButonTitle("user", state: kDefaultAdaptiveState)
userAperance.setButonTitle("", state: kImageAdaptiveState)
userAperance.setImageNamesForStatesImageExtesions("man", imageExtensionsForState:imageExtensionsForStates)
@@ -104,6 +102,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
messageAperance.setAllCommonApperanceFrom((watchAppearance))
messageAperance.setButonTitle("message", state: kDefaultAdaptiveState)
messageAperance.setButonTitle("", state: kImageAdaptiveState)
messageAperance.setImageNamesForStatesImageExtesions("messages", imageExtensionsForState:imageExtensionsForStates)
@@ -117,6 +116,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
menuAperance.setAllCommonApperanceFrom((watchAppearance))
menuAperance.setButonTitle("dial", state: kDefaultAdaptiveState)
menuAperance.setButonTitle("", state: kImageAdaptiveState)
menuAperance.setImageNamesForStatesImageExtesions("menu", imageExtensionsForState:imageExtensionsForStates)
@@ -127,6 +127,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
moreAperance.setAllCommonApperanceFrom((watchAppearance))
moreAperance.setButonTitle("more", state: kDefaultAdaptiveState)
moreAperance.setButonTitle("", state: kImageAdaptiveState)
moreAperance.setImageNamesForStatesImageExtesions("more", imageExtensionsForState:imageExtensionsForStates)
@@ -1,13 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="49e-Tb-3d3">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="49e-Tb-3d3">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6244"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies>
<scenes>
<!--First-->
<scene sceneID="hNz-n2-bh7">
<objects>
<viewController id="9pv-A4-QxB" customClass="WatchViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="9pv-A4-QxB" customClass="WatchViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ia1-K6-d13"/>
<viewControllerLayoutGuide type="bottom" id="4ug-Mw-9AY"/>
@@ -29,19 +30,23 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="bTY-b5-lYl">
<rect key="frame" x="0.0" y="0.0" width="640" height="550"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="bTY-b5-lYl">
<rect key="frame" x="0.0" y="0.0" width="640" height="551"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="4ug-Mw-9AY" firstAttribute="top" secondItem="bTY-b5-lYl" secondAttribute="bottom" id="57C-0I-UhP"/>
<constraint firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="6BV-lF-sBN"/>
<constraint firstItem="A5M-7J-77L" firstAttribute="top" secondItem="KQZ-1w-vlD" secondAttribute="bottom" constant="8" symbolic="YES" id="cfb-er-3JN"/>
<constraint firstItem="A5M-7J-77L" firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="e1l-AV-tCB"/>
<constraint firstAttribute="centerY" secondItem="KQZ-1w-vlD" secondAttribute="centerY" id="exm-UA-ej4"/>
<constraint firstItem="bTY-b5-lYl" firstAttribute="top" secondItem="tsR-hK-woN" secondAttribute="top" id="kWQ-y6-H6g"/>
<constraint firstAttribute="trailing" secondItem="bTY-b5-lYl" secondAttribute="trailing" constant="-40" id="sYy-Hj-V1a"/>
<constraint firstItem="bTY-b5-lYl" firstAttribute="leading" secondItem="tsR-hK-woN" secondAttribute="leading" id="ueh-EO-Puf"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="First" id="acW-dT-cKf" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
<tabBarItem key="tabBarItem" title="First" id="acW-dT-cKf" customClass="AdaptiveTabBarItem" customModule="example_date_adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/>
</objects>
@@ -50,7 +55,7 @@
<!--Second-->
<scene sceneID="wg7-f3-ORb">
<objects>
<viewController id="8rJ-Kc-sve" customClass="MessageViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="8rJ-Kc-sve" customClass="MessageViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="L7p-HK-0SC"/>
<viewControllerLayoutGuide type="bottom" id="Djb-ko-YwX"/>
@@ -72,19 +77,23 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="d3m-k5-qah">
<rect key="frame" x="0.0" y="0.0" width="640" height="550"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="d3m-k5-qah">
<rect key="frame" x="0.0" y="0.0" width="640" height="551"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="d3m-k5-qah" secondAttribute="trailing" constant="-40" id="8KS-iG-8XT"/>
<constraint firstItem="NDk-cv-Gan" firstAttribute="top" secondItem="zEq-FU-wV5" secondAttribute="bottom" constant="8" symbolic="YES" id="Day-4N-Vmt"/>
<constraint firstItem="NDk-cv-Gan" firstAttribute="centerX" secondItem="zEq-FU-wV5" secondAttribute="centerX" id="JgO-Fn-dHn"/>
<constraint firstItem="d3m-k5-qah" firstAttribute="leading" secondItem="QS5-Rx-YEW" secondAttribute="leading" id="X9o-k0-h62"/>
<constraint firstAttribute="centerX" secondItem="zEq-FU-wV5" secondAttribute="centerX" id="qqM-NS-xev"/>
<constraint firstAttribute="centerY" secondItem="zEq-FU-wV5" secondAttribute="centerY" id="qzY-Ky-pLD"/>
<constraint firstItem="d3m-k5-qah" firstAttribute="top" secondItem="QS5-Rx-YEW" secondAttribute="top" id="tA2-Eh-fSb"/>
<constraint firstItem="Djb-ko-YwX" firstAttribute="top" secondItem="d3m-k5-qah" secondAttribute="bottom" id="zws-Zn-RsZ"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Second" image="second" id="cPa-gy-q4n" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
<tabBarItem key="tabBarItem" title="Second" image="second" id="cPa-gy-q4n" customClass="AdaptiveTabBarItem" customModule="example_count_launches_adaptive_tabbar"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4Nw-L8-lE0" sceneMemberID="firstResponder"/>
</objects>
@@ -93,7 +102,7 @@
<!--Tab Bar View Controller-->
<scene sceneID="yl2-sM-qoP">
<objects>
<tabBarController id="49e-Tb-3d3" customClass="TabBarViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<tabBarController id="49e-Tb-3d3" customClass="TabBarViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<nil key="simulatedBottomBarMetrics"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="W28-zg-YXA">
<rect key="frame" x="0.0" y="975" width="768" height="49"/>
@@ -115,7 +124,7 @@
<!--Item-->
<scene sceneID="60i-zg-cAx">
<objects>
<viewController id="BiK-DX-JK5" customClass="UserViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BiK-DX-JK5" customClass="UserViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="oSS-7K-rER"/>
<viewControllerLayoutGuide type="bottom" id="Ba7-rp-yUE"/>
@@ -124,13 +133,19 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="jtr-dW-8XE">
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="jtr-dW-8XE">
<rect key="frame" x="0.0" y="0.0" width="640" height="555"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="jtr-dW-8XE" secondAttribute="trailing" constant="-40" id="68Q-YE-GnZ"/>
<constraint firstItem="jtr-dW-8XE" firstAttribute="leading" secondItem="Z9a-At-6Ll" secondAttribute="leading" id="9Lc-1F-lVY"/>
<constraint firstAttribute="bottom" secondItem="jtr-dW-8XE" secondAttribute="bottom" constant="45" id="iHg-vq-ehR"/>
<constraint firstItem="jtr-dW-8XE" firstAttribute="top" secondItem="Z9a-At-6Ll" secondAttribute="top" id="zds-Uy-hOW"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Item" id="g86-Lf-lWF" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
<tabBarItem key="tabBarItem" title="Item" id="g86-Lf-lWF" customClass="AdaptiveTabBarItem" customModule="example_date_adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ds1-lP-WuT" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@@ -139,7 +154,7 @@
<!--Item-->
<scene sceneID="RUI-wr-KlE">
<objects>
<viewController id="aXk-96-nwf" customClass="MenuViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="aXk-96-nwf" customClass="MenuViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Aha-rh-ib6"/>
<viewControllerLayoutGuide type="bottom" id="aNR-L8-QaD"/>
@@ -148,13 +163,20 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="GGw-pn-6CX">
<rect key="frame" x="0.0" y="0.0" width="640" height="550"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="GGw-pn-6CX">
<rect key="frame" x="0.0" y="0.0" width="640" height="551"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="GGw-pn-6CX" firstAttribute="top" secondItem="UyR-nf-sp6" secondAttribute="topMargin" id="JNr-AP-tWr"/>
<constraint firstItem="GGw-pn-6CX" firstAttribute="top" secondItem="UyR-nf-sp6" secondAttribute="topMargin" id="MSj-7q-ac7"/>
<constraint firstItem="GGw-pn-6CX" firstAttribute="leading" secondItem="UyR-nf-sp6" secondAttribute="leading" id="SZF-JG-V57"/>
<constraint firstItem="aNR-L8-QaD" firstAttribute="top" secondItem="GGw-pn-6CX" secondAttribute="bottom" id="YDT-AA-Wjy"/>
<constraint firstItem="aNR-L8-QaD" firstAttribute="top" secondItem="GGw-pn-6CX" secondAttribute="bottom" id="nys-sX-kRN"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Item" id="RnB-fU-3RS" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
<tabBarItem key="tabBarItem" title="Item" id="RnB-fU-3RS" customClass="AdaptiveTabBarItem" customModule="example_date_adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Hsc-p3-elF" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
@@ -163,7 +185,7 @@
<!--Item-->
<scene sceneID="B98-FR-Rjt">
<objects>
<viewController id="BgE-dr-gW8" customClass="MoreViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<viewController id="BgE-dr-gW8" customClass="MoreViewController" customModule="example_date_adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="r9s-DG-v8Y"/>
<viewControllerLayoutGuide type="bottom" id="mju-qR-F4m"/>
@@ -172,13 +194,19 @@
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="fel-JW-y8K">
<rect key="frame" x="0.0" y="0.0" width="640" height="550"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="background" translatesAutoresizingMaskIntoConstraints="NO" id="fel-JW-y8K">
<rect key="frame" x="16" y="0.0" width="568" height="551"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="mju-qR-F4m" firstAttribute="top" secondItem="fel-JW-y8K" secondAttribute="bottom" id="czL-kW-Gi5"/>
<constraint firstItem="fel-JW-y8K" firstAttribute="top" secondItem="dgq-yB-Neb" secondAttribute="top" id="h6H-Nt-0EU"/>
<constraint firstItem="fel-JW-y8K" firstAttribute="leading" secondItem="dgq-yB-Neb" secondAttribute="leading" constant="16" id="lvq-kK-shl"/>
<constraint firstAttribute="trailing" secondItem="fel-JW-y8K" secondAttribute="trailing" constant="16" id="mnN-oR-w60"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Item" id="uWZ-JL-cND" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
<tabBarItem key="tabBarItem" title="Item" id="uWZ-JL-cND" customClass="AdaptiveTabBarItem" customModule="example_date_adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="xAq-zT-Wnn" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>

Some files were not shown because too many files have changed in this diff Show More