67 Commits

Author SHA1 Message Date
Ramotion eace1a5b4d Update README.md 2020-04-06 09:58:30 +03:00
igor.k 21b8ea087a fix problems with selection indicator image 2019-11-13 16:41:12 +03:00
igor.k 4d0162909d fix sample 2019-11-13 13:56:03 +03:00
igor.k a435f988d5 remove deprecated tests 2019-11-12 19:27:39 +03:00
igor.k 52ba619a3a fix path to sources 2019-11-12 19:22:36 +03:00
igor.k 3ad3f59a6e add SPM config 2019-11-12 19:15:08 +03:00
Ramotion 5d2346f38a Update README.md 2019-10-12 21:15:58 +03:00
Alex K 9d999a1be4 small fix 2019-04-03 14:44:05 +03:00
Alex K 426da87794 converted to swift 5 2019-04-03 14:23:51 +03:00
Ramotion 1064599cb3 Update README.md 2018-12-29 16:44:06 +03:00
Ramotion 381596a2eb Update README.md 2018-12-29 16:42:49 +03:00
Ramotion 37e9e30556 Update README.md 2018-12-10 12:03:12 +03:00
Alex K ca4b8b9720 swift 4.2 2018-09-27 09:37:46 +03:00
Ramotion 3c3f79637e Update README.md 2018-06-29 14:23:24 +03:00
Ramotion 93abf32033 Update README.md 2018-06-26 11:16:28 +03:00
Ramotion 16cce34ff5 Update README.md 2018-05-29 12:10:36 +03:00
Ramotion ba7cb095e8 Update README.md 2018-04-18 11:17:10 +03:00
Ramotion cd7c766c51 Add files via upload 2018-04-12 15:22:28 +03:00
Ramotion 6ef05aa9d7 Delete adaptive_tab_bar.gif 2018-04-12 15:20:47 +03:00
Ramotion 2cf746d050 Update README.md 2018-04-12 11:28:36 +03:00
Ramotion 12f8cfc881 Update README.md 2018-04-12 11:28:18 +03:00
Ramotion 7354e9c976 Add files via upload 2018-04-12 11:25:37 +03:00
Ramotion 8a46158737 Update README.md 2018-03-13 10:21:25 +03:00
Alex Mikhnev 55b44aca9d Update README.md 2018-02-21 14:48:59 +03:00
Alex K 187ba15a4f fix example 2018-01-22 17:40:16 +03:00
i.kolpachkov df0db9c8e2 add travis CI config 2018-01-18 16:34:08 +03:00
i.kolpachkov d75f317cd9 update tab background image 2018-01-09 11:45:40 +03:00
i.kolpachkov eab70abe7a tab bar appearance improvements 2018-01-09 00:47:27 +03:00
i.kolpachkov a8b1999080 refactoring & cleanup 2018-01-08 23:44:14 +03:00
i.kolpachkov 338ef526f3 update project settings 2018-01-08 18:35:12 +03:00
i.kolpachkov e6aece67f3 fix all migration compile errors 2018-01-08 18:33:18 +03:00
i.kolpachkov cc38f49845 reindex project files 2018-01-08 16:19:39 +03:00
i.kolpachkov c8e94a3091 add .gitignore file 2018-01-08 16:16:12 +03:00
i.kolpachkov 4190c297c8 update source code format 2018-01-08 16:13:04 +03:00
i.kolpachkov 9511862380 small cleanup, update swift version, errors fixing (wip) 2018-01-08 15:56:12 +03:00
Juri Vasylenko fc0114ee51 Update README.md 2017-07-27 15:03:06 +03:00
Juri Vasylenko cab4e21d2b Update README.md 2017-07-27 15:02:50 +03:00
Travis CI 3af1c7fcdc reorganize readme 2017-07-27 15:01:20 +03:00
Alex 5809c6b24d Update README.md 2017-06-27 11:56:06 +03:00
Juri Vasylenko 9055ab2179 Update README.md 2017-04-05 19:50:00 +03:00
Juri Vasylenko a094954bba Update README.md 2017-02-17 18:01:55 +03:00
Juri Vasylenko 0c85898b49 Update README.md 2017-01-20 16:08:12 +03:00
aleksei1000000 566cb1a0bf Update README.md 2017-01-10 17:22:02 +03:00
aleksei1000000 fafd0745ae Update README.md 2016-10-17 09:57:02 +03:00
aleksei1000000 7ab855050e Update README.md 2016-10-14 14:29:10 +03:00
aleksei1000000 f8d2ecc1fa Update README.md 2016-10-14 14:28:44 +03:00
Juri Vasylenko de3a844812 Update README.md 2016-08-15 10:25:47 +04:00
Juri Vasylenko ebfee6b409 Update README.md 2016-08-12 16:09:56 +04:00
Juri Vasylenko 21400a25bc Update README.md 2016-08-05 12:15:47 +04:00
Juri Vasylenko 14acdb95bc Update README.md 2016-08-05 12:05:29 +04:00
Juri Vasylenko 5a1edc6789 Update README.md 2016-07-29 16:18:47 +04:00
Juri Vasylenko 39e9ffb76f Update README.md 2016-02-01 12:15:43 +03:00
Juri Vasylenko 6b4ed26ff9 Update README.md 2016-02-01 12:13:15 +03:00
Juri Vasylenko a059faaa3e Update README.md 2016-02-01 10:19:51 +03:00
Juri Vasylenko cf26acd2d9 Merge pull request #5 from Ramotion/docs_update
Docs update
2016-02-01 10:18:17 +03:00
Juri Vasylenko 436078ef95 Update README.md 2016-02-01 10:16:50 +03:00
Juri Vasylenko 9657b66723 Update README.md 2016-02-01 10:05:17 +03:00
Juri Vasylenko e503a61104 Rename adaptive-tab-bar.svg to header.svg 2016-02-01 09:58:31 +03:00
Juri Vasylenko 5ca72e7dd6 change url for header 2016-02-01 09:56:56 +03:00
Juri Vasylenko fb22bbadc7 add header and link to Licence to docs 2016-02-01 09:54:02 +03:00
Juri Vasylenko adacae3759 add contributing guide, add badges and update docs 2016-01-31 20:34:25 +03:00
Alex 5444bf7d54 Update README.md 2016-01-18 16:56:03 +03:00
Juri Vasylenko 698641d00a Update README.md 2015-12-07 18:13:51 +03:00
Juri Vasylenko f3a656b853 Update README.md 2015-12-07 18:13:34 +03:00
Denis Pakhaliuk 14c9eeb019 Update README.md 2014-12-02 16:12:08 +03:00
Denis Pakhaliuk 7d42d0e6b8 Update README.md 2014-12-01 14:21:04 +03:00
Denis Pakhaliuk 09e2daf80f Update README.md 2014-11-28 18:07:16 +03:00
120 changed files with 1083 additions and 4697 deletions
+67
View File
@@ -0,0 +1,67 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
## Playgrounds
timeline.xctimeline
playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
.build/
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
Carthage/Checkouts
Carthage/Build
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
@@ -2,6 +2,6 @@
<Workspace
version = "1.0">
<FileRef
location = "self:adaptive-launches-tabbar.xcodeproj">
location = "self:">
</FileRef>
</Workspace>
+13
View File
@@ -0,0 +1,13 @@
osx_image: xcode9.2
language: objective-c
xcode_project: adaptive-tab-bar/SamplesAdaptiveController.xcworkspace
scheme: example
xcode_sdk: iphonesimulator11.2
# SWIFT_VERSION: 4.0
# whitelist
branches:
only:
- master
+2 -2
View File
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'AdaptiveController'
s.version = '0.0.1'
s.version = '1.1.0'
s.license = { :type => 'MIT' }
s.homepage = 'https://github.com/Ramotion/adaptive-tab-bar'
s.authors = { 'Artem Kislitsyn, Yuri Vasilenko' => 'yuri.v@ramotion.com' }
@@ -9,4 +9,4 @@ Pod::Spec.new do |s|
s.source_files = 'AdaptiveController/AdaptiveController/*.{h,swift}'
s.frameworks = 'Swift'
s.requires_arc = true
end
end
View File
+33
View File
@@ -0,0 +1,33 @@
# 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.
+43
View File
@@ -0,0 +1,43 @@
// swift-tools-version:5.1
//
// Package.swift
//
// Copyright (c) Ramotion (https://www.ramotion.com/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
import PackageDescription
let package = Package(
name: "AdaptiveController",
platforms: [
.iOS(.v8)
],
products: [
.library(name: "AdaptiveController",
targets: ["AdaptiveController"]),
],
targets: [
.target(name: "AdaptiveController",
path: "adaptive-tab-bar/AdaptiveController/AdaptiveController")
],
swiftLanguageVersions: [.v5]
)
+51 -15
View File
@@ -1,32 +1,54 @@
# Adaptive Tab Bar
<a href="https://www.ramotion.com/agency/app-development/?utm_source=gthb&utm_medium=repo&utm_campaign=adaptive-tab-bar"><img src="https://github.com/Ramotion/folding-cell/blob/master/header.png"></a>
AdaptiveController is a 'Progressive Reduction' Swift module for adding custom states to Native or Custom UI elements.
<a href="https://github.com/Ramotion/adaptive-tab-bar">
<img align="left" src="https://github.com/Ramotion/adaptive-tab-bar/blob/master/adaptive_tab_bar.gif" width="480" height="360" /></a>
![Mou icon](https://d13yacurqjgara.cloudfront.net/users/25514/screenshots/1320024/viber-ios7-concept-navigation-bar-ramotion.gif)
<p><h1 align="left">ADAPTIVE TAB BAR</h1></p>
##Tab Bar After Install
![Mou icon](http://i.imgur.com/7V6M7z6.png?1)
<h4>'Progressive Reduction' module for adding custom states to Native or Custom UI elements.</h4>
##Tab Bar After Two Weeks
![Mou icon](http://i.imgur.com/KTZIC4Z.png?1)
___
##Tab Bar After a Month
![Mou icon](http://i.imgur.com/TNQMGTf.png?1)
##Overview
<p><h6>We specialize in the designing and coding of custom UI for Mobile Apps and Websites.</h6>
<a href="https://www.ramotion.com/agency/app-development/?utm_source=gthb&utm_medium=repo&utm_campaign=adaptive-tab-bar">
<img src="https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png" width="187" height="34"></a>
</p>
<p><h6>Stay tuned for the latest updates:</h6>
<a href="https://goo.gl/rPFpid" >
<img src="https://i.imgur.com/ziSqeSo.png/" width="156" height="28"></a></p>
</br>
[![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)
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/Ramotion)
## Tab Bar After Install
![Animation](http://i.imgur.com/7V6M7z6.png?1)
## Tab Bar After Two Weeks
![Animation](http://i.imgur.com/KTZIC4Z.png?1)
## Tab Bar After a Month
![Animation](http://i.imgur.com/TNQMGTf.png?1)
## Overview
AdaptiveController is module for adding custom states to Native or Custom UI elements. The UI elements evolve over time as the user becomes accustomed to them. An example AdaptiveTabBar is provided.
##How to import the control to your project
## How to import the control to your project
1. First, drag and drop the AdaptiveController project file into your project or select "add existing file" and choose the AdaptiveController project
2. Add AdaptiveController to your Target Dependences in the Build Phase of your project.
3. Add the AdaptiveController framework in Link Binary With Libraries in Build Phases
4. Import AdaptiveController where needed.
##Using AdaptiveController
## Using AdaptiveController
First, you should set the install date, current date, count of days to transition to small text state, and count of days to transition to big image state. The AdaptiveDateState object automatically determines what UI state to show:
@@ -164,8 +186,22 @@ In AdaptiveDateState, we add custom init methods which decided what states have
You can customize different UI components if they adopt to the AdaptiveApperanceProtocol.
##About us
## 📄 License
[Ramotion](http://Ramotion.com) is an iPhone app design and development company. We are ready for new interesting iOS App Development projects.
Adaptive Tab Bar is released under the MIT license.
See [LICENSE](./LICENSE) for details.
Follow us on [twitter](http://twitter.com/ramotion).
This library is a part of a <a href="https://github.com/Ramotion/swift-ui-animation-components-and-libraries"><b>selection of our best UI open-source projects.</b></a>
If you use the open-source library in your project, please make sure to credit and backlink to www.ramotion.com
## 📱 Get the Showroom App for iOS to give it a try
Try this UI component and more like this in our iOS app. Contact us if interested.
<a href="https://itunes.apple.com/app/apple-store/id1182360240?pt=550053&ct=adaptive-tab-bar&mt=8" >
<img src="https://github.com/ramotion/gliding-collection/raw/master/app_store@2x.png" width="117" height="34"></a>
<a href="https://www.ramotion.com/agency/app-development/?utm_source=gthb&utm_medium=repo&utm_campaign=adaptive-tab-bar">
<img src="https://github.com/ramotion/gliding-collection/raw/master/contact_our_team@2x.png" width="187" height="34"></a>
<br>
<br>
@@ -8,40 +8,26 @@
/* Begin PBXBuildFile section */
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 */; };
6AAE857A19D329C6005672CA /* AdaptiveState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AAE857619D329C6005672CA /* AdaptiveState.swift */; };
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 */; };
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 */
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>"; };
6AAE857619D329C6005672CA /* AdaptiveState.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AdaptiveState.swift; sourceTree = "<group>"; };
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>"; };
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>"; };
6AFBC6DC19D313D600D42578 /* AdaptiveControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AdaptiveControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6AFBC6DF19D313D600D42578 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6AFBC6E019D313D600D42578 /* AdaptiveControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdaptiveControllerTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -52,13 +38,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
6AFBC6D919D313D600D42578 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
@@ -101,7 +80,6 @@
isa = PBXGroup;
children = (
6AFBC6D319D313D600D42578 /* AdaptiveController */,
6AFBC6DD19D313D600D42578 /* AdaptiveControllerTests */,
6AFBC6D219D313D600D42578 /* Products */,
);
sourceTree = "<group>";
@@ -110,7 +88,6 @@
isa = PBXGroup;
children = (
6AFBC6D119D313D600D42578 /* AdaptiveController.framework */,
6AFBC6DC19D313D600D42578 /* AdaptiveControllerTests.xctest */,
);
name = Products;
sourceTree = "<group>";
@@ -136,28 +113,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
6AFBC6DD19D313D600D42578 /* AdaptiveControllerTests */ = {
isa = PBXGroup;
children = (
6A6270A519F1653900D02B1A /* watch@2x.png */,
6A3ED0C919ED02DA006F06DD /* DateExtension.swift */,
6AFBC6E019D313D600D42578 /* AdaptiveControllerTests.swift */,
6A3ED0CB19ED058F006F06DD /* AdaptiveDateStateTest.swift */,
6A3ED0CD19ED05D8006F06DD /* AdaptiveLaunchesStateTest.swift */,
6AD1EC2A19F1165E003F36A4 /* TestTabBarItem.swift */,
6AFBC6DE19D313D600D42578 /* Supporting Files */,
);
path = AdaptiveControllerTests;
sourceTree = "<group>";
};
6AFBC6DE19D313D600D42578 /* Supporting Files */ = {
isa = PBXGroup;
children = (
6AFBC6DF19D313D600D42578 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
@@ -190,46 +145,28 @@
productReference = 6AFBC6D119D313D600D42578 /* AdaptiveController.framework */;
productType = "com.apple.product-type.framework";
};
6AFBC6DB19D313D600D42578 /* AdaptiveControllerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6AFBC6E719D313D600D42578 /* Build configuration list for PBXNativeTarget "AdaptiveControllerTests" */;
buildPhases = (
6AFBC6D819D313D600D42578 /* Sources */,
6AFBC6D919D313D600D42578 /* Frameworks */,
6AFBC6DA19D313D600D42578 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = AdaptiveControllerTests;
productName = AdaptiveControllerTests;
productReference = 6AFBC6DC19D313D600D42578 /* AdaptiveControllerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
6AFBC6C819D313D600D42578 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0600;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Ramotion;
TargetAttributes = {
6AFBC6D019D313D600D42578 = {
CreatedOnToolsVersion = 6.0.1;
};
6AFBC6DB19D313D600D42578 = {
CreatedOnToolsVersion = 6.0.1;
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = 6AFBC6CB19D313D600D42578 /* Build configuration list for PBXProject "AdaptiveController" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 6AFBC6C719D313D600D42578;
productRefGroup = 6AFBC6D219D313D600D42578 /* Products */;
@@ -237,7 +174,6 @@
projectRoot = "";
targets = (
6AFBC6D019D313D600D42578 /* AdaptiveController */,
6AFBC6DB19D313D600D42578 /* AdaptiveControllerTests */,
);
};
/* End PBXProject section */
@@ -250,14 +186,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
6AFBC6DA19D313D600D42578 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6A6270A619F1653900D02B1A /* watch@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -275,18 +203,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
6AFBC6D819D313D600D42578 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6AD1EC2B19F1165E003F36A4 /* TestTabBarItem.swift in Sources */,
6A3ED0CE19ED05D8006F06DD /* AdaptiveLaunchesStateTest.swift in Sources */,
6A3ED0CA19ED02DA006F06DD /* DateExtension.swift in Sources */,
6A3ED0CC19ED058F006F06DD /* AdaptiveDateStateTest.swift in Sources */,
6AFBC6E119D313D600D42578 /* AdaptiveControllerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
@@ -295,17 +211,28 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -313,8 +240,10 @@
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@@ -333,6 +262,7 @@
SDKROOT = iphoneos;
SWIFT_INCLUDE_PATHS = "\"$(SRCROOT)/AdaptiveController/\"";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/AdaptiveController/\"/**";
VERSIONING_SYSTEM = "apple-generic";
@@ -345,17 +275,28 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = YES;
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -365,6 +306,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -375,6 +317,8 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_INCLUDE_PATHS = "\"$(SRCROOT)/AdaptiveController/\"";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
USER_HEADER_SEARCH_PATHS = "\"$(SRCROOT)/AdaptiveController/\"/**";
VALIDATE_PRODUCT = YES;
@@ -388,6 +332,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_MODULES = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -395,10 +340,12 @@
INFOPLIST_FILE = AdaptiveController/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "ramotion.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
USER_HEADER_SEARCH_PATHS = "";
};
name = Debug;
@@ -408,6 +355,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_MODULES = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
@@ -415,43 +363,15 @@
INFOPLIST_FILE = AdaptiveController/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "ramotion.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_INCLUDE_PATHS = "";
SWIFT_VERSION = 5.0;
USER_HEADER_SEARCH_PATHS = "";
};
name = Release;
};
6AFBC6E819D313D600D42578 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = AdaptiveControllerTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
6AFBC6E919D313D600D42578 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = AdaptiveControllerTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -473,15 +393,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6AFBC6E719D313D600D42578 /* Build configuration list for PBXNativeTarget "AdaptiveControllerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6AFBC6E819D313D600D42578 /* Debug */,
6AFBC6E919D313D600D42578 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 6AFBC6C819D313D600D42578 /* Project object */;
@@ -2,9 +2,7 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
<true/>
<key>SnapshotAutomaticallyBeforeSignificantChanges</key>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -1,114 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AFBC6D019D313D600D42578"
BuildableName = "AdaptiveController.framework"
BlueprintName = "AdaptiveController"
ReferencedContainer = "container:AdaptiveController.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6A5558B219E2BAB100ED3B5C"
BuildableName = "example-count-launches-adaptive-tabbar.app"
BlueprintName = "example-count-launches-adaptive-tabbar"
ReferencedContainer = "container:../Samples/adaptive-launches-tabbar/example-count-launches-adaptive-tabbar.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AD5A2F219C6C95E00606826"
BuildableName = "example-date-adaptive-tab-bar.app"
BlueprintName = "example-date-adaptive-tab-bar"
ReferencedContainer = "container:../Samples/adaptive-dates-tabbar/example-date-adaptive-tab-bar.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AFBC6D019D313D600D42578"
BuildableName = "AdaptiveController.framework"
BlueprintName = "AdaptiveController"
ReferencedContainer = "container:AdaptiveController.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AFBC6D019D313D600D42578"
BuildableName = "AdaptiveController.framework"
BlueprintName = "AdaptiveController"
ReferencedContainer = "container:AdaptiveController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AFBC6D019D313D600D42578"
BuildableName = "AdaptiveController.framework"
BlueprintName = "AdaptiveController"
ReferencedContainer = "container:AdaptiveController.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,96 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AFBC6DB19D313D600D42578"
BuildableName = "AdaptiveControllerTests.xctest"
BlueprintName = "AdaptiveControllerTests"
ReferencedContainer = "container:AdaptiveController.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AFBC6DB19D313D600D42578"
BuildableName = "AdaptiveControllerTests.xctest"
BlueprintName = "AdaptiveControllerTests"
ReferencedContainer = "container:AdaptiveController.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AFBC6DB19D313D600D42578"
BuildableName = "AdaptiveControllerTests.xctest"
BlueprintName = "AdaptiveControllerTests"
ReferencedContainer = "container:AdaptiveController.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AFBC6DB19D313D600D42578"
BuildableName = "AdaptiveControllerTests.xctest"
BlueprintName = "AdaptiveControllerTests"
ReferencedContainer = "container:AdaptiveController.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AFBC6DB19D313D600D42578"
BuildableName = "AdaptiveControllerTests.xctest"
BlueprintName = "AdaptiveControllerTests"
ReferencedContainer = "container:AdaptiveController.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,32 +0,0 @@
<?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">
<dict>
<key>SchemeUserState</key>
<dict>
<key>AdaptiveController.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>AdaptiveControllerTests.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>6AFBC6D019D313D600D42578</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>6AFBC6DB19D313D600D42578</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
@@ -8,171 +8,138 @@
import UIKit
public let defaultFont = UIFont(name: "Helvetica", size: 14.0)
public let defaultFont: UIFont = UIFont(name: "Helvetica", size: 14.0)!
public let kNotTitle = ""
public class AdaptiveButtonAppearance: NSObject {
private var butonsTitleForStateDictionary:Dictionary <String,String> = Dictionary<String,String>()
private var butonsTitleFontForStateDictionary:Dictionary <String,UIFont> = Dictionary<String,UIFont>()
private var buttonsImageForStateDictionary:Dictionary <String,UIImage> = Dictionary<String,UIImage>()
private var buttonsBackgroundImageForStateDictionary:Dictionary <String,UIImage> = Dictionary<String,UIImage>()
private var buttonsImageInsetsForStateDictionary:Dictionary <String,UIEdgeInsets> = Dictionary<String,UIEdgeInsets>()
private var buttonsTitleInsetsForStateDictionary:Dictionary <String,UIOffset> = Dictionary<String,UIOffset>()
private var buttonsTitleColorsForStateDictionary:Dictionary <String,UIColor> = Dictionary<String,UIColor>()
func setInsetsFromAdaptiveButtonApperance(adaptiveButtonApperance:AdaptiveButtonAppearance){
self.buttonsImageInsetsForStateDictionary = adaptiveButtonApperance.buttonsImageInsetsForStateDictionary
self.buttonsTitleInsetsForStateDictionary = adaptiveButtonApperance.buttonsTitleInsetsForStateDictionary
public class AdaptiveButtonAppearance: NSObject {
private var butonsTitleForStateDictionary: Dictionary<String, String> = Dictionary<String, String>()
private var butonsTitleFontForStateDictionary: Dictionary<String, UIFont> = Dictionary<String, UIFont>()
private var buttonsImageForStateDictionary: Dictionary<String, UIImage> = Dictionary<String, UIImage>()
private var buttonsBackgroundImageForStateDictionary: Dictionary<String, UIImage> = Dictionary<String, UIImage>()
private var buttonsImageInsetsForStateDictionary: Dictionary<String, UIEdgeInsets> = Dictionary<String, UIEdgeInsets>()
private var buttonsTitleInsetsForStateDictionary: Dictionary<String, UIOffset> = Dictionary<String, UIOffset>()
private var buttonsTitleColorsForStateDictionary: Dictionary<String, UIColor> = Dictionary<String, UIColor>()
func setInsetsFromAdaptiveButtonApperance(_ apperance: AdaptiveButtonAppearance) {
buttonsImageInsetsForStateDictionary = apperance.buttonsImageInsetsForStateDictionary
buttonsTitleInsetsForStateDictionary = apperance.buttonsTitleInsetsForStateDictionary
}
public func setFontsFromAdaptiveButtonApperance(adaptiveButtonApperance:AdaptiveButtonAppearance){
self.butonsTitleFontForStateDictionary = adaptiveButtonApperance.butonsTitleFontForStateDictionary
public func setFontsFromAdaptiveButtonApperance(_ apperance: AdaptiveButtonAppearance) {
butonsTitleFontForStateDictionary = apperance.butonsTitleFontForStateDictionary
}
public func setAllCommonApperanceFrom(adaptiveButtonApperance:AdaptiveButtonAppearance){
self.setInsetsFromAdaptiveButtonApperance(adaptiveButtonApperance)
self.setFontsFromAdaptiveButtonApperance(adaptiveButtonApperance)
self.buttonsTitleColorsForStateDictionary = adaptiveButtonApperance.buttonsTitleColorsForStateDictionary
public func setAllCommonApperanceFrom(adaptiveButtonApperance: AdaptiveButtonAppearance) {
setInsetsFromAdaptiveButtonApperance(adaptiveButtonApperance)
setFontsFromAdaptiveButtonApperance(adaptiveButtonApperance)
buttonsTitleColorsForStateDictionary = adaptiveButtonApperance.buttonsTitleColorsForStateDictionary
}
public func setImageNamesForStatesImageExtesions(imageName :String ,imageExtensionsForState:Dictionary <String,String>){
self.setButtonImage(UIImage(named: imageName), state: kDefaultAdaptiveState)
for (state,imageExtension) in imageExtensionsForState {
self.setButtonImage(UIImage(named: imageName+imageExtension), state: state)
public func setImageNamesForStatesImageExtesions(imageName: String, imageExtensionsForState: Dictionary<String, String>) {
setButtonImage(image: UIImage(named: imageName), state: kDefaultAdaptiveState)
for (state, imageExtension) in imageExtensionsForState {
setButtonImage(image: UIImage(named: imageName + imageExtension), state: state)
}
}
public func setButonTitle(title:NSString, state:String){
println(title)
println(state)
butonsTitleForStateDictionary.updateValue(title, forKey:state)
public func setButonTitle(title: String, state: String) {
butonsTitleForStateDictionary.updateValue(title, forKey: state)
}
public func getButonTitleForState(state:NSString)->String!{
public func getButonTitleForState(state: String) -> String! {
if let title = butonsTitleForStateDictionary[state] {
return title
}else{
} else {
if let title = butonsTitleForStateDictionary[kDefaultAdaptiveState] {
return title
}else{
} else {
return kNotTitle
}
}
}
public func setButonTitleFontForState(font:UIFont, state:String){
butonsTitleFontForStateDictionary.updateValue(font, forKey:state)
public func setButonTitleFontForState(font: UIFont, state: String) {
butonsTitleFontForStateDictionary.updateValue(font, forKey: state)
}
public func getButonTitleFontForState(state:NSString)->UIFont{
var font:UIFont? = butonsTitleFontForStateDictionary[state]
public func getButonTitleFontForState(state: String) -> UIFont {
if let font = butonsTitleFontForStateDictionary[state] {
return font
}else{
} else {
if let font = butonsTitleFontForStateDictionary[kDefaultAdaptiveState] {
return font
}else{
} else {
return defaultFont
}
}
}
public func setButtonImage(image:UIImage, state:String){
buttonsImageForStateDictionary.updateValue(image, forKey:state)
print("set State \(state)")
public func setButtonImage(image: UIImage?, state: String) {
buttonsImageForStateDictionary[state] = image
}
public func getButonImageForState(state:NSString)->UIImage!{
print("get State \(state)")
public func getButonImageForState(state: String) -> UIImage? {
if let image = buttonsImageForStateDictionary[state] {
return image
}else{
} else {
return buttonsImageForStateDictionary[kDefaultAdaptiveState]
}
}
public func setBackgroundButonImage(image: UIImage, state: String) {
buttonsImageForStateDictionary.updateValue(image, forKey: state)
}
public func setBackgroundButonImage(image:UIImage, state:String){
buttonsImageForStateDictionary.updateValue(image, forKey:state)
}
public func getBackgroundImageForState(state:NSString)->UIImage?{
public func getBackgroundImageForState(state: String) -> UIImage? {
if let image = buttonsBackgroundImageForStateDictionary[state] {
return image
}else{
} else {
return buttonsBackgroundImageForStateDictionary[kDefaultAdaptiveState]
}
}
public func setImageInsets(insets:UIEdgeInsets, state:String){
buttonsImageInsetsForStateDictionary.updateValue(insets, forKey:state)
}
public func getImageInsetsForState(state:NSString)->UIEdgeInsets!{
if let insets = buttonsImageInsetsForStateDictionary[state] {
return buttonsImageInsetsForStateDictionary[state]!
}else{
return buttonsImageInsetsForStateDictionary[kDefaultAdaptiveState]
}
}
public func setTitleOffset(insets:UIOffset, state:String){
buttonsTitleInsetsForStateDictionary.updateValue(insets, forKey:state)
}
public func getTitleOffsetForState(state:NSString)->UIOffset!{
var offset:UIOffset? = buttonsTitleInsetsForStateDictionary[state]
if(offset == nil){
offset = buttonsTitleInsetsForStateDictionary[kDefaultAdaptiveState]?
}
return offset!
}
public func setTitleColor(color:UIColor, state:String){
buttonsTitleColorsForStateDictionary.updateValue(color, forKey:state)
}
public func getTitleColorForState(state:NSString)->UIColor!{
var offset:UIColor? = buttonsTitleColorsForStateDictionary[state]
if(offset == nil){
offset = buttonsTitleColorsForStateDictionary[kDefaultAdaptiveState]?
}
return offset!
}
public func setImageInsets(insets: UIEdgeInsets, state: String) {
buttonsImageInsetsForStateDictionary.updateValue(insets, forKey: state)
}
public func getImageInsetsForState(state: String) -> UIEdgeInsets {
if let insets = buttonsImageInsetsForStateDictionary[state] {
return insets
} else {
return buttonsImageInsetsForStateDictionary[kDefaultAdaptiveState] ?? UIEdgeInsets.zero
}
}
public func setTitleOffset(insets: UIOffset, state: String) {
buttonsTitleInsetsForStateDictionary.updateValue(insets, forKey: state)
}
public func getTitleOffsetForState(state: String) -> UIOffset {
if let offset: UIOffset = buttonsTitleInsetsForStateDictionary[state] {
return offset
} else {
return buttonsTitleInsetsForStateDictionary[kDefaultAdaptiveState] ?? UIOffset.zero
}
}
public func setTitleColor(color: UIColor, state: String) {
buttonsTitleColorsForStateDictionary.updateValue(color, forKey: state)
}
public func getTitleColorForState(state: String) -> UIColor? {
if let color: UIColor = buttonsTitleColorsForStateDictionary[state] {
return color
} else {
return buttonsTitleColorsForStateDictionary[kDefaultAdaptiveState]
}
}
}
@@ -11,92 +11,78 @@ import UIKit
public let countDaysToSmallTextState = 14
public let countDaysToImageState = 30
public let defaultInsets = UIEdgeInsetsMake(0, 0,0, 0)
public let defaultSmallTitleModeFont = UIFont(name: "Helvetica", size: 10.0)
public let defaultSmallTitleModeImageInsets = UIEdgeInsetsMake(0, 0, 0, 0)
public let defaultImageModeInsets = UIEdgeInsetsMake(6, 0, -6, 0)
public let defaultSmallTitleModeOffset = UIOffsetMake(0, 20)
public let defaultOffset = UIOffsetMake(0, 00)
public let tabColor = UIColor(red: 169/255, green: 79/255, blue: 152/255, alpha: 1.0)
public let defaultInsets = UIEdgeInsets.init(top: 0, left: 0, bottom: 0, right: 0)
public let defaultSmallTitleModeFont = UIFont(name: "Helvetica", size: 10.0)!
public let defaultSmallTitleModeImageInsets = UIEdgeInsets.init(top: 0, left: 0, bottom: 0, right: 0)
public let defaultImageModeInsets = UIEdgeInsets.init(top: 6, left: 0, bottom: -6, right: 0)
public let defaultSmallTitleModeOffset = UIOffset.init(horizontal: 0, vertical: 20)
public let defaultOffset = UIOffset.init(horizontal: 0, vertical: 00)
public let tabColor = UIColor(red: 169 / 255, green: 79 / 255, blue: 152 / 255, alpha: 1.0)
@objc public protocol AdaptiveApperanceProtocol {
optional func setFontToAdaptiveButton(font: UIFont)
optional func setTitleToAdaptiveButton(text: NSString)
optional func setImageToAdaptiveButton(image: UIImage?)
optional func setHighlightedToAdaptiveButton(image: UIImage?)
optional func setBackgroundImageToAdaptiveButton(image: UIImage?)
optional func setSelectedImageToAdaptiveButton(image: UIImage?)
optional func setImageInsetsToAdaptiveButton(insets: UIEdgeInsets)
optional func setTitleOffsetToAdaptiveButton(offset: UIOffset)
optional func setTitleColorToAdaptiveButton(titleColor: UIColor)
@objc public protocol AdaptiveApperanceProtocol {
@objc optional func setFontToAdaptiveButton(font: UIFont)
@objc optional func setTitleToAdaptiveButton(text: String)
@objc optional func setImageToAdaptiveButton(image: UIImage?)
@objc optional func setHighlightedToAdaptiveButton(image: UIImage?)
@objc optional func setBackgroundImageToAdaptiveButton(image: UIImage?)
@objc optional func setSelectedImageToAdaptiveButton(image: UIImage?)
@objc optional func setImageInsetsToAdaptiveButton(insets: UIEdgeInsets)
@objc optional func setTitleOffsetToAdaptiveButton(offset: UIOffset)
@objc optional func setTitleColorToAdaptiveButton(titleColor: UIColor)
}
public let selected = "Selected"
public let highlighted = "Higlihted"
public class AdaptiveButtonsStateManager: NSObject {
public convenience init (state:AdaptiveState,buttonsAray:[AdaptiveApperanceProtocol],buttonsAppearance:[AdaptiveButtonAppearance]){
public class AdaptiveButtonsStateManager {
public convenience init(state: AdaptiveState, buttonsAray: [AdaptiveApperanceProtocol], buttonsAppearance: [AdaptiveButtonAppearance]) {
self.init()
self.setButtonsState(state, buttonsAray: buttonsAray, buttonsAppearance: buttonsAppearance)
AdaptiveButtonsStateManager.configureButtonsState(state: state, buttonsAray: buttonsAray, buttonsAppearance: buttonsAppearance)
}
public func setButtonsState(state:AdaptiveState,buttonsAray:[AdaptiveApperanceProtocol],buttonsAppearance:[AdaptiveButtonAppearance]){
var state:String = state.currentItemState!
var countElements = buttonsAray.count > buttonsAppearance.count ? buttonsAppearance.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]
let title = buttonApperance.getButonTitleForState(state)
println("title: /(title)")
println(NSString(format:"title %@",title))
button.setTitleToAdaptiveButton!(title)
button.setFontToAdaptiveButton!(buttonApperance.getButonTitleFontForState(state))
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) {
button.setBackgroundImageToAdaptiveButton?(backgroundImage)
}
if let imageInset = buttonApperance.getImageInsetsForState(state) {
button.setImageInsetsToAdaptiveButton?(imageInset)
}
if let titleOffset = buttonApperance.getTitleOffsetForState(state) {
button.setTitleOffsetToAdaptiveButton?(titleOffset)
}
if let titleColor = buttonApperance.getTitleColorForState(state) {
button.setTitleColorToAdaptiveButton?(titleColor)
}
public static func configureButtonsState(state: AdaptiveState, buttonsAray: [AdaptiveApperanceProtocol], buttonsAppearance: [AdaptiveButtonAppearance]) {
let state: String = state.currentItemState
let countElements = min(buttonsAray.count, buttonsAppearance.count)
for index in 0..<countElements {
let button: AdaptiveApperanceProtocol = buttonsAray[index]
let buttonApperance = buttonsAppearance[index]
if let title = buttonApperance.getButonTitleForState(state: state) {
button.setTitleToAdaptiveButton?(text: title)
}
if let image = buttonApperance.getButonImageForState(state: state) {
button.setImageToAdaptiveButton?(image: image)
}
if let selectedImage = buttonApperance.getButonImageForState(state: state + selected) {
button.setSelectedImageToAdaptiveButton?(image: selectedImage)
}
if let highlightedImage = buttonApperance.getButonImageForState(state: state + highlighted) {
button.setHighlightedToAdaptiveButton?(image: highlightedImage)
}
if let backgroundImage = buttonApperance.getButonImageForState(state: state) {
button.setBackgroundImageToAdaptiveButton?(image: backgroundImage)
}
if let titleColor = buttonApperance.getTitleColorForState(state: state) {
button.setTitleColorToAdaptiveButton?(titleColor: titleColor)
}
let font = buttonApperance.getButonTitleFontForState(state: state)
button.setFontToAdaptiveButton?(font: font)
let imageInset = buttonApperance.getImageInsetsForState(state: state)
button.setImageInsetsToAdaptiveButton?(insets: imageInset)
let titleOffset = buttonApperance.getTitleOffsetForState(state: state)
button.setTitleOffsetToAdaptiveButton?(offset: titleOffset)
}
}
}
@@ -12,43 +12,32 @@ public let kSmallTitleAdaptiveState = "kImageAdaptiveState"
public let kImageAdaptiveState = "kNormalImageAdaptiveState"
public class AdaptiveDateState: AdaptiveState {
public override init(){
public override init() {
super.init()
super.addNewCustomAdaptiveStates([kSmallTitleAdaptiveState,kImageAdaptiveState])
super.addNewCustomAdaptiveStates(customAdaptiveStates: [kSmallTitleAdaptiveState, kImageAdaptiveState])
}
public convenience init(installDate:NSDate, currentDate:NSDate,countDaysToSmallTextState:Int,countDaysToImageState:Int) {
public convenience init(installDate: Date, currentDate: Date, countDaysToSmallTextState: Int, countDaysToImageState: Int) {
self.init()
var remainsDays = self.daysBetweenDates(installDate,currentDate: currentDate)
self.currentItemState = self.stateRemainDays(remainsDays,countDaysToSmallTextState:countDaysToSmallTextState,countDaysToImageState:countDaysToImageState)
print(currentItemState)
let remainsDays = daysBetweenDates(installDate: installDate, currentDate: currentDate)
currentItemState = stateRemainDays(remainDays: remainsDays, countDaysToSmallTextState: countDaysToSmallTextState, countDaysToImageState: countDaysToImageState)
}
func daysBetweenDates(installDate:NSDate, currentDate:NSDate) -> Int{
let cal = NSCalendar.currentCalendar()
let unit:NSCalendarUnit = .DayCalendarUnit
let components = cal.components(unit, fromDate: installDate, toDate: currentDate, options: nil)
return components.day+1;
func daysBetweenDates(installDate: Date, currentDate: Date) -> Int {
let units = Set<Calendar.Component>([.day])
let components = NSCalendar.current.dateComponents(units, from: installDate, to: currentDate)
return (components.day ?? 0) + 1
}
func stateRemainDays (remainDays:Int,countDaysToSmallTextState:Int,countDaysToImageState:Int)->String{
var mode:String = kDefaultAdaptiveState
print(" DAYS \(remainDays) ")
if remainDays > countDaysToSmallTextState && remainDays < countDaysToImageState{
func stateRemainDays(remainDays: Int, countDaysToSmallTextState: Int, countDaysToImageState: Int) -> String {
var mode: String = kDefaultAdaptiveState
if remainDays > countDaysToSmallTextState && remainDays < countDaysToImageState {
mode = kSmallTitleAdaptiveState
}else if remainDays > countDaysToImageState {
} else if remainDays > countDaysToImageState {
mode = kImageAdaptiveState
}
print(mode)
return mode
}
}
@@ -10,33 +10,28 @@ public let countDaysForImageModeState = 7
import UIKit
public class AdaptiveLaunchesState : AdaptiveState {
public override init(){
public class AdaptiveLaunchesState: AdaptiveState {
public override init() {
super.init()
super.addNewCustomAdaptiveStates([kSmallTitleAdaptiveState,kImageAdaptiveState])
super.addNewCustomAdaptiveStates(customAdaptiveStates: [kSmallTitleAdaptiveState, kImageAdaptiveState])
}
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)
currentItemState = stateRemainDays(curentCountLaunches: curentCountLaunches, countLaunchesToSmallTextState: countLaunchesToSmallTextState, countLaunchesToImageState: countLaunchesToImageState)
}
internal func stateRemainDays (curentCountLaunches:Int,countLaunchesToSmallTextState:Int,countLaunchesToImageState:Int)->String{
var mode:String = kDefaultAdaptiveState
if curentCountLaunches > countLaunchesToSmallTextState && curentCountLaunches < countLaunchesToImageState{
internal func stateRemainDays(curentCountLaunches: Int, countLaunchesToSmallTextState: Int, countLaunchesToImageState: Int) -> String {
var mode: String = kDefaultAdaptiveState
if curentCountLaunches > countLaunchesToSmallTextState && curentCountLaunches < countLaunchesToImageState {
mode = kSmallTitleAdaptiveState
}else if curentCountLaunches > countLaunchesToImageState {
} else if curentCountLaunches > countLaunchesToImageState {
mode = kImageAdaptiveState
}
return mode;
return mode
}
}
@@ -8,31 +8,19 @@
import UIKit
public let kDefaultAdaptiveState:String = "DefaultAdaptiveState"
public let kDefaultAdaptiveState: String = "DefaultAdaptiveState"
public class AdaptiveState: NSObject {
var currentItemState:NSString?
var buttonStates:[String] = [String]()
public override init(){
var currentItemState: String = kDefaultAdaptiveState
var buttonStates: [String] = [String]()
public override init() {
super.init()
self.currentItemState = kDefaultAdaptiveState
self.addNewCustomAdaptiveStates([kDefaultAdaptiveState])
addNewCustomAdaptiveStates(customAdaptiveStates: [kDefaultAdaptiveState])
}
internal func addNewCustomAdaptiveStates(customAdaptiveStates:Array<String>){
self.buttonStates+customAdaptiveStates
internal func addNewCustomAdaptiveStates(customAdaptiveStates: Array<String>) {
buttonStates += customAdaptiveStates
}
}
@@ -9,11 +9,10 @@
import Foundation
protocol ControlStateProtocol {
typealias StateEnum
var normalState: StateEnum?{get set}
var selectedState: StateEnum?{get set}
var highlightedState: StateEnum?{get set}
}
associatedtype StateEnum
var normalState: StateEnum? { get set }
var selectedState: StateEnum? { get set }
var highlightedState: StateEnum? { get set }
}
@@ -9,27 +9,22 @@
import UIKit
public enum ControlStateEnum {
case ControlStateFont(UIFont), ControlStateImage(UIImage),ControlStateTitle(String),ControlStateInsets(UIEdgeInsets),ControlStateColor(UIColor),UIControlState(UIOffset)
case ControlStateFont(UIFont), ControlStateImage(UIImage), ControlStateTitle(String), ControlStateInsets(UIEdgeInsets), ControlStateColor(UIColor), UIControlState(UIOffset)
}
public class ControlStateValue: ControlStateProtocol {
public class ControlStateValue:ControlStateProtocol{
public typealias StateEnum = ControlStateEnum
public var normalState: StateEnum?
public var selectedState: StateEnum?
public var highlightedState: StateEnum?
public convenience init(valueForNormalState: ControlStateEnum?) {
self.init()
public convenience init(valueForNormalState:ControlStateEnum?) {
self.init()
self.normalState = valueForNormalState
self.selectedState = valueForNormalState
self.highlightedState = valueForNormalState
normalState = valueForNormalState
selectedState = valueForNormalState
highlightedState = valueForNormalState
}
}
@@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>ramotion.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@@ -1,171 +0,0 @@
//
// AdaptiveControllerTests.swift
// AdaptiveControllerTests
//
// Created by Arcilite on 24.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import XCTest
import AdaptiveController
class AdaptiveControllerTests: XCTestCase {
class MockUIImage: UIImage {
var checkImageString:String?
}
override func setUp() {
super.setUp()
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testDefaultState() {
// This is an example of a functional test case.
var installDate = NSDate(dateString:"2014-07-7")
var currentDate = NSDate(dateString:"2014-07-7")
var adaptiveDateState = AdaptiveDateState(installDate: installDate,currentDate:currentDate,countDaysToSmallTextState:countDaysToSmallTextState,countDaysToImageState:countDaysToImageState)
var buttonsAppearances = buttonsAppearancesGenerate()
var tabBarItem = TestTabBarItem()
var arrayButtons = [tabBarItem]
AdaptiveButtonsStateManager(state: adaptiveDateState,buttonsAray:arrayButtons ,buttonsAppearance: buttonsAppearances)
//assert
XCTAssert(tabBarItem.color!.isEqual(UIColor.whiteColor()), "Fail color")
XCTAssert(UIOffsetEqualToOffset(tabBarItem.offset!,defaultOffset), "Fail offset")
XCTAssert(UIEdgeInsetsEqualToEdgeInsets(defaultInsets, tabBarItem.insets!), "Fail insets")
let bundle = NSBundle(forClass: AdaptiveButtonAppearance.self)
var image:MockUIImage = tabBarItem.image as MockUIImage
XCTAssert(image.checkImageString!.isEqual("default Image"), "Fail image")
XCTAssert(tabBarItem.text!.isEqualToString("watch"), "Fail text")
XCTAssert(tabBarItem.font!.isEqual(defaultFont), "Fail font")
}
func testSmallTextState() {
// This is an example of a functional test case.
var installDate = NSDate(dateString:"2014-07-7")
var currentDate = NSDate(dateString:"2014-07-21")
var adaptiveDateState = AdaptiveDateState(installDate: installDate,currentDate:currentDate,countDaysToSmallTextState:countDaysToSmallTextState,countDaysToImageState:countDaysToImageState)
XCTAssert(!adaptiveDateState.isEqual(kSmallTitleAdaptiveState), "Fail SmallTitleState")
var buttonsAppearances = buttonsAppearancesGenerate()
var tabBarItem = TestTabBarItem()
var arrayButtons = [tabBarItem]
AdaptiveButtonsStateManager(state: adaptiveDateState,buttonsAray:arrayButtons ,buttonsAppearance: buttonsAppearances)
XCTAssert(tabBarItem.color!.isEqual(UIColor.whiteColor()), "Fail color")
XCTAssert(UIOffsetEqualToOffset(tabBarItem.offset!,defaultOffset), "Fail offset")
XCTAssert(UIEdgeInsetsEqualToEdgeInsets(defaultInsets, tabBarItem.insets!), "Fail insets")
var image:MockUIImage = tabBarItem.image as MockUIImage
XCTAssert(image.checkImageString!.isEqual("smalltitle Image"), "Fail image")
XCTAssert(tabBarItem.font!.isEqual(defaultSmallTitleModeFont), "Fail font")
}
func testImageState() {
// This is an example of a functional test case.
var installDate = NSDate(dateString:"2014-07-7")
var currentDate = NSDate(dateString:"2014-08-21")
var adaptiveDateState = AdaptiveDateState(installDate: installDate,currentDate:currentDate,countDaysToSmallTextState:countDaysToSmallTextState,countDaysToImageState:countDaysToImageState)
XCTAssert(!adaptiveDateState.isEqual(kImageAdaptiveState), "Fail ImageAdaptiveState")
var buttonsAppearances = buttonsAppearancesGenerate()
var tabBarItem = TestTabBarItem()
var arrayButtons = [tabBarItem]
AdaptiveButtonsStateManager(state: adaptiveDateState,buttonsAray:arrayButtons ,buttonsAppearance: buttonsAppearances)
XCTAssert(tabBarItem.color!.isEqual(UIColor.whiteColor()), "Fail color")
XCTAssert(UIOffsetEqualToOffset(tabBarItem.offset!,defaultOffset), "Fail offset")
XCTAssert(UIEdgeInsetsEqualToEdgeInsets(defaultImageModeInsets, tabBarItem.insets!), "Fail insets")
var image:MockUIImage = tabBarItem.image as MockUIImage
XCTAssert(image.checkImageString!.isEqual("big Image"), "Fail image")
XCTAssert(tabBarItem.text!.isEqualToString(""), "Fail text")
XCTAssert(tabBarItem.font!.isEqual(defaultFont), "Fail font")
}
func buttonsAppearancesGenerate() -> [AdaptiveButtonAppearance]{
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.setButonTitleFontForState(defaultFont, state: kDefaultAdaptiveState)
watchAppearance.setButonTitleFontForState(defaultSmallTitleModeFont, state: kSmallTitleAdaptiveState)
//watchAppearance.setImageNamesForStatesImageExtesions("watch", imageExtensionsForState:imageExtensionsForStates)
let mockImage = MockUIImage()
mockImage.checkImageString = "default Image"
watchAppearance.setButtonImage(mockImage, state: kDefaultAdaptiveState)
let mockSmallTitleImage = MockUIImage()
mockSmallTitleImage.checkImageString = "smalltitle Image"
watchAppearance.setButtonImage(mockSmallTitleImage, state: kSmallTitleAdaptiveState)
let mockBigImageStateImage = MockUIImage()
mockBigImageStateImage.checkImageString = "big Image"
watchAppearance.setButtonImage(mockBigImageStateImage, state: kImageAdaptiveState)
watchAppearance.setImageInsets(defaultInsets, state: kDefaultAdaptiveState);
watchAppearance.setImageInsets(defaultSmallTitleModeImageInsets, state: kSmallTitleAdaptiveState)
watchAppearance.setTitleOffset(defaultOffset, state: kDefaultAdaptiveState)
watchAppearance.setImageInsets(defaultImageModeInsets, state: kImageAdaptiveState);
return [watchAppearance]
}
}
@@ -1,60 +0,0 @@
//
// AdaptiveDateStateTest.swift
// AdaptiveController
//
// Created by Arcilite on 14.10.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import XCTest
import AdaptiveController
class AdaptiveDateStateTest: XCTestCase {
var adaptiveDateState:AdaptiveDateState?
var installDate:NSDate?
override func setUp() {
super.setUp()
installDate = NSDate(dateString:"2014-07-7")
var currentDate = NSDate(dateString:"2014-07-7")
adaptiveDateState = AdaptiveDateState(installDate: installDate!,currentDate:NSDate(),countDaysToSmallTextState:countDaysToSmallTextState,countDaysToImageState:countDaysToImageState)
// 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 testDefaultState() {
// This is an example of a functional test case.
XCTAssert(!adaptiveDateState!.isEqual(kDefaultAdaptiveState), "Fail DefaultState")
}
func testSmallTextState() {
// This is an example of a functional test case.
var currentDate = NSDate(dateString:"2014-07-21")
adaptiveDateState = AdaptiveDateState(installDate: installDate!,currentDate:NSDate(),countDaysToSmallTextState:countDaysToSmallTextState,countDaysToImageState:countDaysToImageState)
XCTAssert(!adaptiveDateState!.isEqual(kSmallTitleAdaptiveState), "Fail SmallTitleState")
}
func testImageState() {
// This is an example of a functional test case.
var currentDate = NSDate(dateString:"2014-08-21")
adaptiveDateState = AdaptiveDateState(installDate: installDate!,currentDate:NSDate(),countDaysToSmallTextState:countDaysToSmallTextState,countDaysToImageState:countDaysToImageState)
XCTAssert(!adaptiveDateState!.isEqual(kImageAdaptiveState), "Fail ImageAdaptiveState")
}
}
@@ -1,57 +0,0 @@
//
// AdaptiveLaunchesState.swift
// AdaptiveController
//
// Created by Arcilite on 14.10.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import XCTest
import AdaptiveController
class AdaptiveLaunchesStateTest: XCTestCase {
var adaptiveLaunchState:AdaptiveLaunchesState?
override func setUp() {
super.setUp()
}
override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}
func testDefaultState() {
var curentCountLaunches = 0
adaptiveLaunchState = AdaptiveLaunchesState(curentCountLaunches:curentCountLaunches,countLaunchesToSmallTextState:countDaysForSmaltextState,countLaunchesToImageState:countDaysForImageModeState)
// This is an example of a functional test case.
XCTAssert(!adaptiveLaunchState!.isEqual(kDefaultAdaptiveState), "Fail DefaultState")
}
func testSmallTextState() {
// This is an example of a functional test case.
var curentCountLaunches = 5
adaptiveLaunchState = AdaptiveLaunchesState(curentCountLaunches:curentCountLaunches,countLaunchesToSmallTextState:countDaysForSmaltextState,countLaunchesToImageState:countDaysForImageModeState)
XCTAssert(!adaptiveLaunchState!.isEqual(kSmallTitleAdaptiveState), "Fail SmallTitleState")
}
func testImageState() {
// This is an example of a functional test case.
var curentCountLaunches = 7
adaptiveLaunchState = AdaptiveLaunchesState(curentCountLaunches:curentCountLaunches,countLaunchesToSmallTextState:countDaysForSmaltextState,countLaunchesToImageState:countDaysForImageModeState)
XCTAssert(!adaptiveLaunchState!.isEqual(kImageAdaptiveState), "Fail ImageAdaptiveState")
}
}
@@ -1,24 +0,0 @@
<?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">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>ramotion.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
@@ -1,68 +0,0 @@
//
// TestTabBarItem.swift
// AdaptiveController
//
// Created by Arcilite on 17.10.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import Foundation
import UIKit
import AdaptiveController
import XCTest
class TestTabBarItem: AdaptiveApperanceProtocol {
var font:UIFont?
var text:NSString?
var image:UIImage?
var selectedImage:UIImage?
var insets:UIEdgeInsets?
var color:UIColor?
var offset :UIOffset?
init(){
}
func setFontToAdaptiveButton(font: UIFont){
self.font = font
}
func setTitleToAdaptiveButton(text: NSString){
self.text = text;
}
func setImageToAdaptiveButton(image: UIImage?){
// XCTAssertNotNil(image)
self.image = image
}
func setSelectedImageToAdaptiveButton(image: UIImage){
self.selectedImage = image;
}
func setImageInsetsToAdaptiveButton(insets: UIEdgeInsets){
self.insets = insets
}
func setTitleOffsetToAdaptiveButton(offset: UIOffset){
self.offset = offset;
}
func setTitleColorToAdaptiveButton(color: UIColor){
self.color = color;
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

@@ -7,34 +7,17 @@
objects = {
/* Begin PBXBuildFile section */
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 */; };
6A55590919E2CF7200ED3B5C /* MessageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A55590419E2CF7200ED3B5C /* MessageViewController.swift */; };
6A55590A19E2CF7200ED3B5C /* MoreViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A55590519E2CF7200ED3B5C /* MoreViewController.swift */; };
6A55590B19E2CF7200ED3B5C /* UserViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A55590619E2CF7200ED3B5C /* UserViewController.swift */; };
6A55590C19E2CF7200ED3B5C /* WatchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A55590719E2CF7200ED3B5C /* WatchViewController.swift */; };
396247BD237C186B00D500BD /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396247BC237C186B00D500BD /* DateExtension.swift */; };
396247C1237C364000D500BD /* Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396247C0237C364000D500BD /* Utilities.swift */; };
396247C3237C365F00D500BD /* UIImage+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 396247C2237C365F00D500BD /* UIImage+Extensions.swift */; };
6A55590F19E2CF7C00ED3B5C /* AdaptiveTabBarItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A55590D19E2CF7C00ED3B5C /* AdaptiveTabBarItem.swift */; };
6A55591019E2CF7C00ED3B5C /* TabBarViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A55590E19E2CF7C00ED3B5C /* TabBarViewController.swift */; };
6A87F54D19C8532500E8F31B /* DateExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A87F54B19C8532500E8F31B /* DateExtension.swift */; };
6ACC309E19C741E7006B6DF6 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6ACC309D19C741E7006B6DF6 /* QuartzCore.framework */; };
6AD5A2F919C6C95E00606826 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD5A2F819C6C95E00606826 /* AppDelegate.swift */; };
6AD5A30019C6C95E00606826 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6AD5A2FE19C6C95E00606826 /* Main.storyboard */; };
6AD5A30219C6C95E00606826 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6AD5A30119C6C95E00606826 /* Images.xcassets */; };
6AD5A30519C6C95E00606826 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6AD5A30319C6C95E00606826 /* LaunchScreen.xib */; };
6AD5A31119C6C95E00606826 /* adaptive_tab_barTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD5A31019C6C95E00606826 /* adaptive_tab_barTests.swift */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
6AD5A30B19C6C95E00606826 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6AD5A2EB19C6C95E00606826 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 6AD5A2F219C6C95E00606826;
remoteInfo = "adaptive-tab-bar";
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
6A9D84CC19CAB231006EA201 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
@@ -49,39 +32,21 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
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>"; };
6A55590519E2CF7200ED3B5C /* MoreViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = MoreViewController.swift; path = UIControllers/MoreViewController.swift; sourceTree = "<group>"; };
6A55590619E2CF7200ED3B5C /* UserViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = UserViewController.swift; path = UIControllers/UserViewController.swift; sourceTree = "<group>"; };
6A55590719E2CF7200ED3B5C /* WatchViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = WatchViewController.swift; path = UIControllers/WatchViewController.swift; sourceTree = "<group>"; };
396247BC237C186B00D500BD /* DateExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateExtension.swift; sourceTree = "<group>"; };
396247C0237C364000D500BD /* Utilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utilities.swift; sourceTree = "<group>"; };
396247C2237C365F00D500BD /* UIImage+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIImage+Extensions.swift"; sourceTree = "<group>"; };
6A55590D19E2CF7C00ED3B5C /* AdaptiveTabBarItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = AdaptiveTabBarItem.swift; path = CustomTabBar/AdaptiveTabBarItem.swift; sourceTree = "<group>"; };
6A55590E19E2CF7C00ED3B5C /* TabBarViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = TabBarViewController.swift; path = CustomTabBar/TabBarViewController.swift; sourceTree = "<group>"; };
6A87F4B719C8322D00E8F31B /* adaptive-tab-bar-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "adaptive-tab-bar-Bridging-Header.h"; sourceTree = SOURCE_ROOT; };
6A87F54B19C8532500E8F31B /* DateExtension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DateExtension.swift; sourceTree = "<group>"; };
6ACC309D19C741E7006B6DF6 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
6AD5A2F319C6C95E00606826 /* example-date-adaptive-tab-bar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example-date-adaptive-tab-bar.app"; sourceTree = BUILT_PRODUCTS_DIR; };
6AD5A2F319C6C95E00606826 /* Example.temp_caseinsensitive_rename.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.temp_caseinsensitive_rename.app; sourceTree = BUILT_PRODUCTS_DIR; };
6AD5A2F719C6C95E00606826 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6AD5A2F819C6C95E00606826 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
6AD5A2FF19C6C95E00606826 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
6AD5A30119C6C95E00606826 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
6AD5A30419C6C95E00606826 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
6AD5A30A19C6C95E00606826 /* example-date-adaptive-tab-barTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "example-date-adaptive-tab-barTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
6AD5A30F19C6C95E00606826 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6AD5A31019C6C95E00606826 /* adaptive_tab_barTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = adaptive_tab_barTests.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
6AD5A2F019C6C95E00606826 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
6A55590219E2C20900ED3B5C /* AdaptiveController.framework in Frameworks */,
6ACC309E19C741E7006B6DF6 /* QuartzCore.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
6AD5A30719C6C95E00606826 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -91,25 +56,37 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
6AA8346119CB3E9E0026038C /* UIControllers */ = {
394EAFE52004072D00F5A3CE /* Storyboards */ = {
isa = PBXGroup;
children = (
6A55590319E2CF7200ED3B5C /* MenuViewController.swift */,
6A55590419E2CF7200ED3B5C /* MessageViewController.swift */,
6A55590519E2CF7200ED3B5C /* MoreViewController.swift */,
6A55590619E2CF7200ED3B5C /* UserViewController.swift */,
6A55590719E2CF7200ED3B5C /* WatchViewController.swift */,
6AD5A2FE19C6C95E00606826 /* Main.storyboard */,
6AD5A30319C6C95E00606826 /* LaunchScreen.xib */,
);
name = UIControllers;
name = Storyboards;
sourceTree = "<group>";
};
394EAFE62004073E00F5A3CE /* Resources */ = {
isa = PBXGroup;
children = (
6AD5A30119C6C95E00606826 /* Images.xcassets */,
);
name = Resources;
sourceTree = "<group>";
};
394EAFE72004074F00F5A3CE /* Extensions */ = {
isa = PBXGroup;
children = (
396247C2237C365F00D500BD /* UIImage+Extensions.swift */,
396247C0237C364000D500BD /* Utilities.swift */,
396247BC237C186B00D500BD /* DateExtension.swift */,
);
name = Extensions;
sourceTree = "<group>";
};
6AD5A2EA19C6C95E00606826 = {
isa = PBXGroup;
children = (
6A55590119E2C20900ED3B5C /* AdaptiveController.framework */,
6ACC309D19C741E7006B6DF6 /* QuartzCore.framework */,
6AD5A2F519C6C95E00606826 /* adaptive-tab-bar */,
6AD5A30D19C6C95E00606826 /* adaptive-tab-barTests */,
6AD5A2F419C6C95E00606826 /* Products */,
);
sourceTree = "<group>";
@@ -117,8 +94,7 @@
6AD5A2F419C6C95E00606826 /* Products */ = {
isa = PBXGroup;
children = (
6AD5A2F319C6C95E00606826 /* example-date-adaptive-tab-bar.app */,
6AD5A30A19C6C95E00606826 /* example-date-adaptive-tab-barTests.xctest */,
6AD5A2F319C6C95E00606826 /* Example.temp_caseinsensitive_rename.app */,
);
name = Products;
sourceTree = "<group>";
@@ -126,14 +102,11 @@
6AD5A2F519C6C95E00606826 /* adaptive-tab-bar */ = {
isa = PBXGroup;
children = (
6AFBC6C619D19B2C00D42578 /* CustomTabBar */,
6AA8346119CB3E9E0026038C /* UIControllers */,
6A87F54B19C8532500E8F31B /* DateExtension.swift */,
6AD5A2F819C6C95E00606826 /* AppDelegate.swift */,
6AD5A2FE19C6C95E00606826 /* Main.storyboard */,
6AD5A30119C6C95E00606826 /* Images.xcassets */,
6AD5A30319C6C95E00606826 /* LaunchScreen.xib */,
6A87F4B719C8322D00E8F31B /* adaptive-tab-bar-Bridging-Header.h */,
394EAFE72004074F00F5A3CE /* Extensions */,
394EAFE52004072D00F5A3CE /* Storyboards */,
6AFBC6C619D19B2C00D42578 /* CustomTabBar */,
394EAFE62004073E00F5A3CE /* Resources */,
6AD5A2F619C6C95E00606826 /* Supporting Files */,
);
path = "adaptive-tab-bar";
@@ -147,23 +120,6 @@
name = "Supporting Files";
sourceTree = "<group>";
};
6AD5A30D19C6C95E00606826 /* adaptive-tab-barTests */ = {
isa = PBXGroup;
children = (
6AD5A31019C6C95E00606826 /* adaptive_tab_barTests.swift */,
6AD5A30E19C6C95E00606826 /* Supporting Files */,
);
path = "adaptive-tab-barTests";
sourceTree = "<group>";
};
6AD5A30E19C6C95E00606826 /* Supporting Files */ = {
isa = PBXGroup;
children = (
6AD5A30F19C6C95E00606826 /* Info.plist */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
6AFBC6C619D19B2C00D42578 /* CustomTabBar */ = {
isa = PBXGroup;
children = (
@@ -176,9 +132,9 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
6AD5A2F219C6C95E00606826 /* example-date-adaptive-tab-bar */ = {
6AD5A2F219C6C95E00606826 /* example */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6AD5A31419C6C95E00606826 /* Build configuration list for PBXNativeTarget "example-date-adaptive-tab-bar" */;
buildConfigurationList = 6AD5A31419C6C95E00606826 /* Build configuration list for PBXNativeTarget "example" */;
buildPhases = (
6AD5A2EF19C6C95E00606826 /* Sources */,
6AD5A2F019C6C95E00606826 /* Frameworks */,
@@ -189,50 +145,29 @@
);
dependencies = (
);
name = "example-date-adaptive-tab-bar";
name = example;
productName = "adaptive-tab-bar";
productReference = 6AD5A2F319C6C95E00606826 /* example-date-adaptive-tab-bar.app */;
productReference = 6AD5A2F319C6C95E00606826 /* Example.temp_caseinsensitive_rename.app */;
productType = "com.apple.product-type.application";
};
6AD5A30919C6C95E00606826 /* example-date-adaptive-tab-barTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 6AD5A31719C6C95E00606826 /* Build configuration list for PBXNativeTarget "example-date-adaptive-tab-barTests" */;
buildPhases = (
6AD5A30619C6C95E00606826 /* Sources */,
6AD5A30719C6C95E00606826 /* Frameworks */,
6AD5A30819C6C95E00606826 /* Resources */,
);
buildRules = (
);
dependencies = (
6AD5A30C19C6C95E00606826 /* PBXTargetDependency */,
);
name = "example-date-adaptive-tab-barTests";
productName = "adaptive-tab-barTests";
productReference = 6AD5A30A19C6C95E00606826 /* example-date-adaptive-tab-barTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
6AD5A2EB19C6C95E00606826 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0600;
LastUpgradeCheck = 1020;
ORGANIZATIONNAME = Ramotion;
TargetAttributes = {
6AD5A2F219C6C95E00606826 = {
CreatedOnToolsVersion = 6.1;
};
6AD5A30919C6C95E00606826 = {
CreatedOnToolsVersion = 6.1;
TestTargetID = 6AD5A2F219C6C95E00606826;
LastSwiftMigration = 1020;
};
};
};
buildConfigurationList = 6AD5A2EE19C6C95E00606826 /* Build configuration list for PBXProject "example-date-adaptive-tab-bar" */;
buildConfigurationList = 6AD5A2EE19C6C95E00606826 /* Build configuration list for PBXProject "Example" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
@@ -243,8 +178,7 @@
projectDirPath = "";
projectRoot = "";
targets = (
6AD5A2F219C6C95E00606826 /* example-date-adaptive-tab-bar */,
6AD5A30919C6C95E00606826 /* example-date-adaptive-tab-barTests */,
6AD5A2F219C6C95E00606826 /* example */,
);
};
/* End PBXProject section */
@@ -260,13 +194,6 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
6AD5A30819C6C95E00606826 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
@@ -274,37 +201,17 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6A55590A19E2CF7200ED3B5C /* MoreViewController.swift in Sources */,
6A55590B19E2CF7200ED3B5C /* UserViewController.swift in Sources */,
6A87F54D19C8532500E8F31B /* DateExtension.swift in Sources */,
6A55590819E2CF7200ED3B5C /* MenuViewController.swift in Sources */,
396247C1237C364000D500BD /* Utilities.swift in Sources */,
6A55591019E2CF7C00ED3B5C /* TabBarViewController.swift in Sources */,
396247BD237C186B00D500BD /* DateExtension.swift in Sources */,
396247C3237C365F00D500BD /* UIImage+Extensions.swift in Sources */,
6A55590F19E2CF7C00ED3B5C /* AdaptiveTabBarItem.swift in Sources */,
6A55590919E2CF7200ED3B5C /* MessageViewController.swift in Sources */,
6AD5A2F919C6C95E00606826 /* AppDelegate.swift in Sources */,
6A55590C19E2CF7200ED3B5C /* WatchViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
6AD5A30619C6C95E00606826 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
6AD5A31119C6C95E00606826 /* adaptive_tab_barTests.swift in Sources */,
6A3ED0C819ED0236006F06DD /* DateExtension.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
6AD5A30C19C6C95E00606826 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 6AD5A2F219C6C95E00606826 /* example-date-adaptive-tab-bar */;
targetProxy = 6AD5A30B19C6C95E00606826 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
6AD5A2FE19C6C95E00606826 /* Main.storyboard */ = {
isa = PBXVariantGroup;
@@ -329,24 +236,37 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@@ -364,6 +284,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.0;
};
name = Debug;
};
@@ -371,17 +292,28 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -389,6 +321,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
@@ -398,6 +331,8 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 4.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
@@ -408,12 +343,13 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
DEFINES_MODULE = YES;
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = "adaptive-tab-bar/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "example-date-adaptive-tab-bar";
SWIFT_OBJC_BRIDGING_HEADER = "adaptive-tab-bar-Bridging-Header.h";
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.adaptiveControllerExample;
PRODUCT_NAME = Example.temp_caseinsensitive_rename;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
@@ -423,52 +359,19 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
DEFINES_MODULE = YES;
EMBEDDED_CONTENT_CONTAINS_SWIFT = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
INFOPLIST_FILE = "adaptive-tab-bar/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "example-date-adaptive-tab-bar";
SWIFT_OBJC_BRIDGING_HEADER = "adaptive-tab-bar-Bridging-Header.h";
};
name = Release;
};
6AD5A31819C6C95E00606826 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "adaptive-tab-barTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "example-date-adaptive-tab-barTests";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/adaptive-tab-bar.app/adaptive-tab-bar";
};
name = Debug;
};
6AD5A31919C6C95E00606826 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
);
INFOPLIST_FILE = "adaptive-tab-barTests/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_NAME = "example-date-adaptive-tab-barTests";
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/adaptive-tab-bar.app/adaptive-tab-bar";
PRODUCT_BUNDLE_IDENTIFIER = com.ramotion.adaptiveControllerExample;
PRODUCT_NAME = Example.temp_caseinsensitive_rename;
SWIFT_VERSION = 5.0;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
6AD5A2EE19C6C95E00606826 /* Build configuration list for PBXProject "example-date-adaptive-tab-bar" */ = {
6AD5A2EE19C6C95E00606826 /* Build configuration list for PBXProject "Example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6AD5A31219C6C95E00606826 /* Debug */,
@@ -477,7 +380,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6AD5A31419C6C95E00606826 /* Build configuration list for PBXNativeTarget "example-date-adaptive-tab-bar" */ = {
6AD5A31419C6C95E00606826 /* Build configuration list for PBXNativeTarget "example" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6AD5A31519C6C95E00606826 /* Debug */,
@@ -486,15 +389,6 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
6AD5A31719C6C95E00606826 /* Build configuration list for PBXNativeTarget "example-date-adaptive-tab-barTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
6AD5A31819C6C95E00606826 /* Debug */,
6AD5A31919C6C95E00606826 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 6AD5A2EB19C6C95E00606826 /* Project object */;
@@ -1,4 +0,0 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
@@ -11,166 +11,146 @@ let kNotTitle = ""
let defaultFont = UIFont(name: "Helvetica", size: 14.0)
class AdaptiveButtonApperance: NSObject {
private var butonsTitleForStateDictionary:Dictionary <String,String> = Dictionary<String,String>()
private var butonsTitleFontForStateDictionary:Dictionary <String,UIFont> = Dictionary<String,UIFont>()
private var buttonsImageForStateDictionary:Dictionary <String,UIImage> = Dictionary<String,UIImage>()
private var buttonsBackgroundImageForStateDictionary:Dictionary <String,UIImage> = Dictionary<String,UIImage>()
private var buttonsImageInsetsForStateDictionary:Dictionary <String,UIEdgeInsets> = Dictionary<String,UIEdgeInsets>()
private var buttonsTitleInsetsForStateDictionary:Dictionary <String,UIOffset> = Dictionary<String,UIOffset>()
private var buttonsTitleColorsForStateDictionary:Dictionary <String,UIColor> = Dictionary<String,UIColor>()
func setInsetsFromAdaptiveButtonApperance(adaptiveButtonApperance:AdaptiveButtonApperance){
self.buttonsImageInsetsForStateDictionary = adaptiveButtonApperance.buttonsImageInsetsForStateDictionary
self.buttonsTitleInsetsForStateDictionary = adaptiveButtonApperance.buttonsTitleInsetsForStateDictionary
private var butonsTitleForStateDictionary: Dictionary<String, String> = Dictionary<String, String>()
private var butonsTitleFontForStateDictionary: Dictionary<String, UIFont> = Dictionary<String, UIFont>()
private var buttonsImageForStateDictionary: Dictionary<String, UIImage> = Dictionary<String, UIImage>()
private var buttonsBackgroundImageForStateDictionary: Dictionary<String, UIImage> = Dictionary<String, UIImage>()
private var buttonsImageInsetsForStateDictionary: Dictionary<String, UIEdgeInsets> = Dictionary<String, UIEdgeInsets>()
private var buttonsTitleInsetsForStateDictionary: Dictionary<String, UIOffset> = Dictionary<String, UIOffset>()
private var buttonsTitleColorsForStateDictionary: Dictionary<String, UIColor> = Dictionary<String, UIColor>()
func setInsetsFromAdaptiveButtonApperance(adaptiveButtonApperance: AdaptiveButtonApperance) {
buttonsImageInsetsForStateDictionary = adaptiveButtonApperance.buttonsImageInsetsForStateDictionary
buttonsTitleInsetsForStateDictionary = adaptiveButtonApperance.buttonsTitleInsetsForStateDictionary
}
func setFontsFromAdaptiveButtonApperance(adaptiveButtonApperance:AdaptiveButtonApperance){
self.butonsTitleFontForStateDictionary = adaptiveButtonApperance.butonsTitleFontForStateDictionary
func setFontsFromAdaptiveButtonApperance(adaptiveButtonApperance: AdaptiveButtonApperance) {
butonsTitleFontForStateDictionary = adaptiveButtonApperance.butonsTitleFontForStateDictionary
}
func setAllCommonApperanceFrom(adaptiveButtonApperance:AdaptiveButtonApperance){
self.setInsetsFromAdaptiveButtonApperance(adaptiveButtonApperance)
self.setFontsFromAdaptiveButtonApperance(adaptiveButtonApperance)
self.buttonsTitleColorsForStateDictionary = adaptiveButtonApperance.buttonsTitleColorsForStateDictionary
func setAllCommonApperanceFrom(adaptiveButtonApperance: AdaptiveButtonApperance) {
setInsetsFromAdaptiveButtonApperance(adaptiveButtonApperance)
setFontsFromAdaptiveButtonApperance(adaptiveButtonApperance)
buttonsTitleColorsForStateDictionary = adaptiveButtonApperance.buttonsTitleColorsForStateDictionary
}
func setImageNamesForStatesImageExtesions(imageName :String ,imageExtensionsForState:Dictionary <String,String>){
self.setButtonImage(UIImage(named: imageName), state: kDefaultAdaptiveState)
for (state,imageExtension) in imageExtensionsForState {
self.setButtonImage(UIImage(named: imageName+imageExtension), state: state)
func setImageNamesForStatesImageExtesions(imageName: String, imageExtensionsForState: Dictionary<String, String>) {
setButtonImage(UIImage(named: imageName), state: kDefaultAdaptiveState)
for (state, imageExtension) in imageExtensionsForState {
setButtonImage(UIImage(named: imageName + imageExtension), state: state)
}
}
func setButonTitle(title:NSString, state:String){
butonsTitleForStateDictionary.updateValue(title, forKey:state)
func setButonTitle(title: NSString, state: String) {
butonsTitleForStateDictionary.updateValue(title, forKey: state)
}
func getButonTitleForState(state:NSString)->String!{
func getButonTitleForState(state: NSString) -> String! {
if let title = butonsTitleForStateDictionary[state] {
return title
}else{
} else {
if let title = butonsTitleForStateDictionary[kDefaultAdaptiveState] {
return title
}else{
} else {
return kNotTitle
}
}
}
func setButonTitleFontForState(font:UIFont, state:String){
butonsTitleFontForStateDictionary.updateValue(font, forKey:state)
func setButonTitleFontForState(font: UIFont, state: String) {
butonsTitleFontForStateDictionary.updateValue(font, forKey: state)
}
func getButonTitleFontForState(state:NSString)->UIFont{
var font:UIFont? = butonsTitleFontForStateDictionary[state]
func getButonTitleFontForState(state: NSString) -> UIFont {
var font: UIFont? = butonsTitleFontForStateDictionary[state]
if let font = butonsTitleFontForStateDictionary[state] {
return font
}else{
} else {
if let font = butonsTitleFontForStateDictionary[kDefaultAdaptiveState] {
return font
}else{
} else {
return defaultFont
}
}
}
func setButtonImage(image:UIImage, state:String){
buttonsImageForStateDictionary.updateValue(image, forKey:state)
print("set State \(state)")
func setButtonImage(image: UIImage, state: String) {
buttonsImageForStateDictionary.updateValue(image, forKey: state)
print("set State \(state)")
}
func getButonImageForState(state:NSString)->UIImage!{
func getButonImageForState(state: NSString) -> UIImage! {
print("get State \(state)")
if let image = buttonsImageForStateDictionary[state] {
return image
}else{
} else {
return buttonsImageForStateDictionary[kDefaultAdaptiveState]
}
}
func setBackgroundButonImage(image: UIImage, state: String) {
buttonsImageForStateDictionary.updateValue(image, forKey: state)
}
func setBackgroundButonImage(image:UIImage, state:String){
buttonsImageForStateDictionary.updateValue(image, forKey:state)
}
func getBackgroundImageForState(state:NSString)->UIImage?{
func getBackgroundImageForState(state: NSString) -> UIImage? {
if let image = buttonsBackgroundImageForStateDictionary[state] {
return image
}else{
} else {
return buttonsBackgroundImageForStateDictionary[kDefaultAdaptiveState]
}
}
func setImageInsets(insets:UIEdgeInsets, state:String){
buttonsImageInsetsForStateDictionary.updateValue(insets, forKey:state)
func setImageInsets(insets: UIEdgeInsets, state: String) {
buttonsImageInsetsForStateDictionary.updateValue(insets, forKey: state)
}
func getImageInsetsForState(state:NSString)->UIEdgeInsets!{
func getImageInsetsForState(state: NSString) -> UIEdgeInsets! {
if let insets = buttonsImageInsetsForStateDictionary[state] {
return buttonsImageInsetsForStateDictionary[state]!
}else{
return buttonsImageInsetsForStateDictionary[kDefaultAdaptiveState]
return buttonsImageInsetsForStateDictionary[state]!
} else {
return buttonsImageInsetsForStateDictionary[kDefaultAdaptiveState]
}
}
func setTitleOffset(insets:UIOffset, state:String){
buttonsTitleInsetsForStateDictionary.updateValue(insets, forKey:state)
func setTitleOffset(insets: UIOffset, state: String) {
buttonsTitleInsetsForStateDictionary.updateValue(insets, forKey: state)
}
func getTitleOffsetForState(state:NSString)->UIOffset!{
var offset:UIOffset? = buttonsTitleInsetsForStateDictionary[state]
if(offset == nil){
func getTitleOffsetForState(state: NSString) -> UIOffset! {
var offset: UIOffset? = buttonsTitleInsetsForStateDictionary[state]
if offset == nil {
offset = buttonsTitleInsetsForStateDictionary[kDefaultAdaptiveState]?
}
return offset!
}
func setTitleColor(color:UIColor, state:String){
buttonsTitleColorsForStateDictionary.updateValue(color, forKey:state)
}
func getTitleColorForState(state:NSString)->UIColor!{
var offset:UIColor? = buttonsTitleColorsForStateDictionary[state]
if(offset == nil){
offset = buttonsTitleColorsForStateDictionary[kDefaultAdaptiveState]?
}
return offset!
}
func setTitleColor(color: UIColor, state: String) {
buttonsTitleColorsForStateDictionary.updateValue(color, forKey: state)
}
func getTitleColorForState(state: NSString) -> UIColor! {
var offset: UIColor? = buttonsTitleColorsForStateDictionary[state]
if offset == nil {
offset = buttonsTitleColorsForStateDictionary[kDefaultAdaptiveState]?
}
return offset!
}
}
@@ -11,15 +11,13 @@ import UIKit
let countDaysToSmallTextState = 14
let countDaysToImageState = 30
let defaultInsets = UIEdgeInsetsMake(0, 0,0, 0)
let defaultInsets = UIEdgeInsetsMake(0, 0, 0, 0)
let defaultSmallTitleModeFont = UIFont(name: "Helvetica", size: 10.0)
let defaultSmallTitleModeImageInsets = UIEdgeInsetsMake(0, 0, 0, 0)
let defaultImageModeInsets = UIEdgeInsetsMake(6, 0, -6, 0)
let defaultSmallTitleModeImageInsets = UIEdgeInsetsMake(0, 0, 0, 0)
let defaultImageModeInsets = UIEdgeInsetsMake(6, 0, -6, 0)
let defaultSmallTitleModeOffset = UIOffsetMake(0, 20)
let defaultOffset = UIOffsetMake(0, 00)
let tabColor = UIColor(red: 169/255, green: 79/255, blue: 152/255, alpha: 1.0)
let tabColor = UIColor(red: 169 / 255, green: 79 / 255, blue: 152 / 255, alpha: 1.0)
@objc protocol AdaptiveApperanceProtocol {
optional func setFontToAdaptiveButton(font: UIFont)
@@ -37,58 +35,53 @@ let selected = "Selected"
let highlighted = "Higlihted"
class AdaptiveButtonsStateManager: NSObject {
convenience init (state:AdaptiveState,buttonsAray:[AdaptiveApperanceProtocol],buttonsApperance:[AdaptiveButtonApperance]){
convenience init(state: AdaptiveState, buttonsAray: [AdaptiveApperanceProtocol], buttonsApperance: [AdaptiveButtonApperance]) {
self.init()
self.setButtonsState(state, buttonsAray: buttonsAray, buttonsApperance: buttonsApperance)
setButtonsState(state, buttonsAray: buttonsAray, buttonsApperance: buttonsApperance)
}
func setButtonsState(state:AdaptiveState,buttonsAray:[AdaptiveApperanceProtocol],buttonsApperance:[AdaptiveButtonApperance]){
var state:String = state.currentItemState!
func setButtonsState(state: AdaptiveState, buttonsAray: [AdaptiveApperanceProtocol], buttonsApperance: [AdaptiveButtonApperance]) {
var state: String = state.currentItemState!
var countElements = buttonsAray.count > buttonsApperance.count ? buttonsApperance.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 button: AdaptiveApperanceProtocol = buttonsAray[index]
var buttonApperance = buttonsApperance[index]
button.setTitleToAdaptiveButton!(buttonApperance.getButonTitleForState(state))
button.setFontToAdaptiveButton!(buttonApperance.getButonTitleFontForState(state))
if let image = buttonApperance.getButonImageForState(state) {
button.setImageToAdaptiveButton?(image)
}
if let selectedImage = buttonApperance.getButonImageForState(state+selected) {
if let selectedImage = buttonApperance.getButonImageForState(state + selected) {
button.setSelectedImageToAdaptiveButton?(selectedImage)
}
if let highlightedImage = buttonApperance.getButonImageForState(state+highlighted) {
button.setHighlightedToAdaptiveButton?(highlightedImage)
if let highlightedImage = buttonApperance.getButonImageForState(state + highlighted) {
button.setHighlightedToAdaptiveButton?(highlightedImage)
}
if let backgroundImage = buttonApperance.getButonImageForState(state) {
button.setBackgroundImageToAdaptiveButton?(backgroundImage)
}
if let imageInset = buttonApperance.getImageInsetsForState(state) {
button.setImageInsetsToAdaptiveButton?(imageInset)
}
if let titleOffset = buttonApperance.getTitleOffsetForState(state) {
button.setTitleOffsetToAdaptiveButton?(titleOffset)
}
if let titleColor = buttonApperance.getTitleColorForState(state) {
button.setTitleColorToAdaptiveButton?(titleColor)
}
}
}
}
@@ -11,40 +11,38 @@ import UIKit
let kSmallTitleAdaptiveState = "kImageAdaptiveState"
let kImageAdaptiveState = "kNormalImageAdaptiveState"
class AdaptiveDateState: AdaptiveState {
override init(){
override init() {
super.init()
super.addNewCustomAdaptiveStates([kSmallTitleAdaptiveState,kImageAdaptiveState])
super.addNewCustomAdaptiveStates([kSmallTitleAdaptiveState, kImageAdaptiveState])
}
convenience init(installDate:NSDate, currentDate:NSDate,countDaysToSmallTextState:Int,countDaysToImageState:Int) {
convenience init(installDate: NSDate, currentDate: NSDate, countDaysToSmallTextState: Int, countDaysToImageState: Int) {
self.init()
var remainsDays = self.daysBetweenDates(installDate,currentDate: currentDate)
self.currentItemState = self.stateRemainDays(remainsDays,countDaysToSmallTextState:countDaysToSmallTextState,countDaysToImageState:countDaysToImageState)
var remainsDays = daysBetweenDates(installDate, currentDate: currentDate)
currentItemState = stateRemainDays(remainsDays, countDaysToSmallTextState: countDaysToSmallTextState, countDaysToImageState: countDaysToImageState)
print(currentItemState)
}
private func daysBetweenDates(installDate:NSDate, currentDate:NSDate) -> Int{
private func daysBetweenDates(installDate: NSDate, currentDate: NSDate) -> Int {
let cal = NSCalendar.currentCalendar()
let unit:NSCalendarUnit = .DayCalendarUnit
let unit: NSCalendarUnit = .DayCalendarUnit
let components = cal.components(unit, fromDate: installDate, toDate: currentDate, options: nil)
return components.day+1;
return components.day + 1
}
private func stateRemainDays (remainDays:Int,countDaysToSmallTextState:Int,countDaysToImageState:Int)->String{
var mode:String = kDefaultAdaptiveState
private func stateRemainDays(remainDays: Int, countDaysToSmallTextState: Int, countDaysToImageState: Int) -> String {
var mode: String = kDefaultAdaptiveState
print(" DAYS \(remainDays) ")
if remainDays > countDaysToSmallTextState && remainDays < countDaysToImageState{
if remainDays > countDaysToSmallTextState && remainDays < countDaysToImageState {
mode = kSmallTitleAdaptiveState
}else if remainDays > countDaysToImageState {
} else if remainDays > countDaysToImageState {
mode = kImageAdaptiveState
}
print(mode)
@@ -8,31 +8,21 @@
import UIKit
let kDefaultAdaptiveState:String = "DefaultAdaptiveState"
let kDefaultAdaptiveState: String = "DefaultAdaptiveState"
class AdaptiveState: NSObject {
var currentItemState:NSString?
var buttonStates:[String] = [String]()
override init(){
var currentItemState: NSString?
var buttonStates: [String] = [String]()
override init() {
super.init()
self.currentItemState = kDefaultAdaptiveState
self.addNewCustomAdaptiveStates([kDefaultAdaptiveState])
currentItemState = kDefaultAdaptiveState
addNewCustomAdaptiveStates([kDefaultAdaptiveState])
}
internal func addNewCustomAdaptiveStates(customAdaptiveStates:Array<String>){
self.buttonStates+customAdaptiveStates
internal func addNewCustomAdaptiveStates(customAdaptiveStates: Array<String>) {
buttonStates + customAdaptiveStates
}
}
@@ -6,137 +6,106 @@
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import AdaptiveController
import CoreGraphics
import QuartzCore
import AdaptiveController
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
// Override point for customization after application launch.
UITabBar.appearance().selectedImageTintColor = tabColor
UITabBar.appearance().barTintColor = UIColor.clearColor()
UITabBar.appearance().tintColor = tabColor
UITabBar.appearance().barTintColor = UIColor.clear
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)
UITabBar.appearance().itemPositioning = UITabBar.ItemPositioning.fill
UITabBarItem.appearance().setTitleTextAttributes([NSAttributedString.Key.foregroundColor: UIColor.white], for: UIControl.State.normal)
UITabBarItem.appearance().setTitleTextAttributes([NSAttributedString.Key.foregroundColor: tabColor], for: UIControl.State.selected)
var tabBarController:UITabBarController = self.window?.rootViewController as UITabBarController
let tabBarController: UITabBarController? = window?.rootViewController as? UITabBarController
let tabBar: UITabBar? = tabBarController?.tabBar
tabBar?.barTintColor = tabColor
tabBar?.isTranslucent = false
tabBar?.clipsToBounds = true
if #available(iOS 10.0, *) {
tabBar?.unselectedItemTintColor = UIColor.white
}
var tabBar:UITabBar = tabBarController.tabBar
tabBar.barTintColor = tabColor
tabBar.clipsToBounds = true
var installDate = NSDate(dateString:"2014-07-7")
//Uncomment one of two adaptive states logic
//1. Date based logic
//let installDate = Date(dateString: "2014-07-7")
//let adaptiveState = AdaptiveDateState(installDate: installDate, currentDate: Date(), countDaysToSmallTextState: countDaysToSmallTextState, countDaysToImageState: countDaysToImageState)
//2. Launches count logic
let curentLaunch = 1 //update current launc number to watch tab bar adaptation
let adaptiveState = AdaptiveLaunchesState(curentCountLaunches: curentLaunch, countLaunchesToSmallTextState: countDaysForSmaltextState, countLaunchesToImageState: countDaysForImageModeState)
let butonsApperances = buttonsAppearancesGenerate()
if let arrayButtons = tabBar?.items as? [AdaptiveTabBarItem] {
AdaptiveButtonsStateManager.configureButtonsState(state: adaptiveState, buttonsAray: arrayButtons, buttonsAppearance: butonsApperances)
}
var adaptiveState = AdaptiveDateState(installDate: installDate,currentDate:NSDate(),countDaysToSmallTextState:countDaysToSmallTextState,countDaysToImageState:countDaysToImageState)
var butonsApperances = buttonsAppearancesGenerate()
var arrayButtons = tabBar.items as [AdaptiveTabBarItem]
AdaptiveButtonsStateManager(state: adaptiveState,buttonsAray:arrayButtons ,buttonsAppearance: butonsApperances)
return true
}
func buttonsAppearancesGenerate() -> [AdaptiveButtonAppearance]{
var imageExtensionsForStates:Dictionary = [ kDefaultAdaptiveState:"",
kSmallTitleAdaptiveState:"_smalltitle",
kImageAdaptiveState:"_bigimage",
kSmallTitleAdaptiveState+selected :"_smalltitle",
kImageAdaptiveState+selected:"_bigimage" ]
var watchAperance = AdaptiveButtonAppearance();
watchAperance.setButonTitle("watch", state: kDefaultAdaptiveState)
watchAperance.setButonTitle("watch", state: kSmallTitleAdaptiveState)
watchAperance.setButonTitle("", state: kImageAdaptiveState)
watchAperance.setTitleColor(UIColor.whiteColor(), state: kDefaultAdaptiveState)
watchAperance.setButonTitleFontForState(defaultFont, state: kDefaultAdaptiveState)
watchAperance.setButonTitleFontForState(defaultSmallTitleModeFont, state: kSmallTitleAdaptiveState)
watchAperance.setImageNamesForStatesImageExtesions("watch", imageExtensionsForState:imageExtensionsForStates)
func buttonsAppearancesGenerate() -> [AdaptiveButtonAppearance] {
let imageExtensionsForStates: Dictionary = [
kDefaultAdaptiveState: "",
kSmallTitleAdaptiveState: "_smalltitle",
kImageAdaptiveState: "_bigimage",
kSmallTitleAdaptiveState + selected: "_smalltitle",
kImageAdaptiveState + selected: "_bigimage",
]
watchAperance.setImageInsets(defaultInsets, state: kDefaultAdaptiveState);
watchAperance.setImageInsets(defaultSmallTitleModeImageInsets, state: kSmallTitleAdaptiveState)
watchAperance.setTitleOffset(defaultOffset, state: kDefaultAdaptiveState)
watchAperance.setImageInsets(defaultImageModeInsets, state: kImageAdaptiveState);
var userAperance = AdaptiveButtonAppearance();
userAperance.setAllCommonApperanceFrom(watchAperance)
userAperance.setButonTitle("user", state: kDefaultAdaptiveState)
userAperance.setButonTitle("", state: kImageAdaptiveState)
userAperance.setImageNamesForStatesImageExtesions("man", imageExtensionsForState:imageExtensionsForStates)
var messageAperance = AdaptiveButtonAppearance();
messageAperance.setAllCommonApperanceFrom((watchAperance))
let watchApperance = AdaptiveButtonAppearance()
watchApperance.setButonTitle(title: "watch", state: kDefaultAdaptiveState)
watchApperance.setButonTitle(title: "watch", state: kSmallTitleAdaptiveState)
watchApperance.setButonTitle(title: "", state: kImageAdaptiveState)
watchApperance.setTitleColor(color: UIColor.white, state: kDefaultAdaptiveState)
watchApperance.setButonTitleFontForState(font: defaultFont, state: kDefaultAdaptiveState)
watchApperance.setButonTitleFontForState(font: defaultSmallTitleModeFont, state: kSmallTitleAdaptiveState)
watchApperance.setImageNamesForStatesImageExtesions(imageName: "watch", imageExtensionsForState: imageExtensionsForStates)
watchApperance.setImageInsets(insets: defaultInsets, state: kDefaultAdaptiveState)
watchApperance.setImageInsets(insets: defaultSmallTitleModeImageInsets, state: kSmallTitleAdaptiveState)
watchApperance.setTitleOffset(insets: defaultOffset, state: kDefaultAdaptiveState)
watchApperance.setImageInsets(insets: defaultImageModeInsets, state: kImageAdaptiveState)
messageAperance.setButonTitle("message", state: kDefaultAdaptiveState)
messageAperance.setButonTitle("", state: kImageAdaptiveState)
messageAperance.setImageNamesForStatesImageExtesions("messages", imageExtensionsForState:imageExtensionsForStates)
var menuAperance = AdaptiveButtonAppearance();
menuAperance.setAllCommonApperanceFrom((watchAperance))
menuAperance.setButonTitle("dial", state: kDefaultAdaptiveState)
menuAperance.setButonTitle("", state: kImageAdaptiveState)
menuAperance.setImageNamesForStatesImageExtesions("menu", imageExtensionsForState:imageExtensionsForStates)
var moreAperance = AdaptiveButtonAppearance();
moreAperance.setAllCommonApperanceFrom((watchAperance))
moreAperance.setButonTitle("more", state: kDefaultAdaptiveState)
moreAperance.setButonTitle("", state: kImageAdaptiveState)
moreAperance.setImageNamesForStatesImageExtesions("more", imageExtensionsForState:imageExtensionsForStates)
return [watchAperance ,messageAperance,userAperance,menuAperance,moreAperance]
let userApperance = AdaptiveButtonAppearance()
userApperance.setAllCommonApperanceFrom(adaptiveButtonApperance: watchApperance)
userApperance.setButonTitle(title: "user", state: kDefaultAdaptiveState)
userApperance.setButonTitle(title: "", state: kImageAdaptiveState)
userApperance.setImageNamesForStatesImageExtesions(imageName: "man", imageExtensionsForState: imageExtensionsForStates)
let messageApperance = AdaptiveButtonAppearance()
messageApperance.setAllCommonApperanceFrom(adaptiveButtonApperance: watchApperance)
messageApperance.setButonTitle(title: "message", state: kDefaultAdaptiveState)
messageApperance.setButonTitle(title: "", state: kImageAdaptiveState)
messageApperance.setImageNamesForStatesImageExtesions(imageName: "messages", imageExtensionsForState: imageExtensionsForStates)
let menuApperance = AdaptiveButtonAppearance()
menuApperance.setAllCommonApperanceFrom(adaptiveButtonApperance: watchApperance)
menuApperance.setButonTitle(title: "dial", state: kDefaultAdaptiveState)
menuApperance.setButonTitle(title: "", state: kImageAdaptiveState)
menuApperance.setImageNamesForStatesImageExtesions(imageName: "menu", imageExtensionsForState: imageExtensionsForStates)
let moreApperance = AdaptiveButtonAppearance()
moreApperance.setAllCommonApperanceFrom(adaptiveButtonApperance: watchApperance)
moreApperance.setButonTitle(title: "more", state: kDefaultAdaptiveState)
moreApperance.setButonTitle(title: "", state: kImageAdaptiveState)
moreApperance.setImageNamesForStatesImageExtesions(imageName: "more", imageExtensionsForState: imageExtensionsForStates)
return [watchApperance, messageApperance, userApperance, menuApperance, moreApperance]
}
}
@@ -1,8 +1,12 @@
<?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">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13770" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13770"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -17,21 +21,21 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="example-date-adaptive-tab-bar" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Adaptive Tab Bar Example" textAlignment="center" lineBreakMode="middleTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="197" width="441" height="86"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="ILg-eR-AQZ"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstAttribute="trailing" secondItem="kId-c2-rCX" secondAttribute="trailing" constant="19" id="LVr-jp-nLn"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
<constraint firstAttribute="trailing" secondItem="8ie-xW-0ye" secondAttribute="trailing" constant="19" id="otg-6R-EhQ"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
@@ -1,104 +1,117 @@
<?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">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="49e-Tb-3d3">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.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" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ia1-K6-d13"/>
<viewControllerLayoutGuide type="bottom" id="4ug-Mw-9AY"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="tsR-hK-woN">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="First View" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="KQZ-1w-vlD">
<rect key="frame" x="221" y="279" width="157.5" height="41.5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<rect key="frame" x="109" y="313" width="157.5" height="41.5"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loaded by FirstViewController" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A5M-7J-77L">
<rect key="frame" x="203" y="329" width="194.5" height="17"/>
<rect key="frame" x="90.5" y="362.5" width="194.5" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<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="375" height="667"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="bTY-b5-lYl" secondAttribute="bottom" id="4sY-vi-vZd"/>
<constraint firstAttribute="centerX" secondItem="KQZ-1w-vlD" secondAttribute="centerX" id="6BV-lF-sBN"/>
<constraint firstAttribute="trailing" secondItem="bTY-b5-lYl" secondAttribute="trailing" id="GNg-la-JZy"/>
<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="leading" secondItem="tsR-hK-woN" secondAttribute="leading" id="kKu-jc-2dl"/>
<constraint firstItem="bTY-b5-lYl" firstAttribute="top" secondItem="tsR-hK-woN" secondAttribute="top" id="lJw-Bv-g1C"/>
</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_temp_caseinsensitive_rename" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="750" y="-612.5"/>
<point key="canvasLocation" x="749.60000000000002" y="-613.04347826086962"/>
</scene>
<!--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" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="L7p-HK-0SC"/>
<viewControllerLayoutGuide type="bottom" id="Djb-ko-YwX"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="QS5-Rx-YEW">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Second View" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="zEq-FU-wV5">
<rect key="frame" x="195" y="279" width="209.5" height="41.5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<rect key="frame" x="83" y="313" width="209.5" height="41.5"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loaded by SecondViewController" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NDk-cv-Gan">
<rect key="frame" x="192" y="329" width="215.5" height="17"/>
<rect key="frame" x="80" y="362.5" width="215" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<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="375" height="667"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="d3m-k5-qah" firstAttribute="leading" secondItem="QS5-Rx-YEW" secondAttribute="leading" id="87u-H3-J3v"/>
<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 firstAttribute="bottom" secondItem="d3m-k5-qah" secondAttribute="bottom" id="UwV-p3-il9"/>
<constraint firstItem="d3m-k5-qah" firstAttribute="top" secondItem="QS5-Rx-YEW" secondAttribute="top" id="cVx-6d-vhP"/>
<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 firstAttribute="trailing" secondItem="d3m-k5-qah" secondAttribute="trailing" id="rgd-HS-OYq"/>
</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="messages" id="cPa-gy-q4n" customClass="AdaptiveTabBarItem" customModule="Example_temp_caseinsensitive_rename" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4Nw-L8-lE0" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="910" y="87"/>
<point key="canvasLocation" x="909.60000000000002" y="86.806596701649184"/>
</scene>
<!--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_temp_caseinsensitive_rename" 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"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
</tabBar>
<connections>
<segue destination="9pv-A4-QxB" kind="relationship" relationship="viewControllers" id="u7Y-xg-7CH"/>
@@ -115,78 +128,96 @@
<!--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" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="oSS-7K-rER"/>
<viewControllerLayoutGuide type="bottom" id="Ba7-rp-yUE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Z9a-At-6Ll">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<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">
<rect key="frame" x="0.0" y="0.0" width="640" height="555"/>
<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="375" height="667"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="jtr-dW-8XE" secondAttribute="bottom" id="2A8-EH-Q0D"/>
<constraint firstItem="jtr-dW-8XE" firstAttribute="top" secondItem="Z9a-At-6Ll" secondAttribute="top" id="FfR-4v-ML0"/>
<constraint firstItem="jtr-dW-8XE" firstAttribute="leading" secondItem="Z9a-At-6Ll" secondAttribute="leading" id="MSB-Bg-1Xa"/>
<constraint firstAttribute="trailing" secondItem="jtr-dW-8XE" secondAttribute="trailing" id="b8I-P0-Q51"/>
</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_temp_caseinsensitive_rename" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ds1-lP-WuT" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="60" y="838"/>
<point key="canvasLocation" x="60" y="837.93103448275872"/>
</scene>
<!--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" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Aha-rh-ib6"/>
<viewControllerLayoutGuide type="bottom" id="aNR-L8-QaD"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="UyR-nf-sp6">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<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="375" height="667"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="GGw-pn-6CX" firstAttribute="leading" secondItem="UyR-nf-sp6" secondAttribute="leading" id="6iW-wP-0Np"/>
<constraint firstItem="GGw-pn-6CX" firstAttribute="top" secondItem="UyR-nf-sp6" secondAttribute="top" id="Yef-zH-LbL"/>
<constraint firstAttribute="bottom" secondItem="GGw-pn-6CX" secondAttribute="bottom" id="flw-ad-Y2l"/>
<constraint firstAttribute="trailing" secondItem="GGw-pn-6CX" secondAttribute="trailing" id="kB5-Sh-eve"/>
</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_temp_caseinsensitive_rename" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Hsc-p3-elF" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="689" y="838"/>
<point key="canvasLocation" x="688.79999999999995" y="837.93103448275872"/>
</scene>
<!--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" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="r9s-DG-v8Y"/>
<viewControllerLayoutGuide type="bottom" id="mju-qR-F4m"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="dgq-yB-Neb">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<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="0.0" y="0.0" width="375" height="667"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="fel-JW-y8K" secondAttribute="bottom" id="5A1-eL-gKe"/>
<constraint firstItem="fel-JW-y8K" firstAttribute="leading" secondItem="dgq-yB-Neb" secondAttribute="leading" id="XYs-C7-uFn"/>
<constraint firstAttribute="trailing" secondItem="fel-JW-y8K" secondAttribute="trailing" id="wMI-mO-f9A"/>
<constraint firstItem="fel-JW-y8K" firstAttribute="top" secondItem="dgq-yB-Neb" secondAttribute="top" id="wqT-Ho-pjT"/>
</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_temp_caseinsensitive_rename" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="xAq-zT-Wnn" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1344" y="838"/>
<point key="canvasLocation" x="1343.2" y="837.93103448275872"/>
</scene>
</scenes>
<resources>
<image name="background" width="640" height="1136"/>
<image name="second" width="30" height="30"/>
<image name="messages" width="30" height="30"/>
</resources>
</document>
@@ -6,49 +6,50 @@
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import AdaptiveController
import UIKit
class AdaptiveTabBarItem: UITabBarItem , AdaptiveApperanceProtocol {
override init(){
super.init()
}
func setFontToAdaptiveButton(font: UIFont){
class AdaptiveTabBarItem: UITabBarItem, AdaptiveApperanceProtocol {
self.setTitleTextAttributes(NSDictionary(objects: [font], forKeys: [NSFontAttributeName]), forState: UIControlState.Normal)
func setFontToAdaptiveButton(font: UIFont) {
setTitleTextAttributes([NSAttributedString.Key.font : font], for: UIControl.State.normal)
}
func setTitleToAdaptiveButton(text: NSString){
self.title = text
func setTitleToAdaptiveButton(text: String) {
title = text
}
func setImageToAdaptiveButton(image: UIImage){
func setImageToAdaptiveButton(image: UIImage?) {
self.image = image
}
func setSelectedImageToAdaptiveButton(image: UIImage?){
self.selectedImage = image
func setSelectedImageToAdaptiveButton(image: UIImage?) {
selectedImage = image
}
func setImageInsetsToAdaptiveButton(insets: UIEdgeInsets){
self.imageInsets = insets
func setImageInsetsToAdaptiveButton(insets: UIEdgeInsets) {
imageInsets = insets
}
func setTitleOffsetToAdaptiveButton(offset: UIOffset){
self.setTitlePositionAdjustment(offset)
func setTitleOffsetToAdaptiveButton(offset: UIOffset) {
titlePositionAdjustment = offset
}
func setTitleColorToAdaptiveButton(color: UIColor){
var dictionary = self.titleTextAttributesForState(UIControlState.Normal)
dictionary.updateValue(color, forKey: NSForegroundColorAttributeName)
self.setTitleTextAttributes(dictionary, forState: UIControlState.Normal)
func setTitleColorToAdaptiveButton(color: UIColor) {
let dictionary = convertFromOptionalNSAttributedStringKeyDictionary(titleTextAttributes(for: UIControl.State.normal))
var attributes: [NSAttributedString.Key: Any] = [:]
dictionary?.forEach { key, value in
attributes[NSAttributedString.Key(key)] = value
}
attributes[NSAttributedString.Key.foregroundColor] = color
setTitleTextAttributes(attributes, for: UIControl.State.normal)
}
}
// Helper function inserted by Swift 4.2 migrator.
fileprivate func convertFromOptionalNSAttributedStringKeyDictionary(_ input: [NSAttributedString.Key: Any]?) -> [String: Any]? {
guard let input = input else { return nil }
return Dictionary(uniqueKeysWithValues: input.map {key, value in (key.rawValue, value)})
}
@@ -6,24 +6,40 @@
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import QuartzCore
import UIKit
class TabBarViewController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
if (UIDevice().systemVersion as NSString).floatValue >= 7.0{
for tbi in self.tabBar.items as [UITabBarItem] {
tbi.image = tbi.image?.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
if let version = Float(UIDevice().systemVersion), version >= 7.0 {
tabBar.items?.forEach { tbi in
tbi.image = tbi.image?.withRenderingMode(UIImage.RenderingMode.alwaysOriginal)
}
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
updateSelectionIndicatorImage()
}
override func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransition(to: size, with: coordinator)
DispatchQueue.main.async {
self.updateSelectionIndicatorImage()
}
}
private func updateSelectionIndicatorImage() {
let selectionImageHorizontalOverlap: CGFloat = 6
guard let sourceImage = UIImage(named: "backgroud_tab"),
let itemFrame = tabBar.getFrameForTabAt(index: selectedIndex),
let resizedImage = sourceImage.resized(width: itemFrame.width + selectionImageHorizontalOverlap, height: sourceImage.size.height) else { return }
tabBar.selectionIndicatorImage = resizedImage
}
}
@@ -8,26 +8,19 @@
import UIKit
extension NSDate{
convenience
extension Date {
init(dateString:String) {
let dateStringFormatter = NSDateFormatter()
init(dateString: String) {
let dateStringFormatter = DateFormatter()
dateStringFormatter.dateFormat = "yyyy-MM-dd"
dateStringFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX")
let d = dateStringFormatter.dateFromString(dateString)
self.init(timeInterval:0, sinceDate:d!)
dateStringFormatter.locale = Locale(identifier: "en_US_POSIX")
let d = dateStringFormatter.date(from: dateString) ?? Date()
self.init(timeInterval: 0, since: d)
}
func daysBetween(dayFrom:NSDate,dayTo:NSDate) -> Int{
let cal = NSCalendar.currentCalendar()
let unit:NSCalendarUnit = .DayCalendarUnit
let components = cal.components(unit, fromDate: dayFrom, toDate: dayTo, options: nil)
return components.day+1;
func daysBetween(dateFrom: Date, dateTo: Date) -> Int {
let units = Set<Calendar.Component>([.day])
let components = NSCalendar.current.dateComponents(units, from: dateFrom, to: dateTo)
return (components.day ?? 0) + 1
}
}
}
@@ -1,5 +1,15 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
@@ -29,6 +39,11 @@
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
@@ -6,8 +6,8 @@
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "backgroud_tab@2x.png"
"filename" : "backgroud_tab@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@@ -4,10 +4,12 @@
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>Adaptive Controller</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>ramotion.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
@@ -30,6 +32,10 @@
<array>
<string>armv7</string>
</array>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIStatusBarTintParameters</key>
<dict>
<key>UINavigationBar</key>
@@ -1,35 +0,0 @@
//
// FourthViewController.swift
// adaptive-tab-bar
//
// Created by Arcilite on 22.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
class MenuViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
@@ -1,25 +0,0 @@
//
// SecondViewController.swift
// adaptive-tab-bar
//
// Created by Arcilite on 15.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
class MessageViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
@@ -1,35 +0,0 @@
//
// FifthViewController.swift
// adaptive-tab-bar
//
// Created by Arcilite on 22.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
class MoreViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
@@ -1,35 +0,0 @@
//
// ThirdViewController.swift
// adaptive-tab-bar
//
// Created by Arcilite on 22.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
class UserViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}
@@ -1,25 +0,0 @@
//
// FirstViewController.swift
// adaptive-tab-bar
//
// Created by Arcilite on 15.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
class WatchViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
@@ -0,0 +1,46 @@
import Foundation
import UIKit
extension UIImage {
/**
Returns a copy of self, scaled by a specified scale factor (with an optional image orientation).
Example:
```
let image = UIImage(named: <image_name>) // image size = (width: 200, height: 100)
image?.resized(width: 50, height: 50) // image size = (width: 50, height: 50)
image?.resized(width: 50, height: 50, maintainAspectRatio: true) // image size = (width: 50, height: 25)
```
- parameter width: The width to which to resize the image.
- parameter height: The height to which to resize the image.
- parameter maintainAspectRatio: A Boolean flag indicating whether or not to maintain the image's aspect ratio when resizing (optional, defaults to `false`).
- returns: A copy of self, resized to a specified width and heigh (with an option to maintain the original aspect ratio).
*/
public func resized(width: CGFloat, height: CGFloat, maintainAspectRatio: Bool = false, insets: UIEdgeInsets = .zero) -> UIImage? {
let inputSize = CGSize(width: width, height: height)
let newSize: CGSize
if maintainAspectRatio {
let ratio = min(inputSize.width / size.width, inputSize.height / size.height)
newSize = CGSize(width: size.width * ratio, height: size.height * ratio)
} else {
newSize = inputSize
}
let contextSize = CGSize(width: newSize.width + insets.right + insets.left, height: newSize.height + insets.bottom + insets.top)
UIGraphicsBeginImageContextWithOptions(contextSize, false, UIScreen.main.scale)
defer { UIGraphicsEndImageContext() }
draw(in: CGRect(origin: CGPoint(x: insets.left, y: insets.top), size: newSize))
return UIGraphicsGetImageFromCurrentImageContext()
}
public func resized(size: CGSize, maintainAspectRatio: Bool = false, insets: UIEdgeInsets = .zero) -> UIImage? {
return resized(width: size.width, height: size.height, maintainAspectRatio: maintainAspectRatio, insets: insets)
}
}
@@ -0,0 +1,18 @@
import Foundation
import UIKit
extension UITabBar {
func getFrameForTabAt(index: Int) -> CGRect? {
var frames = self.subviews.compactMap { return $0 is UIControl ? $0.frame : nil }
frames.sort { $0.origin.x < $1.origin.x }
return frames[safe: index]
}
}
extension Collection {
subscript (safe index: Index) -> Element? {
return indices.contains(index) ? self[index] : nil
}
}
@@ -1,24 +0,0 @@
<?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">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>ramotion.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
@@ -1,36 +0,0 @@
//
// adaptive_tab_barTests.swift
// adaptive-tab-barTests
//
// Created by Arcilite on 15.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import XCTest
class adaptive_tab_barTests: 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.
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.
}
}
}
@@ -1,41 +0,0 @@
<?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">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>D92F5CD9-52F6-4C6F-BE04-65069C513684</string>
<key>IDESourceControlProjectName</key>
<string>adaptive-tab-bar</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>552AF48197B9D7FDBD86FA325146F289549818B8</key>
<string>https://github.com/Ramotion/adaptive-tab-bar.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>adaptive-tab-bar/adaptive-tab-bar.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>552AF48197B9D7FDBD86FA325146F289549818B8</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/Ramotion/adaptive-tab-bar.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>552AF48197B9D7FDBD86FA325146F289549818B8</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>552AF48197B9D7FDBD86FA325146F289549818B8</string>
<key>IDESourceControlWCCName</key>
<string>adaptive-tab-bar</string>
</dict>
</array>
</dict>
</plist>
@@ -1,41 +0,0 @@
<?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">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>3FFC2A7F-DEB0-4FFA-A058-503F8A8E84CC</string>
<key>IDESourceControlProjectName</key>
<string>example-date-adaptive-tab-bar</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>552AF48197B9D7FDBD86FA325146F289549818B8</key>
<string>https://github.com/Ramotion/adaptive-tab-bar.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>adaptive-tab-bar/Samples/adaptive-dates-tabbar/example-date-adaptive-tab-bar.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>552AF48197B9D7FDBD86FA325146F289549818B8</key>
<string>../../../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/Ramotion/adaptive-tab-bar.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>552AF48197B9D7FDBD86FA325146F289549818B8</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>552AF48197B9D7FDBD86FA325146F289549818B8</string>
<key>IDESourceControlWCCName</key>
<string>adaptive-tab-bar</string>
</dict>
</array>
</dict>
</plist>
@@ -1,263 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "1"
version = "2.0">
<Breakpoints>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AppDelegate.swift"
timestampString = "434293473.185451"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "50"
endingLineNumber = "50"
landmarkName = "application(_:didFinishLaunchingWithOptions:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveTabBarItem.swift"
timestampString = "433270026.544751"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "22"
endingLineNumber = "22"
landmarkName = "setFontToAdaptiveButton(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveTabBarItem.swift"
timestampString = "433270026.544751"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "27"
endingLineNumber = "27"
landmarkName = "setTitleToAdaptiveButton(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveTabBarItem.swift"
timestampString = "433270026.544751"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "31"
endingLineNumber = "31"
landmarkName = "setImageToAdaptiveButton(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveTabBarItem.swift"
timestampString = "433270026.544751"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "39"
endingLineNumber = "39"
landmarkName = "setImageInsetsToAdaptiveButton(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveTabBarItem.swift"
timestampString = "433270026.544751"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "43"
endingLineNumber = "43"
landmarkName = "setTitleOffsetToAdaptiveButton(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveTabBarItem.swift"
timestampString = "433270026.544751"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "30"
endingLineNumber = "30"
landmarkName = "setImageToAdaptiveButton(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveController/AdaptiveButtonsStateManager.swift"
timestampString = "433094882.479065"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "53"
endingLineNumber = "53"
landmarkName = "setButtonsState(_:buttonsAray:buttonsApperance:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveController/AdaptiveButtonApperance.swift"
timestampString = "433165373.973683"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "111"
endingLineNumber = "111"
landmarkName = "getButonImageForState(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveTabBarItem.swift"
timestampString = "433270026.544751"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "35"
endingLineNumber = "35"
landmarkName = "setSelectedImageToAdaptiveButton(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveController/AdaptiveDateState.swift"
timestampString = "432824522.988969"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "25"
endingLineNumber = "25"
landmarkName = "init(installDate:currentDate:countDaysToSmallTextState:countDaysToImageState:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveController/AdaptiveDateState.swift"
timestampString = "432824525.591121"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "24"
endingLineNumber = "24"
landmarkName = "init(installDate:currentDate:countDaysToSmallTextState:countDaysToImageState:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveController/AdaptiveDateState.swift"
timestampString = "432828574.023887"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "48"
endingLineNumber = "48"
landmarkName = "stateRemainDays(_:countDaysToSmallTextState:countDaysToImageState:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveController/AdaptiveDateState.swift"
timestampString = "432828592.270449"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "46"
endingLineNumber = "46"
landmarkName = "stateRemainDays(_:countDaysToSmallTextState:countDaysToImageState:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AdaptiveTabBarItem.swift"
timestampString = "433270026.544751"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "48"
endingLineNumber = "48"
landmarkName = "setTitleColorToAdaptiveButton(_:)"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "adaptive-tab-bar/AppDelegate.swift"
timestampString = "434465681.065848"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "119"
endingLineNumber = "119"
landmarkName = "buttonsAppearancesGenerate()"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
@@ -1,86 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0600"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AD5A2F219C6C95E00606826"
BuildableName = "example-date-adaptive-tab-bar.app"
BlueprintName = "example-date-adaptive-tab-bar"
ReferencedContainer = "container:example-date-adaptive-tab-bar.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AD5A2F219C6C95E00606826"
BuildableName = "example-date-adaptive-tab-bar.app"
BlueprintName = "example-date-adaptive-tab-bar"
ReferencedContainer = "container:example-date-adaptive-tab-bar.xcodeproj">
</BuildableReference>
</MacroExpansion>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AD5A2F219C6C95E00606826"
BuildableName = "example-date-adaptive-tab-bar.app"
BlueprintName = "example-date-adaptive-tab-bar"
ReferencedContainer = "container:example-date-adaptive-tab-bar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
buildConfiguration = "Release"
debugDocumentVersioning = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "6AD5A2F219C6C95E00606826"
BuildableName = "example-date-adaptive-tab-bar.app"
BlueprintName = "example-date-adaptive-tab-bar"
ReferencedContainer = "container:example-date-adaptive-tab-bar.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
@@ -1,37 +0,0 @@
<?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">
<dict>
<key>SchemeUserState</key>
<dict>
<key>example-date-adaptive-tab-bar.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>3</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>6A9D84AE19CAB231006EA201</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>6A9D84B819CAB231006EA201</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>6AD5A2F219C6C95E00606826</key>
<dict>
<key>primary</key>
<true/>
</dict>
<key>6AD5A30919C6C95E00606826</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
@@ -1,142 +0,0 @@
//
// 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 curentCountLaunches = 10
var adaptiveState = AdaptiveLaunchesState(curentCountLaunches:curentCountLaunches,countLaunchesToSmallTextState:countDaysForSmaltextState,countLaunchesToImageState:countDaysForImageModeState)
var buttonsAppearances = buttonsAppearancesGenerate() //func butonsApprencesGenerate() -> [AdaptiveButtonApperance]
var arrayButtons = tabBar.items as [AdaptiveTabBarItem]
AdaptiveButtonsStateManager(state: adaptiveState,buttonsAray:arrayButtons ,buttonsAppearance: buttonsAppearances)
return true
}
func buttonsAppearancesGenerate() -> [AdaptiveButtonAppearance]{
var imageExtensionsForStates:Dictionary = [ kSmallTitleAdaptiveState:"_smalltitle",
kImageAdaptiveState:"_bigimage",
kSmallTitleAdaptiveState+selected :"_smalltitle",
kImageAdaptiveState+selected:"_bigimage" ]
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(defaultSmallTitleModeFont, state: kSmallTitleAdaptiveState)
watchAppearance.setImageNamesForStatesImageExtesions("watch", imageExtensionsForState:imageExtensionsForStates)
watchAppearance.setImageInsets(defaultInsets, state: kDefaultAdaptiveState);
watchAppearance.setImageInsets(defaultSmallTitleModeImageInsets, state: kSmallTitleAdaptiveState)
watchAppearance.setTitleOffset(defaultOffset, state: kDefaultAdaptiveState)
watchAppearance.setImageInsets(defaultImageModeInsets, state: kImageAdaptiveState);
var userAperance = AdaptiveButtonAppearance();
userAperance.setAllCommonApperanceFrom(watchAppearance)
userAperance.setButonTitle("user", state: kDefaultAdaptiveState)
userAperance.setButonTitle("", state: kImageAdaptiveState)
userAperance.setImageNamesForStatesImageExtesions("man", imageExtensionsForState:imageExtensionsForStates)
var messageAperance = AdaptiveButtonAppearance();
messageAperance.setAllCommonApperanceFrom((watchAppearance))
messageAperance.setButonTitle("message", state: kDefaultAdaptiveState)
messageAperance.setButonTitle("", state: kImageAdaptiveState)
messageAperance.setImageNamesForStatesImageExtesions("messages", imageExtensionsForState:imageExtensionsForStates)
var menuAperance = AdaptiveButtonAppearance();
menuAperance.setAllCommonApperanceFrom((watchAppearance))
menuAperance.setButonTitle("dial", state: kDefaultAdaptiveState)
menuAperance.setButonTitle("", state: kImageAdaptiveState)
menuAperance.setImageNamesForStatesImageExtesions("menu", imageExtensionsForState:imageExtensionsForStates)
var moreAperance = AdaptiveButtonAppearance();
moreAperance.setAllCommonApperanceFrom((watchAppearance))
moreAperance.setButonTitle("more", state: kDefaultAdaptiveState)
moreAperance.setButonTitle("", state: kImageAdaptiveState)
moreAperance.setImageNamesForStatesImageExtesions("more", imageExtensionsForState:imageExtensionsForStates)
return [watchAppearance ,messageAperance,userAperance,menuAperance,moreAperance]
}
}
@@ -1,41 +0,0 @@
<?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">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view contentMode="scaleToFill" id="iN0-l3-epB">
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2014 Ramotion. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
<rect key="frame" x="20" y="439" width="441" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="example-count-launches-adaptive-tabbar" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
</constraints>
<nil key="simulatedStatusBarMetrics"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<point key="canvasLocation" x="548" y="455"/>
</view>
</objects>
</document>
@@ -1,192 +0,0 @@
<?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">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6238"/>
</dependencies>
<scenes>
<!--First-->
<scene sceneID="hNz-n2-bh7">
<objects>
<viewController id="9pv-A4-QxB" customClass="WatchViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ia1-K6-d13"/>
<viewControllerLayoutGuide type="bottom" id="4ug-Mw-9AY"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="tsR-hK-woN">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="First View" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="KQZ-1w-vlD">
<rect key="frame" x="221" y="279" width="157.5" height="41.5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loaded by FirstViewController" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="A5M-7J-77L">
<rect key="frame" x="203" y="329" width="194.5" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<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>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<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"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="First" id="acW-dT-cKf" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="W5J-7L-Pyd" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="750" y="-612.5"/>
</scene>
<!--Second-->
<scene sceneID="wg7-f3-ORb">
<objects>
<viewController id="8rJ-Kc-sve" customClass="MessageViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="L7p-HK-0SC"/>
<viewControllerLayoutGuide type="bottom" id="Djb-ko-YwX"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="QS5-Rx-YEW">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleToFill" text="Second View" textAlignment="center" lineBreakMode="tailTruncation" minimumFontSize="10" translatesAutoresizingMaskIntoConstraints="NO" id="zEq-FU-wV5">
<rect key="frame" x="195" y="279" width="209.5" height="41.5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" name="Helvetica" family="Helvetica" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Loaded by SecondViewController" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NDk-cv-Gan">
<rect key="frame" x="192" y="329" width="215.5" height="17"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<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>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<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 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"/>
</constraints>
</view>
<tabBarItem key="tabBarItem" title="Second" image="second" id="cPa-gy-q4n" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="4Nw-L8-lE0" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="910" y="87"/>
</scene>
<!--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">
<nil key="simulatedBottomBarMetrics"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="W28-zg-YXA">
<rect key="frame" x="0.0" y="975" width="768" height="49"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tabBar>
<connections>
<segue destination="9pv-A4-QxB" kind="relationship" relationship="viewControllers" id="u7Y-xg-7CH"/>
<segue destination="8rJ-Kc-sve" kind="relationship" relationship="viewControllers" id="lzU-1b-eKA"/>
<segue destination="BiK-DX-JK5" kind="relationship" relationship="viewControllers" id="8uc-KI-0GB"/>
<segue destination="aXk-96-nwf" kind="relationship" relationship="viewControllers" id="XuY-Eq-eiX"/>
<segue destination="BgE-dr-gW8" kind="relationship" relationship="viewControllers" id="j4H-uh-BdI"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="HuB-VB-40B" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="0.0" y="0.0"/>
</scene>
<!--Item-->
<scene sceneID="60i-zg-cAx">
<objects>
<viewController id="BiK-DX-JK5" customClass="UserViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="oSS-7K-rER"/>
<viewControllerLayoutGuide type="bottom" id="Ba7-rp-yUE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Z9a-At-6Ll">
<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">
<rect key="frame" x="0.0" y="0.0" width="640" height="555"/>
</imageView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<tabBarItem key="tabBarItem" title="Item" id="g86-Lf-lWF" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ds1-lP-WuT" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="60" y="838"/>
</scene>
<!--Item-->
<scene sceneID="RUI-wr-KlE">
<objects>
<viewController id="aXk-96-nwf" customClass="MenuViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Aha-rh-ib6"/>
<viewControllerLayoutGuide type="bottom" id="aNR-L8-QaD"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="UyR-nf-sp6">
<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>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<tabBarItem key="tabBarItem" title="Item" id="RnB-fU-3RS" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Hsc-p3-elF" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="689" y="838"/>
</scene>
<!--Item-->
<scene sceneID="B98-FR-Rjt">
<objects>
<viewController id="BgE-dr-gW8" customClass="MoreViewController" customModule="adaptive_tab_bar" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="r9s-DG-v8Y"/>
<viewControllerLayoutGuide type="bottom" id="mju-qR-F4m"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="dgq-yB-Neb">
<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>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
</view>
<tabBarItem key="tabBarItem" title="Item" id="uWZ-JL-cND" customClass="AdaptiveTabBarItem" customModule="adaptive_tab_bar" customModuleProvider="target"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="xAq-zT-Wnn" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1344" y="838"/>
</scene>
</scenes>
<resources>
<image name="background" width="640" height="1136"/>
<image name="second" width="30" height="30"/>
</resources>
</document>
@@ -1,54 +0,0 @@
//
// AdaptiveTabBarItem.swift
// adaptive-tab-bar
//
// Created by Arcilite on 19.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import AdaptiveController
class AdaptiveTabBarItem: UITabBarItem , AdaptiveApperanceProtocol {
override init(){
super.init()
}
func setFontToAdaptiveButton(font: UIFont){
self.setTitleTextAttributes(NSDictionary(objects: [font], forKeys: [NSFontAttributeName]), forState: UIControlState.Normal)
}
func setTitleToAdaptiveButton(text: NSString){
self.title = text
}
func setImageToAdaptiveButton(image: UIImage){
self.image = image
}
func setSelectedImageToAdaptiveButton(image: UIImage?){
self.selectedImage = image
}
func setImageInsetsToAdaptiveButton(insets: UIEdgeInsets){
self.imageInsets = insets
}
func setTitleOffsetToAdaptiveButton(offset: UIOffset){
self.setTitlePositionAdjustment(offset)
}
func setTitleColorToAdaptiveButton(color: UIColor){
var dictionary = self.titleTextAttributesForState(UIControlState.Normal)
dictionary.updateValue(color, forKey: NSForegroundColorAttributeName)
self.setTitleTextAttributes(dictionary, forState: UIControlState.Normal)
}
}
@@ -1,29 +0,0 @@
//
// TabBarViewController.swift
// adaptive-tab-bar
//
// Created by Arcilite on 22.09.14.
// Copyright (c) 2014 Ramotion. All rights reserved.
//
import UIKit
import QuartzCore
class TabBarViewController: UITabBarController {
override func viewDidLoad() {
super.viewDidLoad()
if (UIDevice().systemVersion as NSString).floatValue >= 7.0{
for tbi in self.tabBar.items as [UITabBarItem] {
tbi.image = tbi.image?.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
}
}
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
@@ -1,38 +0,0 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "man_bigimage@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "menu_bigimage@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "message_bigimage@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "more_bigimage@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "watch_bigimage@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "man@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "menu@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "messages@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "more@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "watch@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "man_smalltitle@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "menu_smalltitle@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "messages_smalltitle@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "more_smalltitle@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "watch_smalltitle@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "backgroud_tab@2x.png"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
@@ -1,21 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "background.png"
},
{
"idiom" : "universal",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

@@ -1,50 +0,0 @@
<?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">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>ramotion.inhouse.csite.$(PRODUCT_NAME:rfc1034identifier)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIStatusBarTintParameters</key>
<dict>
<key>UINavigationBar</key>
<dict>
<key>Style</key>
<string>UIBarStyleDefault</string>
<key>Translucent</key>
<false/>
</dict>
</dict>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>

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