├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Cartfile.private ├── Cartfile.resolved ├── Example ├── Example.xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── Example │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ └── Xmartlabs.imageset │ │ │ ├── Contents.json │ │ │ └── xmartlabs-logo-1.png │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── ViewController.swift ├── ExampleUITests │ ├── ExampleUITests.swift │ └── Info.plist ├── Header.xib ├── Playground.playground │ ├── Contents.swift │ └── contents.xcplayground └── floatLabelRow.gif ├── FloatLabelRow.podspec ├── FloatLabelRow.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcshareddata │ └── xcschemes │ └── FloatLabelRow.xcscheme ├── FloatLabelRow.xcworkspace ├── contents.xcworkspacedata └── xcshareddata │ └── IDEWorkspaceChecks.plist ├── LICENSE ├── README.md ├── Sources ├── DecimalFormatter.swift ├── FloatLabelRow.h ├── FloatLabelRow.swift ├── FloatLabelTextField.swift └── Info.plist └── Tests ├── FloatLabelRowTests.swift └── Info.plist /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing Guidelines 2 | -------------------------------------------------- 3 | 4 | This document provides general guidelines about how to contribute to the project. Keep in mind these important things before you start contributing. 5 | 6 | ### Asking Questions 7 | 8 | We do not use github issues for general library support. We think this questions should be posted on stack overflow using [FloatLabelRow](http://http://stackoverflow.com/questions/tagged/FloatLabelRow) tag. 9 | 10 | ### Reporting issues 11 | 12 | * Use [github issues](https://github.com/KarinaFernandez/FloatLabelRow/issues) to report a bug. 13 | * Before creating a new issue: 14 | * Make sure you are using the [latest release](https://github.com/KarinaFernandez/FloatLabelRow/releases). 15 | * Check if the issue was [already reported or fixed](https://github.com/KarinaFernandez/FloatLabelRow/issues?utf8=%E2%9C%93&q=is%3Aissue). Notice that it may not be released yet. 16 | * If you found a match add a brief comment "I have the same problem" or "+1". This helps prioritize the issues addressing the most common and critical first. If possible add additional information to help us reproduce and fix the issue. Please use your best judgement. 17 | * Reporting issues: 18 | * Please include the following information to help maintainers to fix the problem faster: 19 | * Xcode version you are using. 20 | * iOS version you are targeting. 21 | * Full Xcode console output of stack trace or code compilation error. 22 | * Any other additional detail you think it would be useful to understand and solve the problem. 23 | 24 | 25 | ### Pull requests 26 | 27 | The easiest way to start contributing is searching open issues by `help wanted` tag. We also add a `difficulty` tag (difficulty: easy, difficulty: moderate, difficulty: hard) in order to give an idea of how complex it can be to implement the feature according maintainers project experience. 28 | 29 | * Add test coverage to the feature or fix. We only accept new feature pull requests that have related test coverage. This allows us to keep the library stable as we move forward. 30 | * Remember to document the new feature. We do not accept new feature pull requests without its associated documentation. 31 | * In case of a new feature please update the example project showing the feature. 32 | * Please only one fix or feature per pull request. This will increase the chances your feature will be merged. 33 | 34 | 35 | ###### Suggested git workflow to contribute 36 | 37 | 1. Fork the FloatLabelRow repository. 38 | 2. Clone your forked project into your developer machine: `git clone git@github.com:/FloatLabelRow.git` 39 | 3. Add the original project repo as upstream repository in your forked project: `git remote add upstream git@github.com:KarinaFernandez/FloatLabelRow.git` 40 | 4. Before starting a new feature make sure your forked master branch is synchronized upstream master branch. Considering you do not mere your pull request into master you can run: `git checkout master` and then `git pull upstream master`. Optionally `git push origin master`. 41 | 5. Create a new branch. Note that the starting point is the upstream master branch HEAD. `git checkout -b my-feature-name` 42 | 6. Stage all your changes `git add .` and commit them `git commit -m "Your commit message"` 43 | 7. Make sure your branch is up to date with upstream master, `git pull --rebase upstream master`, resolve conflicts if necessary. This will move your commit to the top of git stack. 44 | 8. Squash your commits into one commit. `git rebase -i HEAD~6` considering you did 6 commits. 45 | 9. Push your branch into your forked remote repository. 46 | 10. Create a new pull request adding any useful comment. 47 | 48 | 49 | ###### Code style and conventions 50 | 51 | We try to follow our [swift style guide](https://github.com/KarinaFernandez/Swift-Style-Guide). Following it is not strictly necessary to contribute and to have a pull request accepted but project maintainers try to follow it. We would love to hear your ideas to improve our code style and conventions. Feel free to contribute. 52 | 53 | 54 | ### Feature proposal 55 | 56 | We would love to hear your ideas and make a discussions about it. 57 | 58 | * Use github issues to make feature proposals. 59 | * We use `type: feature request` label to mark all [feature request issues](https://github.com/KarinaFernandez/FloatLabelRow/labels/type%3A%20feature%20request). 60 | * Before submitting your proposal make sure there is no similar feature request. If you found a match feel free to join the discussion or just add a brief "+1" if you think the feature is worth implementing. 61 | * Be as specific as possible providing a precise explanation of feature request so anyone can understand the problem and the benefits of solving it. 62 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Before submitting issues ... 2 | 3 | - Make sure you are using FloatLabelRow's [latest release](https://github.com/xmartlabs/FloatLabelRow/releases) or master branch version. 4 | - Make sure your Xcode version is the latest stable one. 5 | - Check if the issue was [already reported or fixed](https://github.com/xmartlabs/FloatLabelRow/issues?utf8=%E2%9C%93&q=is%3Aissue). We add labels to each issue in order to easily find related issues. If you found a match add a brief comment "I have the same problem" or "+1". 6 | 7 | When submitting issues, please provide the following information to help maintainers to fix the problem faster: 8 | 9 | - Environment: FloatLabelRow, Xcode and iOS version you are using. 10 | - In case of reporting errors, provide Xcode console output of stack trace or code compilation error. 11 | - Any other additional detail such as your eureka form/section/row code that you think it would be useful to understand and solve the problem. 12 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Fixes #issue(s) . 2 | 3 | Changes proposed in this request: 4 | * 5 | * 6 | * 7 | 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## OS X Finder 2 | .DS_Store 3 | 4 | ## Build generated 5 | build/ 6 | DerivedData 7 | 8 | ## Various settings 9 | *.pbxuser 10 | !default.pbxuser 11 | *.mode1v3 12 | !default.mode1v3 13 | *.mode2v3 14 | !default.mode2v3 15 | *.perspectivev3 16 | !default.perspectivev3 17 | xcuserdata 18 | 19 | ## Other 20 | *.xccheckout 21 | *.moved-aside 22 | *.xcuserstate 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | 29 | ## Playgrounds 30 | timeline.xctimeline 31 | playground.xcworkspace 32 | 33 | # Swift Package Manager 34 | # 35 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 36 | # Packages/ 37 | .build/ 38 | 39 | # CocoaPods 40 | # 41 | # We recommend against adding the Pods directory to your .gitignore. However 42 | # you should judge for yourself, the pros and cons are mentioned at: 43 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 44 | # 45 | # Pods/ 46 | 47 | # Carthage 48 | # 49 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 50 | 51 | Carthage/ 52 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode8 3 | env: 4 | - DESTINATION="OS=10.0,name=iPhone 7" SCHEME="FloatLabelRow" SDK=iphonesimulator10.0 5 | 6 | before_install: 7 | - brew update 8 | - brew outdated carthage || brew upgrade carthage 9 | - carthage update --platform iOS 10 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet 11 | 12 | script: 13 | - xcodebuild clean build -project FloatLabelRow.xcodeproj -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test | xcpretty -c 14 | - xcodebuild test -project FloatLabelRow.xcodeproj -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test | xcpretty -c 15 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Change Log 2 | All notable changes to FloatLabelRow will be documented in this file. 3 | 4 | ### [1.0.0](https://github.com/KarinaFernandez/FloatLabelRow/releases/tag/1.0.0) 5 | 6 | 7 | * This is the initial version. 8 | 9 | [xmartlabs]: https://xmartlabs.com 10 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | Contributing Guidelines 2 | -------------------------------------------------- 3 | 4 | This document provides general guidelines about how to contribute to the project. Keep in mind these important things before you start contributing. 5 | 6 | ### Asking Questions 7 | 8 | We do not use github issues for general library support. We think this questions should be posted on stack overflow using [GenericPasswordRow](http://http://stackoverflow.com/questions/tagged/GenericPasswordRow) tag. 9 | 10 | ### Reporting issues 11 | 12 | * Use [github issues](https://github.com/EurekaCommunity/GenericPasswordRow/issues) to report a bug. 13 | * Before creating a new issue: 14 | * Make sure you are using the [latest release](https://github.com/EurekaCommunity/GenericPasswordRow/releases). 15 | * Check if the issue was [already reported or fixed](https://github.com/EurekaCommunity/GenericPasswordRow/issues?utf8=%E2%9C%93&q=is%3Aissue). Notice that it may not be released yet. 16 | * If you found a match add a brief comment "I have the same problem" or "+1". This helps prioritize the issues addressing the most common and critical first. If possible add additional information to help us reproduce and fix the issue. Please use your best judgement. 17 | * Reporting issues: 18 | * Please include the following information to help maintainers to fix the problem faster: 19 | * Xcode version you are using. 20 | * iOS version you are targeting. 21 | * Full Xcode console output of stack trace or code compilation error. 22 | * Any other additional detail you think it would be useful to understand and solve the problem. 23 | 24 | 25 | ### Pull requests 26 | 27 | The easiest way to start contributing is searching open issues by `help wanted` tag. We also add a `difficulty` tag (difficulty: easy, difficulty: moderate, difficulty: hard) in order to give an idea of how complex it can be to implement the feature according maintainers project experience. 28 | 29 | * Add test coverage to the feature or fix. We only accept new feature pull requests that have related test coverage. This allows us to keep the library stable as we move forward. 30 | * Remember to document the new feature. We do not accept new feature pull requests without its associated documentation. 31 | * In case of a new feature please update the example project showing the feature. 32 | * Please only one fix or feature per pull request. This will increase the chances your feature will be merged. 33 | 34 | 35 | ###### Suggested git workflow to contribute 36 | 37 | 1. Fork the GenericPasswordRow repository. 38 | 2. Clone your forked project into your developer machine: `git clone git@github.com:/GenericPasswordRow.git` 39 | 3. Add the original project repo as upstream repository in your forked project: `git remote add upstream git@github.com:EurekaCommunity/GenericPasswordRow.git` 40 | 4. Before starting a new feature make sure your forked master branch is synchronized upstream master branch. Considering you do not mere your pull request into master you can run: `git checkout master` and then `git pull upstream master`. Optionally `git push origin master`. 41 | 5. Create a new branch. Note that the starting point is the upstream master branch HEAD. `git checkout -b my-feature-name` 42 | 6. Stage all your changes `git add .` and commit them `git commit -m "Your commit message"` 43 | 7. Make sure your branch is up to date with upstream master, `git pull --rebase upstream master`, resolve conflicts if necessary. This will move your commit to the top of git stack. 44 | 8. Squash your commits into one commit. `git rebase -i HEAD~6` considering you did 6 commits. 45 | 9. Push your branch into your forked remote repository. 46 | 10. Create a new pull request adding any useful comment. 47 | 48 | 49 | ###### Code style and conventions 50 | 51 | We try to follow our [swift style guide](https://github.com/EurekaCommunity/Swift-Style-Guide). Following it is not strictly necessary to contribute and to have a pull request accepted but project maintainers try to follow it. We would love to hear your ideas to improve our code style and conventions. Feel free to contribute. 52 | 53 | 54 | ### Feature proposal 55 | 56 | We would love to hear your ideas and make a discussions about it. 57 | 58 | * Use github issues to make feature proposals. 59 | * We use `type: feature request` label to mark all [feature request issues](https://github.com/EurekaCommunity/GenericPasswordRow/labels/type%3A%20feature%20request). 60 | * Before submitting your proposal make sure there is no similar feature request. If you found a match feel free to join the discussion or just add a brief "+1" if you think the feature is worth implementing. 61 | * Be as specific as possible providing a precise explanation of feature request so anyone can understand the problem and the benefits of solving it. 62 | -------------------------------------------------------------------------------- /Cartfile.private: -------------------------------------------------------------------------------- 1 | github "Quick/Quick" 2 | github "Quick/Nimble" 3 | github "xmartlabs/Eureka" ~> 3.0 4 | -------------------------------------------------------------------------------- /Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "Quick/Nimble" "v7.0.1" 2 | github "Quick/Quick" "v1.1.0" 3 | github "xmartlabs/Eureka" "3.0.0" 4 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 287D0A721C4B7877004566D6 /* ExampleUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 287D0A711C4B7877004566D6 /* ExampleUITests.swift */; }; 11 | 28F828D01C4B714D00330CF4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28F828CF1C4B714D00330CF4 /* AppDelegate.swift */; }; 12 | 28F828D21C4B714D00330CF4 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28F828D11C4B714D00330CF4 /* ViewController.swift */; }; 13 | 28F828D51C4B714D00330CF4 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 28F828D31C4B714D00330CF4 /* Main.storyboard */; }; 14 | 28F828D71C4B714D00330CF4 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 28F828D61C4B714D00330CF4 /* Assets.xcassets */; }; 15 | 28F828DA1C4B714D00330CF4 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 28F828D81C4B714D00330CF4 /* LaunchScreen.storyboard */; }; 16 | 9A61F6F61EBA6BF400CBE062 /* Eureka.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A61F6EF1EBA6A7800CBE062 /* Eureka.framework */; }; 17 | 9A61F6F71EBA6BF400CBE062 /* Eureka.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9A61F6EF1EBA6A7800CBE062 /* Eureka.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 18 | 9AA9B7E11EF1762400F886A7 /* Header.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9AA9B7E01EF1762400F886A7 /* Header.xib */; }; 19 | 9AB0DCD51EBA6E37000AA210 /* FloatLabelRow.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A61F6FF1EBA6DF100CBE062 /* FloatLabelRow.framework */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 28F828E11C4B714D00330CF4 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 28F828C41C4B714D00330CF4 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 28F828CB1C4B714D00330CF4; 28 | remoteInfo = Example; 29 | }; 30 | 9A61F6FE1EBA6DF100CBE062 /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 9A61F6F91EBA6DF100CBE062 /* FloatLabelRow.xcodeproj */; 33 | proxyType = 2; 34 | remoteGlobalIDString = 28F8287D1C494B2C00330CF4; 35 | remoteInfo = FloatLabelRow; 36 | }; 37 | 9A61F7001EBA6DF100CBE062 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 9A61F6F91EBA6DF100CBE062 /* FloatLabelRow.xcodeproj */; 40 | proxyType = 2; 41 | remoteGlobalIDString = 28F828871C494B2C00330CF4; 42 | remoteInfo = FloatLabelRowTests; 43 | }; 44 | /* End PBXContainerItemProxy section */ 45 | 46 | /* Begin PBXCopyFilesBuildPhase section */ 47 | 9A61F6F81EBA6BF400CBE062 /* Embed Frameworks */ = { 48 | isa = PBXCopyFilesBuildPhase; 49 | buildActionMask = 2147483647; 50 | dstPath = ""; 51 | dstSubfolderSpec = 10; 52 | files = ( 53 | 9A61F6F71EBA6BF400CBE062 /* Eureka.framework in Embed Frameworks */, 54 | ); 55 | name = "Embed Frameworks"; 56 | runOnlyForDeploymentPostprocessing = 0; 57 | }; 58 | /* End PBXCopyFilesBuildPhase section */ 59 | 60 | /* Begin PBXFileReference section */ 61 | 287D0A711C4B7877004566D6 /* ExampleUITests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExampleUITests.swift; sourceTree = ""; }; 62 | 28F828CC1C4B714D00330CF4 /* Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 63 | 28F828CF1C4B714D00330CF4 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = Example/AppDelegate.swift; sourceTree = ""; }; 64 | 28F828D11C4B714D00330CF4 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = Example/ViewController.swift; sourceTree = ""; }; 65 | 28F828D41C4B714D00330CF4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 66 | 28F828D61C4B714D00330CF4 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Example/Assets.xcassets; sourceTree = ""; }; 67 | 28F828D91C4B714D00330CF4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 68 | 28F828DB1C4B714D00330CF4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Example/Info.plist; sourceTree = ""; }; 69 | 28F828E01C4B714D00330CF4 /* ExampleUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ExampleUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 70 | 28F828E61C4B714D00330CF4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 71 | 9A61F6EF1EBA6A7800CBE062 /* Eureka.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Eureka.framework; path = ../Carthage/Build/iOS/Eureka.framework; sourceTree = ""; }; 72 | 9A61F6F91EBA6DF100CBE062 /* FloatLabelRow.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FloatLabelRow.xcodeproj; path = ../FloatLabelRow.xcodeproj; sourceTree = ""; }; 73 | 9AA9B7E01EF1762400F886A7 /* Header.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = Header.xib; sourceTree = ""; }; 74 | /* End PBXFileReference section */ 75 | 76 | /* Begin PBXFrameworksBuildPhase section */ 77 | 28F828C91C4B714D00330CF4 /* Frameworks */ = { 78 | isa = PBXFrameworksBuildPhase; 79 | buildActionMask = 2147483647; 80 | files = ( 81 | 9AB0DCD51EBA6E37000AA210 /* FloatLabelRow.framework in Frameworks */, 82 | 9A61F6F61EBA6BF400CBE062 /* Eureka.framework in Frameworks */, 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | 28F828DD1C4B714D00330CF4 /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | 28F828C31C4B714D00330CF4 = { 97 | isa = PBXGroup; 98 | children = ( 99 | 9A61F6F91EBA6DF100CBE062 /* FloatLabelRow.xcodeproj */, 100 | 28F828CE1C4B714D00330CF4 /* Example */, 101 | 28F828E31C4B714D00330CF4 /* ExampleUITests */, 102 | 28F828CD1C4B714D00330CF4 /* Products */, 103 | 9A61F6EE1EBA6A5900CBE062 /* Dependencies */, 104 | ); 105 | sourceTree = ""; 106 | }; 107 | 28F828CD1C4B714D00330CF4 /* Products */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 28F828CC1C4B714D00330CF4 /* Example.app */, 111 | 28F828E01C4B714D00330CF4 /* ExampleUITests.xctest */, 112 | ); 113 | name = Products; 114 | sourceTree = ""; 115 | }; 116 | 28F828CE1C4B714D00330CF4 /* Example */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 9A1303571EC0AAF600D69281 /* Header */, 120 | 28F828CF1C4B714D00330CF4 /* AppDelegate.swift */, 121 | 28F828D11C4B714D00330CF4 /* ViewController.swift */, 122 | 28F828D31C4B714D00330CF4 /* Main.storyboard */, 123 | 28F828D61C4B714D00330CF4 /* Assets.xcassets */, 124 | 28F828D81C4B714D00330CF4 /* LaunchScreen.storyboard */, 125 | 28F828DB1C4B714D00330CF4 /* Info.plist */, 126 | ); 127 | name = Example; 128 | sourceTree = ""; 129 | }; 130 | 28F828E31C4B714D00330CF4 /* ExampleUITests */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 28F828E61C4B714D00330CF4 /* Info.plist */, 134 | 287D0A711C4B7877004566D6 /* ExampleUITests.swift */, 135 | ); 136 | path = ExampleUITests; 137 | sourceTree = ""; 138 | }; 139 | 9A1303571EC0AAF600D69281 /* Header */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 9AA9B7E01EF1762400F886A7 /* Header.xib */, 143 | ); 144 | name = Header; 145 | sourceTree = ""; 146 | }; 147 | 9A61F6EE1EBA6A5900CBE062 /* Dependencies */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 9A61F6EF1EBA6A7800CBE062 /* Eureka.framework */, 151 | ); 152 | name = Dependencies; 153 | sourceTree = ""; 154 | }; 155 | 9A61F6FA1EBA6DF100CBE062 /* Products */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 9A61F6FF1EBA6DF100CBE062 /* FloatLabelRow.framework */, 159 | 9A61F7011EBA6DF100CBE062 /* FloatLabelRowTests.xctest */, 160 | ); 161 | name = Products; 162 | sourceTree = ""; 163 | }; 164 | /* End PBXGroup section */ 165 | 166 | /* Begin PBXNativeTarget section */ 167 | 28F828CB1C4B714D00330CF4 /* Example */ = { 168 | isa = PBXNativeTarget; 169 | buildConfigurationList = 28F828E91C4B714D00330CF4 /* Build configuration list for PBXNativeTarget "Example" */; 170 | buildPhases = ( 171 | 28F828C81C4B714D00330CF4 /* Sources */, 172 | 28F828C91C4B714D00330CF4 /* Frameworks */, 173 | 28F828CA1C4B714D00330CF4 /* Resources */, 174 | 9A61F6F81EBA6BF400CBE062 /* Embed Frameworks */, 175 | 9A61F6EC1EBA687400CBE062 /* ShellScript */, 176 | ); 177 | buildRules = ( 178 | ); 179 | dependencies = ( 180 | ); 181 | name = Example; 182 | productName = Example; 183 | productReference = 28F828CC1C4B714D00330CF4 /* Example.app */; 184 | productType = "com.apple.product-type.application"; 185 | }; 186 | 28F828DF1C4B714D00330CF4 /* ExampleUITests */ = { 187 | isa = PBXNativeTarget; 188 | buildConfigurationList = 28F828EC1C4B714D00330CF4 /* Build configuration list for PBXNativeTarget "ExampleUITests" */; 189 | buildPhases = ( 190 | 28F828DC1C4B714D00330CF4 /* Sources */, 191 | 28F828DD1C4B714D00330CF4 /* Frameworks */, 192 | 28F828DE1C4B714D00330CF4 /* Resources */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | 28F828E21C4B714D00330CF4 /* PBXTargetDependency */, 198 | ); 199 | name = ExampleUITests; 200 | productName = ExampleUITests; 201 | productReference = 28F828E01C4B714D00330CF4 /* ExampleUITests.xctest */; 202 | productType = "com.apple.product-type.bundle.ui-testing"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | 28F828C41C4B714D00330CF4 /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastSwiftUpdateCheck = 0720; 211 | LastUpgradeCheck = 1020; 212 | TargetAttributes = { 213 | 28F828CB1C4B714D00330CF4 = { 214 | CreatedOnToolsVersion = 7.2; 215 | DevelopmentTeam = 6F2G55XL63; 216 | LastSwiftMigration = 0800; 217 | ProvisioningStyle = Automatic; 218 | }; 219 | 28F828DF1C4B714D00330CF4 = { 220 | CreatedOnToolsVersion = 7.2; 221 | LastSwiftMigration = 0800; 222 | TestTargetID = 28F828CB1C4B714D00330CF4; 223 | }; 224 | }; 225 | }; 226 | buildConfigurationList = 28F828C71C4B714D00330CF4 /* Build configuration list for PBXProject "Example" */; 227 | compatibilityVersion = "Xcode 3.2"; 228 | developmentRegion = en; 229 | hasScannedForEncodings = 0; 230 | knownRegions = ( 231 | en, 232 | Base, 233 | ); 234 | mainGroup = 28F828C31C4B714D00330CF4; 235 | productRefGroup = 28F828CD1C4B714D00330CF4 /* Products */; 236 | projectDirPath = ""; 237 | projectReferences = ( 238 | { 239 | ProductGroup = 9A61F6FA1EBA6DF100CBE062 /* Products */; 240 | ProjectRef = 9A61F6F91EBA6DF100CBE062 /* FloatLabelRow.xcodeproj */; 241 | }, 242 | ); 243 | projectRoot = ""; 244 | targets = ( 245 | 28F828CB1C4B714D00330CF4 /* Example */, 246 | 28F828DF1C4B714D00330CF4 /* ExampleUITests */, 247 | ); 248 | }; 249 | /* End PBXProject section */ 250 | 251 | /* Begin PBXReferenceProxy section */ 252 | 9A61F6FF1EBA6DF100CBE062 /* FloatLabelRow.framework */ = { 253 | isa = PBXReferenceProxy; 254 | fileType = wrapper.framework; 255 | path = FloatLabelRow.framework; 256 | remoteRef = 9A61F6FE1EBA6DF100CBE062 /* PBXContainerItemProxy */; 257 | sourceTree = BUILT_PRODUCTS_DIR; 258 | }; 259 | 9A61F7011EBA6DF100CBE062 /* FloatLabelRowTests.xctest */ = { 260 | isa = PBXReferenceProxy; 261 | fileType = wrapper.cfbundle; 262 | path = FloatLabelRowTests.xctest; 263 | remoteRef = 9A61F7001EBA6DF100CBE062 /* PBXContainerItemProxy */; 264 | sourceTree = BUILT_PRODUCTS_DIR; 265 | }; 266 | /* End PBXReferenceProxy section */ 267 | 268 | /* Begin PBXResourcesBuildPhase section */ 269 | 28F828CA1C4B714D00330CF4 /* Resources */ = { 270 | isa = PBXResourcesBuildPhase; 271 | buildActionMask = 2147483647; 272 | files = ( 273 | 9AA9B7E11EF1762400F886A7 /* Header.xib in Resources */, 274 | 28F828DA1C4B714D00330CF4 /* LaunchScreen.storyboard in Resources */, 275 | 28F828D71C4B714D00330CF4 /* Assets.xcassets in Resources */, 276 | 28F828D51C4B714D00330CF4 /* Main.storyboard in Resources */, 277 | ); 278 | runOnlyForDeploymentPostprocessing = 0; 279 | }; 280 | 28F828DE1C4B714D00330CF4 /* Resources */ = { 281 | isa = PBXResourcesBuildPhase; 282 | buildActionMask = 2147483647; 283 | files = ( 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | /* End PBXResourcesBuildPhase section */ 288 | 289 | /* Begin PBXShellScriptBuildPhase section */ 290 | 9A61F6EC1EBA687400CBE062 /* ShellScript */ = { 291 | isa = PBXShellScriptBuildPhase; 292 | buildActionMask = 2147483647; 293 | files = ( 294 | ); 295 | inputPaths = ( 296 | "$(SRCROOT)/../Carthage/Build/iOS/Eureka.framework", 297 | ); 298 | outputPaths = ( 299 | ); 300 | runOnlyForDeploymentPostprocessing = 0; 301 | shellPath = /bin/sh; 302 | shellScript = "/usr/local/bin/carthage copy-frameworks"; 303 | }; 304 | /* End PBXShellScriptBuildPhase section */ 305 | 306 | /* Begin PBXSourcesBuildPhase section */ 307 | 28F828C81C4B714D00330CF4 /* Sources */ = { 308 | isa = PBXSourcesBuildPhase; 309 | buildActionMask = 2147483647; 310 | files = ( 311 | 28F828D21C4B714D00330CF4 /* ViewController.swift in Sources */, 312 | 28F828D01C4B714D00330CF4 /* AppDelegate.swift in Sources */, 313 | ); 314 | runOnlyForDeploymentPostprocessing = 0; 315 | }; 316 | 28F828DC1C4B714D00330CF4 /* Sources */ = { 317 | isa = PBXSourcesBuildPhase; 318 | buildActionMask = 2147483647; 319 | files = ( 320 | 287D0A721C4B7877004566D6 /* ExampleUITests.swift in Sources */, 321 | ); 322 | runOnlyForDeploymentPostprocessing = 0; 323 | }; 324 | /* End PBXSourcesBuildPhase section */ 325 | 326 | /* Begin PBXTargetDependency section */ 327 | 28F828E21C4B714D00330CF4 /* PBXTargetDependency */ = { 328 | isa = PBXTargetDependency; 329 | target = 28F828CB1C4B714D00330CF4 /* Example */; 330 | targetProxy = 28F828E11C4B714D00330CF4 /* PBXContainerItemProxy */; 331 | }; 332 | /* End PBXTargetDependency section */ 333 | 334 | /* Begin PBXVariantGroup section */ 335 | 28F828D31C4B714D00330CF4 /* Main.storyboard */ = { 336 | isa = PBXVariantGroup; 337 | children = ( 338 | 28F828D41C4B714D00330CF4 /* Base */, 339 | ); 340 | name = Main.storyboard; 341 | path = Example; 342 | sourceTree = ""; 343 | }; 344 | 28F828D81C4B714D00330CF4 /* LaunchScreen.storyboard */ = { 345 | isa = PBXVariantGroup; 346 | children = ( 347 | 28F828D91C4B714D00330CF4 /* Base */, 348 | ); 349 | name = LaunchScreen.storyboard; 350 | path = Example; 351 | sourceTree = ""; 352 | }; 353 | /* End PBXVariantGroup section */ 354 | 355 | /* Begin XCBuildConfiguration section */ 356 | 28F828E71C4B714D00330CF4 /* Debug */ = { 357 | isa = XCBuildConfiguration; 358 | buildSettings = { 359 | ALWAYS_SEARCH_USER_PATHS = NO; 360 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 361 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 362 | CLANG_CXX_LIBRARY = "libc++"; 363 | CLANG_ENABLE_MODULES = YES; 364 | CLANG_ENABLE_OBJC_ARC = YES; 365 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 366 | CLANG_WARN_BOOL_CONVERSION = YES; 367 | CLANG_WARN_COMMA = YES; 368 | CLANG_WARN_CONSTANT_CONVERSION = YES; 369 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 370 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 371 | CLANG_WARN_EMPTY_BODY = YES; 372 | CLANG_WARN_ENUM_CONVERSION = YES; 373 | CLANG_WARN_INFINITE_RECURSION = YES; 374 | CLANG_WARN_INT_CONVERSION = YES; 375 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 376 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 377 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 378 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 379 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 380 | CLANG_WARN_STRICT_PROTOTYPES = YES; 381 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 382 | CLANG_WARN_UNREACHABLE_CODE = YES; 383 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 384 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 385 | COPY_PHASE_STRIP = NO; 386 | DEBUG_INFORMATION_FORMAT = dwarf; 387 | ENABLE_STRICT_OBJC_MSGSEND = YES; 388 | ENABLE_TESTABILITY = YES; 389 | GCC_C_LANGUAGE_STANDARD = gnu99; 390 | GCC_DYNAMIC_NO_PIC = NO; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_OPTIMIZATION_LEVEL = 0; 393 | GCC_PREPROCESSOR_DEFINITIONS = ( 394 | "DEBUG=1", 395 | "$(inherited)", 396 | ); 397 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 398 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 399 | GCC_WARN_UNDECLARED_SELECTOR = YES; 400 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 401 | GCC_WARN_UNUSED_FUNCTION = YES; 402 | GCC_WARN_UNUSED_VARIABLE = YES; 403 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 404 | MTL_ENABLE_DEBUG_INFO = YES; 405 | ONLY_ACTIVE_ARCH = YES; 406 | SDKROOT = iphoneos; 407 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 408 | }; 409 | name = Debug; 410 | }; 411 | 28F828E81C4B714D00330CF4 /* Release */ = { 412 | isa = XCBuildConfiguration; 413 | buildSettings = { 414 | ALWAYS_SEARCH_USER_PATHS = NO; 415 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 416 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 417 | CLANG_CXX_LIBRARY = "libc++"; 418 | CLANG_ENABLE_MODULES = YES; 419 | CLANG_ENABLE_OBJC_ARC = YES; 420 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 421 | CLANG_WARN_BOOL_CONVERSION = YES; 422 | CLANG_WARN_COMMA = YES; 423 | CLANG_WARN_CONSTANT_CONVERSION = YES; 424 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 425 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 426 | CLANG_WARN_EMPTY_BODY = YES; 427 | CLANG_WARN_ENUM_CONVERSION = YES; 428 | CLANG_WARN_INFINITE_RECURSION = YES; 429 | CLANG_WARN_INT_CONVERSION = YES; 430 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 431 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 432 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 433 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 434 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 435 | CLANG_WARN_STRICT_PROTOTYPES = YES; 436 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 437 | CLANG_WARN_UNREACHABLE_CODE = YES; 438 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 439 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 440 | COPY_PHASE_STRIP = NO; 441 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 442 | ENABLE_NS_ASSERTIONS = NO; 443 | ENABLE_STRICT_OBJC_MSGSEND = YES; 444 | GCC_C_LANGUAGE_STANDARD = gnu99; 445 | GCC_NO_COMMON_BLOCKS = YES; 446 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 447 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 448 | GCC_WARN_UNDECLARED_SELECTOR = YES; 449 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 450 | GCC_WARN_UNUSED_FUNCTION = YES; 451 | GCC_WARN_UNUSED_VARIABLE = YES; 452 | IPHONEOS_DEPLOYMENT_TARGET = 9.2; 453 | MTL_ENABLE_DEBUG_INFO = NO; 454 | SDKROOT = iphoneos; 455 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 456 | VALIDATE_PRODUCT = YES; 457 | }; 458 | name = Release; 459 | }; 460 | 28F828EA1C4B714D00330CF4 /* Debug */ = { 461 | isa = XCBuildConfiguration; 462 | buildSettings = { 463 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 464 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 465 | DEVELOPMENT_TEAM = 6F2G55XL63; 466 | FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../Carthage/Build/iOS"; 467 | INFOPLIST_FILE = "$(SRCROOT)/Example/Info.plist"; 468 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 469 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(SRCROOT)/../Carthage/Build/iOS"; 470 | PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example; 471 | PRODUCT_NAME = "$(TARGET_NAME)"; 472 | PROVISIONING_PROFILE_SPECIFIER = ""; 473 | SWIFT_VERSION = 5.0; 474 | }; 475 | name = Debug; 476 | }; 477 | 28F828EB1C4B714D00330CF4 /* Release */ = { 478 | isa = XCBuildConfiguration; 479 | buildSettings = { 480 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 481 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 482 | DEVELOPMENT_TEAM = 6F2G55XL63; 483 | FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/../Carthage/Build/iOS"; 484 | INFOPLIST_FILE = "$(SRCROOT)/Example/Info.plist"; 485 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks $(SRCROOT)/../Carthage/Build/iOS"; 487 | PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.Example; 488 | PRODUCT_NAME = "$(TARGET_NAME)"; 489 | PROVISIONING_PROFILE_SPECIFIER = ""; 490 | SWIFT_VERSION = 5.0; 491 | }; 492 | name = Release; 493 | }; 494 | 28F828ED1C4B714D00330CF4 /* Debug */ = { 495 | isa = XCBuildConfiguration; 496 | buildSettings = { 497 | CLANG_ENABLE_MODULES = YES; 498 | INFOPLIST_FILE = Example/ExampleUITests/Info.plist; 499 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 500 | PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.ExampleUITests; 501 | PRODUCT_NAME = "$(TARGET_NAME)"; 502 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 503 | SWIFT_VERSION = 3.0; 504 | TEST_TARGET_NAME = Example; 505 | USES_XCTRUNNER = YES; 506 | }; 507 | name = Debug; 508 | }; 509 | 28F828EE1C4B714D00330CF4 /* Release */ = { 510 | isa = XCBuildConfiguration; 511 | buildSettings = { 512 | CLANG_ENABLE_MODULES = YES; 513 | INFOPLIST_FILE = Example/ExampleUITests/Info.plist; 514 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 515 | PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.ExampleUITests; 516 | PRODUCT_NAME = "$(TARGET_NAME)"; 517 | SWIFT_VERSION = 3.0; 518 | TEST_TARGET_NAME = Example; 519 | USES_XCTRUNNER = YES; 520 | }; 521 | name = Release; 522 | }; 523 | /* End XCBuildConfiguration section */ 524 | 525 | /* Begin XCConfigurationList section */ 526 | 28F828C71C4B714D00330CF4 /* Build configuration list for PBXProject "Example" */ = { 527 | isa = XCConfigurationList; 528 | buildConfigurations = ( 529 | 28F828E71C4B714D00330CF4 /* Debug */, 530 | 28F828E81C4B714D00330CF4 /* Release */, 531 | ); 532 | defaultConfigurationIsVisible = 0; 533 | defaultConfigurationName = Release; 534 | }; 535 | 28F828E91C4B714D00330CF4 /* Build configuration list for PBXNativeTarget "Example" */ = { 536 | isa = XCConfigurationList; 537 | buildConfigurations = ( 538 | 28F828EA1C4B714D00330CF4 /* Debug */, 539 | 28F828EB1C4B714D00330CF4 /* Release */, 540 | ); 541 | defaultConfigurationIsVisible = 0; 542 | defaultConfigurationName = Release; 543 | }; 544 | 28F828EC1C4B714D00330CF4 /* Build configuration list for PBXNativeTarget "ExampleUITests" */ = { 545 | isa = XCConfigurationList; 546 | buildConfigurations = ( 547 | 28F828ED1C4B714D00330CF4 /* Debug */, 548 | 28F828EE1C4B714D00330CF4 /* Release */, 549 | ); 550 | defaultConfigurationIsVisible = 0; 551 | defaultConfigurationName = Release; 552 | }; 553 | /* End XCConfigurationList section */ 554 | }; 555 | rootObject = 28F828C41C4B714D00330CF4 /* Project object */; 556 | } 557 | -------------------------------------------------------------------------------- /Example/Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/Example/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Example 4 | // 5 | // Copyright © 2016 Xmartlabs SRL. All rights reserved. 6 | // 7 | 8 | import UIKit 9 | 10 | @UIApplicationMain 11 | class AppDelegate: UIResponder, UIApplicationDelegate { 12 | 13 | var window: UIWindow? 14 | 15 | 16 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 17 | // Override point for customization after application launch. 18 | return true 19 | } 20 | 21 | func applicationWillResignActive(_ application: UIApplication) { 22 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 23 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 24 | } 25 | 26 | func applicationDidEnterBackground(_ application: UIApplication) { 27 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 28 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 29 | } 30 | 31 | func applicationWillEnterForeground(_ application: UIApplication) { 32 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 33 | } 34 | 35 | func applicationDidBecomeActive(_ application: UIApplication) { 36 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 37 | } 38 | 39 | func applicationWillTerminate(_ application: UIApplication) { 40 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 41 | } 42 | 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | } 43 | ], 44 | "info" : { 45 | "version" : 1, 46 | "author" : "xcode" 47 | } 48 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Xmartlabs.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "xmartlabs-logo-1.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /Example/Example/Assets.xcassets/Xmartlabs.imageset/xmartlabs-logo-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EurekaCommunity/FloatLabelRow/844486f13f55ffe1f8c78a12fd0ba31bb637f528/Example/Example/Assets.xcassets/Xmartlabs.imageset/xmartlabs-logo-1.png -------------------------------------------------------------------------------- /Example/Example/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /Example/Example/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | -------------------------------------------------------------------------------- /Example/Example/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /Example/Example/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // Example 4 | // 5 | // Copyright © 2016 Xmartlabs SRL. All rights reserved. 6 | // 7 | 8 | import Eureka 9 | import FloatLabelRow 10 | import UIKit 11 | 12 | //MARK: HomeViewController 13 | class HomeViewController : FormViewController { 14 | 15 | override func viewDidLoad() { 16 | super.viewDidLoad() 17 | 18 | form +++ 19 | Section() { section in 20 | let header = HeaderFooterView(.nibFile(name: "Header", bundle: Bundle.main)) 21 | section.header = header 22 | } 23 | <<< ButtonRow("Field row label examples") { 24 | $0.title = $0.tag 25 | $0.presentationMode = .segueName(segueName: "RowsExampleViewControllerSegue", onDismiss: nil) 26 | } 27 | <<< ButtonRow("Formatters examples") { (row: ButtonRow) -> Void in 28 | row.title = row.tag 29 | row.presentationMode = .segueName(segueName: "FormattersControllerSegue", onDismiss: nil) 30 | } 31 | } 32 | 33 | } 34 | 35 | // MARK: Class RowsExampleViewController - Default provided FieldRow types 36 | class RowsExampleViewController: FormViewController { 37 | 38 | override func viewDidLoad() { 39 | super.viewDidLoad() 40 | 41 | form +++ 42 | Section(header: "Field Row Label examples", footer: "Field rows provided by default") 43 | <<< TextFloatLabelRow() { 44 | $0.title = "Text Field" 45 | $0.value = "Placeholder" 46 | } 47 | <<< IntFloatLabelRow() { 48 | $0.title = "Int field" 49 | $0.value = 2017 50 | } 51 | <<< DecimalFloatLabelRow() { 52 | $0.title = "Decimal field" 53 | $0.value = 2017 54 | $0.formatter = DecimalFormatter() 55 | $0.useFormatterDuringInput = true 56 | } 57 | <<< URLFloatLabelRow() { 58 | $0.title = "URL field" 59 | $0.value = URL(string: "http://xmartlabs.com") 60 | } 61 | <<< TwitterFloatLabelRow() { 62 | $0.title = "Twitter field" 63 | $0.value = "@xmartlabs" 64 | } 65 | <<< AccountFloatLabelRow() { 66 | $0.title = "Account field" 67 | $0.value = "Xmartlabs" 68 | } 69 | <<< PasswordFloatLabelRow() { 70 | $0.title = "Password field" 71 | $0.value = "password" 72 | } 73 | <<< NameFloatLabelRow() { 74 | $0.title = "Name field" 75 | $0.value = "Xmartlabs" 76 | } 77 | <<< EmailFloatLabelRow() { 78 | $0.title = "Email field" 79 | $0.value = "hello@xmartlabs" 80 | } 81 | <<< PhoneFloatLabelRow() { 82 | $0.title = "Phone field (disabled)" 83 | $0.value = "+598 9898983510" 84 | $0.disabled = true 85 | } 86 | <<< ZipCodeFloatLabelRow() { 87 | $0.title = "Zip code field" 88 | $0.value = "90210" 89 | } 90 | } 91 | 92 | } 93 | 94 | //MARK: Class FormatterExample - Native and Custom formatters 95 | class FormatterExample : FormViewController { 96 | 97 | override func viewDidLoad() { 98 | super.viewDidLoad() 99 | 100 | form +++ 101 | Section(header: "Number formatters", footer: "Native formatters") 102 | <<< DecimalFloatLabelRow() { 103 | $0.title = "Scientific style" 104 | $0.value = 2017 105 | let formatter = NumberFormatter() 106 | formatter.locale = .current 107 | formatter.numberStyle = .scientific 108 | $0.formatter = formatter 109 | } 110 | <<< IntFloatLabelRow() { 111 | $0.title = "Spell out style" 112 | $0.value = 2017 113 | let formatter = NumberFormatter() 114 | formatter.locale = .current 115 | formatter.numberStyle = .spellOut 116 | $0.formatter = formatter 117 | } 118 | <<< DecimalFloatLabelRow() { 119 | $0.title = "Energy: Jules to calories" 120 | $0.value = 100.0 121 | let formatter = EnergyFormatter() 122 | $0.formatter = formatter 123 | } 124 | <<< IntFloatLabelRow() { 125 | $0.title = "Weight: Kg to lb" 126 | $0.value = 1000 127 | $0.formatter = MassFormatter() 128 | } 129 | 130 | +++ Section(header: "Custom formatter", footer: "Custom formatter: CurrencyFormatter") 131 | <<< DecimalFloatLabelRow() { 132 | $0.title = "Currency style" 133 | $0.value = 2000.00 134 | $0.useFormatterDuringInput = true 135 | let formatter = CurrencyFormatter() 136 | formatter.locale = .current 137 | formatter.numberStyle = .currency 138 | $0.formatter = formatter 139 | } 140 | } 141 | 142 | class CurrencyFormatter : NumberFormatter, FormatterProtocol { 143 | 144 | override func getObjectValue(_ obj: AutoreleasingUnsafeMutablePointer?, for string: String, range rangep: UnsafeMutablePointer?) throws { 145 | guard obj != nil else { return } 146 | let str = string.components(separatedBy: CharacterSet.decimalDigits.inverted).joined(separator: "") 147 | obj?.pointee = NSNumber(value: (Double(str) ?? 0.0)/Double(pow(10.0, Double(minimumFractionDigits)))) 148 | } 149 | 150 | func getNewPosition(forPosition position: UITextPosition, inTextInput textInput: UITextInput, oldValue: String?, newValue: String?) -> UITextPosition { 151 | return textInput.position(from: position, offset:((newValue?.characters.count ?? 0) - (oldValue?.characters.count ?? 0))) ?? position 152 | } 153 | 154 | } 155 | 156 | } 157 | -------------------------------------------------------------------------------- /Example/ExampleUITests/ExampleUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleUITests.swift 3 | // ExampleUITests 4 | // 5 | // Copyright © 2016 Xmartlabs SRL. All rights reserved. 6 | // 7 | 8 | import XCTest 9 | 10 | class ExampleUITests: XCTestCase { 11 | 12 | override func setUp() { 13 | super.setUp() 14 | 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | 17 | // In UI tests it is usually best to stop immediately when a failure occurs. 18 | continueAfterFailure = false 19 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 20 | XCUIApplication().launch() 21 | 22 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 23 | } 24 | 25 | override func tearDown() { 26 | // Put teardown code here. This method is called after the invocation of each test method in the class. 27 | super.tearDown() 28 | } 29 | 30 | func testExample() { 31 | // Use recording to get started writing UI tests. 32 | // Use XCTAssert and related functions to verify your tests produce the correct results. 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Example/ExampleUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/Header.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /Example/Playground.playground/Contents.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Playground.playground 3 | // FloatLabelRow 4 | // 5 | // Copyright © 2016 Xmartlabs SRL. All rights reserved. 6 | // 7 | 8 | //: Playground - noun: a place where people can play 9 | 10 | import UIKit 11 | import FloatLabelRow 12 | 13 | var str = "Hello, playground" 14 | -------------------------------------------------------------------------------- /Example/Playground.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Example/floatLabelRow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EurekaCommunity/FloatLabelRow/844486f13f55ffe1f8c78a12fd0ba31bb637f528/Example/floatLabelRow.gif -------------------------------------------------------------------------------- /FloatLabelRow.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "FloatLabelRow" 3 | s.version = "1.0.0" 4 | s.summary = "Custom row types that support floating placeholders." 5 | s.homepage = "https://github.com/EurekaCommunity/FloatLabelRow" 6 | s.license = { type: 'MIT', file: 'LICENSE' } 7 | s.author = { "Xmartlabs SRL" => "swift@xmartlabs.com" } 8 | s.source = { git: "https://github.com/EurekaCommunity/FloatLabelRow.git", tag: s.version.to_s } 9 | s.ios.deployment_target = '9.3' 10 | s.requires_arc = true 11 | s.ios.source_files = ['Sources/**/*.{swift}'] 12 | s.ios.frameworks = 'UIKit', 'Foundation' 13 | s.dependency 'Eureka', '>= 5.0.1' 14 | end 15 | -------------------------------------------------------------------------------- /FloatLabelRow.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 287D0A6E1C4B73BD004566D6 /* FloatLabelRowTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 287D0A6D1C4B73BD004566D6 /* FloatLabelRowTests.swift */; }; 11 | 28F828811C494B2C00330CF4 /* FloatLabelRow.h in Headers */ = {isa = PBXBuildFile; fileRef = 28F828801C494B2C00330CF4 /* FloatLabelRow.h */; settings = {ATTRIBUTES = (Public, ); }; }; 12 | 28F828881C494B2C00330CF4 /* FloatLabelRow.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 28F8287D1C494B2C00330CF4 /* FloatLabelRow.framework */; }; 13 | 62DCF8437C71FCA6B2F66852 /* Pods_FloatLabelRow.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6688C072EC84713099209953 /* Pods_FloatLabelRow.framework */; }; 14 | 9A61F6DD1EBA608900CBE062 /* FloatLabelRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A61F6DC1EBA608900CBE062 /* FloatLabelRow.swift */; }; 15 | 9A61F6E51EBA664200CBE062 /* Eureka.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A61F6DF1EBA660E00CBE062 /* Eureka.framework */; }; 16 | 9A61F6E71EBA664F00CBE062 /* FloatLabelTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A61F6DA1EBA5FE900CBE062 /* FloatLabelTextField.swift */; }; 17 | 9A61F6F31EBA6B9100CBE062 /* Eureka.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9A61F6DF1EBA660E00CBE062 /* Eureka.framework */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 28F828891C494B2C00330CF4 /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 28F828741C494B2C00330CF4 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 28F8287C1C494B2C00330CF4; 26 | remoteInfo = FloatLabelRow; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | 287D0A6D1C4B73BD004566D6 /* FloatLabelRowTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = FloatLabelRowTests.swift; path = Tests/FloatLabelRowTests.swift; sourceTree = SOURCE_ROOT; }; 32 | 28F8287D1C494B2C00330CF4 /* FloatLabelRow.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FloatLabelRow.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 33 | 28F828801C494B2C00330CF4 /* FloatLabelRow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FloatLabelRow.h; sourceTree = ""; }; 34 | 28F828821C494B2C00330CF4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 35 | 28F828871C494B2C00330CF4 /* FloatLabelRowTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FloatLabelRowTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 36 | 28F8288E1C494B2C00330CF4 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; name = Info.plist; path = Tests/Info.plist; sourceTree = ""; }; 37 | 28F8289B1C494BF100330CF4 /* Playground.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; name = Playground.playground; path = Example/Playground.playground; sourceTree = ""; }; 38 | 62D452821D7ACA8A74B470D9 /* Pods-FloatLabelRow.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FloatLabelRow.release.xcconfig"; path = "Pods/Target Support Files/Pods-FloatLabelRow/Pods-FloatLabelRow.release.xcconfig"; sourceTree = ""; }; 39 | 6688C072EC84713099209953 /* Pods_FloatLabelRow.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_FloatLabelRow.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 40 | 750A4210146D258B96749891 /* Pods-FloatLabelRow.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FloatLabelRow.debug.xcconfig"; path = "Pods/Target Support Files/Pods-FloatLabelRow/Pods-FloatLabelRow.debug.xcconfig"; sourceTree = ""; }; 41 | 9A61F6DA1EBA5FE900CBE062 /* FloatLabelTextField.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloatLabelTextField.swift; sourceTree = ""; }; 42 | 9A61F6DC1EBA608900CBE062 /* FloatLabelRow.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FloatLabelRow.swift; sourceTree = ""; }; 43 | 9A61F6DF1EBA660E00CBE062 /* Eureka.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Eureka.framework; path = Carthage/Build/iOS/Eureka.framework; sourceTree = ""; }; 44 | /* End PBXFileReference section */ 45 | 46 | /* Begin PBXFrameworksBuildPhase section */ 47 | 28F828791C494B2C00330CF4 /* Frameworks */ = { 48 | isa = PBXFrameworksBuildPhase; 49 | buildActionMask = 2147483647; 50 | files = ( 51 | 9A61F6E51EBA664200CBE062 /* Eureka.framework in Frameworks */, 52 | 62DCF8437C71FCA6B2F66852 /* Pods_FloatLabelRow.framework in Frameworks */, 53 | ); 54 | runOnlyForDeploymentPostprocessing = 0; 55 | }; 56 | 28F828841C494B2C00330CF4 /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | 28F828881C494B2C00330CF4 /* FloatLabelRow.framework in Frameworks */, 61 | 9A61F6F31EBA6B9100CBE062 /* Eureka.framework in Frameworks */, 62 | ); 63 | runOnlyForDeploymentPostprocessing = 0; 64 | }; 65 | /* End PBXFrameworksBuildPhase section */ 66 | 67 | /* Begin PBXGroup section */ 68 | 28F828731C494B2C00330CF4 = { 69 | isa = PBXGroup; 70 | children = ( 71 | 28F8289B1C494BF100330CF4 /* Playground.playground */, 72 | 28F828971C494B4200330CF4 /* Sources */, 73 | 28F8288B1C494B2C00330CF4 /* Tests */, 74 | 28F8287E1C494B2C00330CF4 /* Products */, 75 | 9A61F6ED1EBA6A1400CBE062 /* Dependencies */, 76 | D6207D26D065CCAEBCB39BC4 /* Pods */, 77 | CCC0A959E7836A520225E1EB /* Frameworks */, 78 | ); 79 | sourceTree = ""; 80 | }; 81 | 28F8287E1C494B2C00330CF4 /* Products */ = { 82 | isa = PBXGroup; 83 | children = ( 84 | 28F8287D1C494B2C00330CF4 /* FloatLabelRow.framework */, 85 | 28F828871C494B2C00330CF4 /* FloatLabelRowTests.xctest */, 86 | ); 87 | name = Products; 88 | sourceTree = ""; 89 | }; 90 | 28F8288B1C494B2C00330CF4 /* Tests */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | 28F8288E1C494B2C00330CF4 /* Info.plist */, 94 | 287D0A6D1C4B73BD004566D6 /* FloatLabelRowTests.swift */, 95 | ); 96 | name = Tests; 97 | path = FloatLabelRowTests; 98 | sourceTree = ""; 99 | }; 100 | 28F828971C494B4200330CF4 /* Sources */ = { 101 | isa = PBXGroup; 102 | children = ( 103 | 28F828801C494B2C00330CF4 /* FloatLabelRow.h */, 104 | 28F828821C494B2C00330CF4 /* Info.plist */, 105 | 9A61F6DA1EBA5FE900CBE062 /* FloatLabelTextField.swift */, 106 | 9A61F6DC1EBA608900CBE062 /* FloatLabelRow.swift */, 107 | ); 108 | path = Sources; 109 | sourceTree = ""; 110 | }; 111 | 9A61F6ED1EBA6A1400CBE062 /* Dependencies */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 9A61F6DF1EBA660E00CBE062 /* Eureka.framework */, 115 | ); 116 | name = Dependencies; 117 | sourceTree = ""; 118 | }; 119 | CCC0A959E7836A520225E1EB /* Frameworks */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 6688C072EC84713099209953 /* Pods_FloatLabelRow.framework */, 123 | ); 124 | name = Frameworks; 125 | sourceTree = ""; 126 | }; 127 | D6207D26D065CCAEBCB39BC4 /* Pods */ = { 128 | isa = PBXGroup; 129 | children = ( 130 | 750A4210146D258B96749891 /* Pods-FloatLabelRow.debug.xcconfig */, 131 | 62D452821D7ACA8A74B470D9 /* Pods-FloatLabelRow.release.xcconfig */, 132 | ); 133 | name = Pods; 134 | sourceTree = ""; 135 | }; 136 | /* End PBXGroup section */ 137 | 138 | /* Begin PBXHeadersBuildPhase section */ 139 | 28F8287A1C494B2C00330CF4 /* Headers */ = { 140 | isa = PBXHeadersBuildPhase; 141 | buildActionMask = 2147483647; 142 | files = ( 143 | 28F828811C494B2C00330CF4 /* FloatLabelRow.h in Headers */, 144 | ); 145 | runOnlyForDeploymentPostprocessing = 0; 146 | }; 147 | /* End PBXHeadersBuildPhase section */ 148 | 149 | /* Begin PBXNativeTarget section */ 150 | 28F8287C1C494B2C00330CF4 /* FloatLabelRow */ = { 151 | isa = PBXNativeTarget; 152 | buildConfigurationList = 28F828911C494B2C00330CF4 /* Build configuration list for PBXNativeTarget "FloatLabelRow" */; 153 | buildPhases = ( 154 | 01E0DCFFD2B2C56CA105240D /* [CP] Check Pods Manifest.lock */, 155 | 28F828781C494B2C00330CF4 /* Sources */, 156 | 28F828791C494B2C00330CF4 /* Frameworks */, 157 | 28F8287A1C494B2C00330CF4 /* Headers */, 158 | 28F8287B1C494B2C00330CF4 /* Resources */, 159 | ); 160 | buildRules = ( 161 | ); 162 | dependencies = ( 163 | ); 164 | name = FloatLabelRow; 165 | productName = FloatLabelRow; 166 | productReference = 28F8287D1C494B2C00330CF4 /* FloatLabelRow.framework */; 167 | productType = "com.apple.product-type.framework"; 168 | }; 169 | 28F828861C494B2C00330CF4 /* FloatLabelRowTests */ = { 170 | isa = PBXNativeTarget; 171 | buildConfigurationList = 28F828941C494B2C00330CF4 /* Build configuration list for PBXNativeTarget "FloatLabelRowTests" */; 172 | buildPhases = ( 173 | 28F828831C494B2C00330CF4 /* Sources */, 174 | 28F828841C494B2C00330CF4 /* Frameworks */, 175 | 28F828851C494B2C00330CF4 /* Resources */, 176 | ); 177 | buildRules = ( 178 | ); 179 | dependencies = ( 180 | 28F8288A1C494B2C00330CF4 /* PBXTargetDependency */, 181 | ); 182 | name = FloatLabelRowTests; 183 | productName = FloatLabelRowTests; 184 | productReference = 28F828871C494B2C00330CF4 /* FloatLabelRowTests.xctest */; 185 | productType = "com.apple.product-type.bundle.unit-test"; 186 | }; 187 | /* End PBXNativeTarget section */ 188 | 189 | /* Begin PBXProject section */ 190 | 28F828741C494B2C00330CF4 /* Project object */ = { 191 | isa = PBXProject; 192 | attributes = { 193 | LastSwiftUpdateCheck = 0720; 194 | LastUpgradeCheck = 1020; 195 | TargetAttributes = { 196 | 28F8287C1C494B2C00330CF4 = { 197 | CreatedOnToolsVersion = 7.2; 198 | LastSwiftMigration = 0800; 199 | }; 200 | 28F828861C494B2C00330CF4 = { 201 | CreatedOnToolsVersion = 7.2; 202 | LastSwiftMigration = 0800; 203 | }; 204 | }; 205 | }; 206 | buildConfigurationList = 28F828771C494B2C00330CF4 /* Build configuration list for PBXProject "FloatLabelRow" */; 207 | compatibilityVersion = "Xcode 3.2"; 208 | developmentRegion = English; 209 | hasScannedForEncodings = 0; 210 | knownRegions = ( 211 | English, 212 | en, 213 | ); 214 | mainGroup = 28F828731C494B2C00330CF4; 215 | productRefGroup = 28F8287E1C494B2C00330CF4 /* Products */; 216 | projectDirPath = ""; 217 | projectRoot = ""; 218 | targets = ( 219 | 28F8287C1C494B2C00330CF4 /* FloatLabelRow */, 220 | 28F828861C494B2C00330CF4 /* FloatLabelRowTests */, 221 | ); 222 | }; 223 | /* End PBXProject section */ 224 | 225 | /* Begin PBXResourcesBuildPhase section */ 226 | 28F8287B1C494B2C00330CF4 /* Resources */ = { 227 | isa = PBXResourcesBuildPhase; 228 | buildActionMask = 2147483647; 229 | files = ( 230 | ); 231 | runOnlyForDeploymentPostprocessing = 0; 232 | }; 233 | 28F828851C494B2C00330CF4 /* Resources */ = { 234 | isa = PBXResourcesBuildPhase; 235 | buildActionMask = 2147483647; 236 | files = ( 237 | ); 238 | runOnlyForDeploymentPostprocessing = 0; 239 | }; 240 | /* End PBXResourcesBuildPhase section */ 241 | 242 | /* Begin PBXShellScriptBuildPhase section */ 243 | 01E0DCFFD2B2C56CA105240D /* [CP] Check Pods Manifest.lock */ = { 244 | isa = PBXShellScriptBuildPhase; 245 | buildActionMask = 2147483647; 246 | files = ( 247 | ); 248 | inputFileListPaths = ( 249 | ); 250 | inputPaths = ( 251 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 252 | "${PODS_ROOT}/Manifest.lock", 253 | ); 254 | name = "[CP] Check Pods Manifest.lock"; 255 | outputFileListPaths = ( 256 | ); 257 | outputPaths = ( 258 | "$(DERIVED_FILE_DIR)/Pods-FloatLabelRow-checkManifestLockResult.txt", 259 | ); 260 | runOnlyForDeploymentPostprocessing = 0; 261 | shellPath = /bin/sh; 262 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 263 | showEnvVarsInLog = 0; 264 | }; 265 | /* End PBXShellScriptBuildPhase section */ 266 | 267 | /* Begin PBXSourcesBuildPhase section */ 268 | 28F828781C494B2C00330CF4 /* Sources */ = { 269 | isa = PBXSourcesBuildPhase; 270 | buildActionMask = 2147483647; 271 | files = ( 272 | 9A61F6E71EBA664F00CBE062 /* FloatLabelTextField.swift in Sources */, 273 | 9A61F6DD1EBA608900CBE062 /* FloatLabelRow.swift in Sources */, 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | 28F828831C494B2C00330CF4 /* Sources */ = { 278 | isa = PBXSourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | 287D0A6E1C4B73BD004566D6 /* FloatLabelRowTests.swift in Sources */, 282 | ); 283 | runOnlyForDeploymentPostprocessing = 0; 284 | }; 285 | /* End PBXSourcesBuildPhase section */ 286 | 287 | /* Begin PBXTargetDependency section */ 288 | 28F8288A1C494B2C00330CF4 /* PBXTargetDependency */ = { 289 | isa = PBXTargetDependency; 290 | target = 28F8287C1C494B2C00330CF4 /* FloatLabelRow */; 291 | targetProxy = 28F828891C494B2C00330CF4 /* PBXContainerItemProxy */; 292 | }; 293 | /* End PBXTargetDependency section */ 294 | 295 | /* Begin XCBuildConfiguration section */ 296 | 28F8288F1C494B2C00330CF4 /* Debug */ = { 297 | isa = XCBuildConfiguration; 298 | buildSettings = { 299 | ALWAYS_SEARCH_USER_PATHS = NO; 300 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 301 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 302 | CLANG_CXX_LIBRARY = "libc++"; 303 | CLANG_ENABLE_MODULES = YES; 304 | CLANG_ENABLE_OBJC_ARC = YES; 305 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 306 | CLANG_WARN_BOOL_CONVERSION = YES; 307 | CLANG_WARN_COMMA = YES; 308 | CLANG_WARN_CONSTANT_CONVERSION = YES; 309 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 310 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 311 | CLANG_WARN_EMPTY_BODY = YES; 312 | CLANG_WARN_ENUM_CONVERSION = YES; 313 | CLANG_WARN_INFINITE_RECURSION = YES; 314 | CLANG_WARN_INT_CONVERSION = YES; 315 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 316 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 317 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 318 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 319 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 320 | CLANG_WARN_STRICT_PROTOTYPES = YES; 321 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 322 | CLANG_WARN_UNREACHABLE_CODE = YES; 323 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 324 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 325 | COPY_PHASE_STRIP = NO; 326 | CURRENT_PROJECT_VERSION = 1; 327 | DEBUG_INFORMATION_FORMAT = dwarf; 328 | ENABLE_STRICT_OBJC_MSGSEND = YES; 329 | ENABLE_TESTABILITY = YES; 330 | GCC_C_LANGUAGE_STANDARD = gnu99; 331 | GCC_DYNAMIC_NO_PIC = NO; 332 | GCC_NO_COMMON_BLOCKS = YES; 333 | GCC_OPTIMIZATION_LEVEL = 0; 334 | GCC_PREPROCESSOR_DEFINITIONS = ( 335 | "DEBUG=1", 336 | "$(inherited)", 337 | ); 338 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 339 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 340 | GCC_WARN_UNDECLARED_SELECTOR = YES; 341 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 342 | GCC_WARN_UNUSED_FUNCTION = YES; 343 | GCC_WARN_UNUSED_VARIABLE = YES; 344 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 345 | MTL_ENABLE_DEBUG_INFO = YES; 346 | ONLY_ACTIVE_ARCH = YES; 347 | SDKROOT = iphoneos; 348 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 349 | TARGETED_DEVICE_FAMILY = "1,2"; 350 | VERSIONING_SYSTEM = "apple-generic"; 351 | VERSION_INFO_PREFIX = ""; 352 | }; 353 | name = Debug; 354 | }; 355 | 28F828901C494B2C00330CF4 /* Release */ = { 356 | isa = XCBuildConfiguration; 357 | buildSettings = { 358 | ALWAYS_SEARCH_USER_PATHS = NO; 359 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; 360 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 361 | CLANG_CXX_LIBRARY = "libc++"; 362 | CLANG_ENABLE_MODULES = YES; 363 | CLANG_ENABLE_OBJC_ARC = YES; 364 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 365 | CLANG_WARN_BOOL_CONVERSION = YES; 366 | CLANG_WARN_COMMA = YES; 367 | CLANG_WARN_CONSTANT_CONVERSION = YES; 368 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 369 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 370 | CLANG_WARN_EMPTY_BODY = YES; 371 | CLANG_WARN_ENUM_CONVERSION = YES; 372 | CLANG_WARN_INFINITE_RECURSION = YES; 373 | CLANG_WARN_INT_CONVERSION = YES; 374 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 375 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 376 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 378 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 379 | CLANG_WARN_STRICT_PROTOTYPES = YES; 380 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 381 | CLANG_WARN_UNREACHABLE_CODE = YES; 382 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 383 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 384 | COPY_PHASE_STRIP = NO; 385 | CURRENT_PROJECT_VERSION = 1; 386 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 387 | ENABLE_NS_ASSERTIONS = NO; 388 | ENABLE_STRICT_OBJC_MSGSEND = YES; 389 | GCC_C_LANGUAGE_STANDARD = gnu99; 390 | GCC_NO_COMMON_BLOCKS = YES; 391 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 392 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 393 | GCC_WARN_UNDECLARED_SELECTOR = YES; 394 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 395 | GCC_WARN_UNUSED_FUNCTION = YES; 396 | GCC_WARN_UNUSED_VARIABLE = YES; 397 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 398 | MTL_ENABLE_DEBUG_INFO = NO; 399 | SDKROOT = iphoneos; 400 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 401 | TARGETED_DEVICE_FAMILY = "1,2"; 402 | VALIDATE_PRODUCT = YES; 403 | VERSIONING_SYSTEM = "apple-generic"; 404 | VERSION_INFO_PREFIX = ""; 405 | }; 406 | name = Release; 407 | }; 408 | 28F828921C494B2C00330CF4 /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 750A4210146D258B96749891 /* Pods-FloatLabelRow.debug.xcconfig */; 411 | buildSettings = { 412 | APPLICATION_EXTENSION_API_ONLY = YES; 413 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 414 | DEFINES_MODULE = YES; 415 | DYLIB_COMPATIBILITY_VERSION = 1; 416 | DYLIB_CURRENT_VERSION = 1; 417 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 418 | FRAMEWORK_SEARCH_PATHS = ( 419 | "$(inherited)", 420 | "$(PROJECT_DIR)/Carthage/Build/iOS", 421 | ); 422 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; 423 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 424 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 425 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 426 | PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.FloatLabelRow; 427 | PRODUCT_NAME = "$(TARGET_NAME)"; 428 | SKIP_INSTALL = YES; 429 | SWIFT_VERSION = 5.0; 430 | }; 431 | name = Debug; 432 | }; 433 | 28F828931C494B2C00330CF4 /* Release */ = { 434 | isa = XCBuildConfiguration; 435 | baseConfigurationReference = 62D452821D7ACA8A74B470D9 /* Pods-FloatLabelRow.release.xcconfig */; 436 | buildSettings = { 437 | APPLICATION_EXTENSION_API_ONLY = YES; 438 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; 439 | DEFINES_MODULE = YES; 440 | DYLIB_COMPATIBILITY_VERSION = 1; 441 | DYLIB_CURRENT_VERSION = 1; 442 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 443 | FRAMEWORK_SEARCH_PATHS = ( 444 | "$(inherited)", 445 | "$(PROJECT_DIR)/Carthage/Build/iOS", 446 | ); 447 | INFOPLIST_FILE = "$(SRCROOT)/Sources/Info.plist"; 448 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 449 | IPHONEOS_DEPLOYMENT_TARGET = 9.3; 450 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 451 | PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.FloatLabelRow; 452 | PRODUCT_NAME = "$(TARGET_NAME)"; 453 | SKIP_INSTALL = YES; 454 | SWIFT_VERSION = 5.0; 455 | }; 456 | name = Release; 457 | }; 458 | 28F828951C494B2C00330CF4 /* Debug */ = { 459 | isa = XCBuildConfiguration; 460 | buildSettings = { 461 | CLANG_ENABLE_MODULES = YES; 462 | FRAMEWORK_SEARCH_PATHS = ( 463 | "$(inherited)", 464 | "$(PROJECT_DIR)/Carthage/Build/iOS", 465 | ); 466 | INFOPLIST_FILE = Tests/Info.plist; 467 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 468 | PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.FloatLabelRowTests; 469 | PRODUCT_NAME = "$(TARGET_NAME)"; 470 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 471 | SWIFT_VERSION = 3.0; 472 | }; 473 | name = Debug; 474 | }; 475 | 28F828961C494B2C00330CF4 /* Release */ = { 476 | isa = XCBuildConfiguration; 477 | buildSettings = { 478 | CLANG_ENABLE_MODULES = YES; 479 | FRAMEWORK_SEARCH_PATHS = ( 480 | "$(inherited)", 481 | "$(PROJECT_DIR)/Carthage/Build/iOS", 482 | ); 483 | INFOPLIST_FILE = Tests/Info.plist; 484 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 485 | PRODUCT_BUNDLE_IDENTIFIER = com.xmartlabs.FloatLabelRowTests; 486 | PRODUCT_NAME = "$(TARGET_NAME)"; 487 | SWIFT_VERSION = 3.0; 488 | }; 489 | name = Release; 490 | }; 491 | /* End XCBuildConfiguration section */ 492 | 493 | /* Begin XCConfigurationList section */ 494 | 28F828771C494B2C00330CF4 /* Build configuration list for PBXProject "FloatLabelRow" */ = { 495 | isa = XCConfigurationList; 496 | buildConfigurations = ( 497 | 28F8288F1C494B2C00330CF4 /* Debug */, 498 | 28F828901C494B2C00330CF4 /* Release */, 499 | ); 500 | defaultConfigurationIsVisible = 0; 501 | defaultConfigurationName = Release; 502 | }; 503 | 28F828911C494B2C00330CF4 /* Build configuration list for PBXNativeTarget "FloatLabelRow" */ = { 504 | isa = XCConfigurationList; 505 | buildConfigurations = ( 506 | 28F828921C494B2C00330CF4 /* Debug */, 507 | 28F828931C494B2C00330CF4 /* Release */, 508 | ); 509 | defaultConfigurationIsVisible = 0; 510 | defaultConfigurationName = Release; 511 | }; 512 | 28F828941C494B2C00330CF4 /* Build configuration list for PBXNativeTarget "FloatLabelRowTests" */ = { 513 | isa = XCConfigurationList; 514 | buildConfigurations = ( 515 | 28F828951C494B2C00330CF4 /* Debug */, 516 | 28F828961C494B2C00330CF4 /* Release */, 517 | ); 518 | defaultConfigurationIsVisible = 0; 519 | defaultConfigurationName = Release; 520 | }; 521 | /* End XCConfigurationList section */ 522 | }; 523 | rootObject = 28F828741C494B2C00330CF4 /* Project object */; 524 | } 525 | -------------------------------------------------------------------------------- /FloatLabelRow.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /FloatLabelRow.xcodeproj/xcshareddata/xcschemes/FloatLabelRow.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 53 | 54 | 64 | 65 | 71 | 72 | 73 | 74 | 75 | 76 | 82 | 83 | 89 | 90 | 91 | 92 | 94 | 95 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /FloatLabelRow.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /FloatLabelRow.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Xmartlabs SRL 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # FloatLabelRow 2 | 3 |

4 | Build status 5 | Platform iOS 6 | Swift 3 compatible 7 | Carthage compatible 8 | CocoaPods compatible 9 | License: MIT 10 |

11 | 12 | By [Xmartlabs SRL](http://KarinaFernandez.com). 13 | 14 | ## Introduction 15 | 16 | FloatLabelRow is an Eureka custom row that shows a float label. 17 | 18 |

19 | FloatLabelRow example 20 |

21 | 22 | ## Usage 23 | 24 | ```swift 25 | import Eureka 26 | import FloatLabelRow 27 | 28 | 29 | class ExampleViewController: FormViewController { 30 | 31 | override func viewDidLoad() { 32 | super.viewDidLoad() 33 | 34 | form +++ Section() 35 | <<< TextFloatLabelRow() { 36 | $0.title = "Text Field" 37 | $0.value = "Placeholder" 38 | } 39 | <<< IntFloatLabelRow() { 40 | $0.title = "Int field" 41 | $0.value = 2017 42 | } 43 | <<< PasswordFloatLabelRow() { 44 | $0.title = "Password field" 45 | $0.value = "password" 46 | } 47 | +++ Section() 48 | <<< DecimalFloatLabelRow() { 49 | $0.title = "Scientific style" 50 | $0.value = 2017 51 | let formatter = NumberFormatter() 52 | formatter.locale = .current 53 | formatter.numberStyle = .scientific 54 | $0.formatter = formatter 55 | } 56 | <<< IntFloatLabelRow() { 57 | $0.title = "Spell out style" 58 | $0.value = 2017 59 | let formatter = NumberFormatter() 60 | formatter.locale = .current 61 | formatter.numberStyle = .spellOut 62 | $0.formatter = formatter 63 | } 64 | } 65 | 66 | } 67 | ``` 68 | 69 | ## Requirements 70 | 71 | * iOS 9.0+ 72 | * Xcode 8.0+ 73 | * Eureka 3.0+ 74 | 75 | ## Getting involved 76 | 77 | * If you **want to contribute** please feel free to **submit pull requests**. 78 | * If you **have a feature request** please **open an issue**. 79 | * If you **found a bug** or **need help** please **check older issues, [FAQ](#faq) and threads on [StackOverflow](http://stackoverflow.com/questions/tagged/FloatLabelRow) (Tag 'FloatLabelRow') before submitting an issue**. 80 | 81 | Before contribute check the [CONTRIBUTING](https://github.com/EurekaCommunity/FloatLabelRow/blob/1.0.0/CONTRIBUTING.md) file for more info. 82 | 83 | If you use **FloatLabelRow** in your app we would love to hear about it! Drop us a line on [twitter](https://twitter.com/xmartlabs). 84 | 85 | ## Examples 86 | 87 | Follow these 3 steps to run Example project: Clone FloatLabelRow repository, open FloatLabelRow workspace and run the *Example* project. 88 | 89 | You can also experiment and learn with the *FloatLabelRow Playground* which is contained in *FloatLabelRow.workspace*. 90 | 91 | ## Installation 92 | 93 | #### CocoaPods 94 | 95 | [CocoaPods](https://cocoapods.org/) is a dependency manager for Cocoa projects. 96 | 97 | To install FloatLabelRow, simply add the following line to your Podfile: 98 | 99 | ```ruby 100 | pod 'FloatLabelRow', '~> 1.0' 101 | ``` 102 | 103 | #### Carthage 104 | 105 | [Carthage](https://github.com/Carthage/Carthage) is a simple, decentralized dependency manager for Cocoa. 106 | 107 | To install FloatLabelRow, simply add the following line to your Cartfile: 108 | 109 | ```ogdl 110 | github "EurekaCommunity/FloatLabelRow" ~> 1.0 111 | ``` 112 | 113 | ## Author 114 | 115 | * [Xmartlabs SRL](https://github.com/xmartlabs) ([@xmartlabs](https://twitter.com/xmartlabs)) 116 | 117 | ## FAQ 118 | 119 | No content yet. 120 | 121 | # Change Log 122 | 123 | This can be found in the [CHANGELOG.md](CHANGELOG.md) file. 124 | -------------------------------------------------------------------------------- /Sources/DecimalFormatter.swift: -------------------------------------------------------------------------------- 1 | // DecimalFormatter.swift 2 | // Eureka ( https://github.com/xmartlabs/Eureka ) 3 | // 4 | // Copyright (c) 2016 Xmartlabs SRL ( http://xmartlabs.com ) 5 | // 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import Eureka 26 | import Foundation 27 | 28 | open class DecimalFormatter: NumberFormatter, FormatterProtocol { 29 | 30 | public override init() { 31 | super.init() 32 | locale = Locale.current 33 | numberStyle = .decimal 34 | minimumFractionDigits = 2 35 | maximumFractionDigits = 2 36 | } 37 | 38 | required public init?(coder aDecoder: NSCoder) { 39 | fatalError("init(coder:) has not been implemented") 40 | } 41 | 42 | override open func getObjectValue(_ obj: AutoreleasingUnsafeMutablePointer?, for string: String, range rangep: UnsafeMutablePointer?) throws { 43 | guard obj != nil else { return } 44 | let str = string.components(separatedBy: CharacterSet.decimalDigits.inverted).joined(separator: "") 45 | obj?.pointee = NSNumber(value: (Double(str) ?? 0.0)/Double(pow(10.0, Double(minimumFractionDigits)))) 46 | } 47 | 48 | open func getNewPosition(forPosition position: UITextPosition, inTextInput textInput: UITextInput, oldValue: String?, newValue: String?) -> UITextPosition { 49 | return textInput.position(from: position, offset:((newValue?.count ?? 0) - (oldValue?.count ?? 0))) ?? position 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /Sources/FloatLabelRow.h: -------------------------------------------------------------------------------- 1 | // 2 | // FloatLabelRow.h 3 | // FloatLabelRow 4 | // 5 | // Copyright © 2016 Xmartlabs SRL. All rights reserved. 6 | // 7 | 8 | #import 9 | 10 | //! Project version number for FloatLabelRow. 11 | FOUNDATION_EXPORT double FloatLabelRowVersionNumber; 12 | 13 | //! Project version string for FloatLabelRow. 14 | FOUNDATION_EXPORT const unsigned char FloatLabelRowVersionString[]; 15 | 16 | // In this header, you should import all the public headers of your framework using statements like #import 17 | 18 | 19 | -------------------------------------------------------------------------------- /Sources/FloatLabelRow.swift: -------------------------------------------------------------------------------- 1 | // FloatLabelRow.swift 2 | // Eureka ( https://github.com/xmartlabs/Eureka ) 3 | // 4 | // Copyright (c) 2016 Xmartlabs SRL ( http://xmartlabs.com ) 5 | // 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | 26 | import Foundation 27 | import UIKit 28 | import MapKit 29 | import Eureka 30 | 31 | //MARK: FloatLabelCell 32 | open class _FloatLabelCell: Cell, UITextFieldDelegate, TextFieldCell where T: Equatable, T: InputTypeInitiable { 33 | 34 | public var textField: UITextField! { return floatLabelTextField } 35 | 36 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 37 | super.init(style: style, reuseIdentifier: reuseIdentifier) 38 | } 39 | 40 | required public init?(coder aDecoder: NSCoder) { 41 | fatalError("init(coder:) has not been implemented") 42 | } 43 | 44 | lazy public var floatLabelTextField: FloatLabelTextField = { [unowned self] in 45 | let floatTextField = FloatLabelTextField() 46 | floatTextField.translatesAutoresizingMaskIntoConstraints = false 47 | floatTextField.font = .preferredFont(forTextStyle: .body) 48 | floatTextField.titleFont = .boldSystemFont(ofSize: 11.0) 49 | floatTextField.clearButtonMode = .whileEditing 50 | return floatTextField 51 | }() 52 | 53 | 54 | open override func setup() { 55 | super.setup() 56 | height = { 55 } 57 | selectionStyle = .none 58 | contentView.addSubview(floatLabelTextField) 59 | floatLabelTextField.delegate = self 60 | floatLabelTextField.addTarget(self, action: #selector(_FloatLabelCell.textFieldDidChange(_:)), for: .editingChanged) 61 | contentView.addConstraints(layoutConstraints()) 62 | } 63 | 64 | open override func update() { 65 | super.update() 66 | 67 | textLabel?.text = nil 68 | detailTextLabel?.text = nil 69 | floatLabelTextField.attributedPlaceholder = NSAttributedString(string: row.title ?? "", attributes: [NSAttributedString.Key.foregroundColor: UIColor.lightGray]) 70 | floatLabelTextField.text = row.displayValueFor?(row.value) 71 | floatLabelTextField.isEnabled = !row.isDisabled 72 | floatLabelTextField.titleTextColor = .lightGray 73 | floatLabelTextField.alpha = row.isDisabled ? 0.6 : 1 74 | } 75 | 76 | open override func cellCanBecomeFirstResponder() -> Bool { 77 | return !row.isDisabled && floatLabelTextField.canBecomeFirstResponder 78 | } 79 | 80 | open override func cellBecomeFirstResponder(withDirection direction: Direction) -> Bool { 81 | return floatLabelTextField.becomeFirstResponder() 82 | } 83 | 84 | open override func cellResignFirstResponder() -> Bool { 85 | return floatLabelTextField.resignFirstResponder() 86 | } 87 | 88 | private func layoutConstraints() -> [NSLayoutConstraint] { 89 | let views = ["floatLabeledTextField": floatLabelTextField] 90 | let metrics = ["vMargin":8.0] 91 | return NSLayoutConstraint.constraints(withVisualFormat: "H:|-[floatLabeledTextField]-|", options: .alignAllLastBaseline, metrics: metrics, views: views) + NSLayoutConstraint.constraints(withVisualFormat: "V:|-(vMargin)-[floatLabeledTextField]-(vMargin)-|", options: .alignAllLastBaseline, metrics: metrics, views: views) 92 | } 93 | 94 | @objc open func textFieldDidChange(_ textField: UITextField) { 95 | guard let textValue = textField.text else { 96 | row.value = nil 97 | return 98 | } 99 | guard let fieldRow = row as? FormatterConformance, let formatter = fieldRow.formatter else { 100 | row.value = textValue.isEmpty ? nil : (T.init(string: textValue) ?? row.value) 101 | return 102 | } 103 | if fieldRow.useFormatterDuringInput { 104 | let value: AutoreleasingUnsafeMutablePointer = AutoreleasingUnsafeMutablePointer.init(UnsafeMutablePointer.allocate(capacity: 1)) 105 | let errorDesc: AutoreleasingUnsafeMutablePointer? = nil 106 | if formatter.getObjectValue(value, for: textValue, errorDescription: errorDesc) { 107 | row.value = value.pointee as? T 108 | guard var selStartPos = textField.selectedTextRange?.start else { return } 109 | let oldVal = textField.text 110 | textField.text = row.displayValueFor?(row.value) 111 | selStartPos = (formatter as? FormatterProtocol)?.getNewPosition(forPosition: selStartPos, inTextInput: textField, oldValue: oldVal, newValue: textField.text) ?? selStartPos 112 | textField.selectedTextRange = textField.textRange(from: selStartPos, to: selStartPos) 113 | return 114 | } 115 | } else { 116 | let value: AutoreleasingUnsafeMutablePointer = AutoreleasingUnsafeMutablePointer.init(UnsafeMutablePointer.allocate(capacity: 1)) 117 | let errorDesc: AutoreleasingUnsafeMutablePointer? = nil 118 | if formatter.getObjectValue(value, for: textValue, errorDescription: errorDesc) { 119 | row.value = value.pointee as? T 120 | } else { 121 | row.value = textValue.isEmpty ? nil : (T.init(string: textValue) ?? row.value) 122 | } 123 | } 124 | } 125 | 126 | 127 | //Mark: Helpers 128 | private func displayValue(useFormatter: Bool) -> String? { 129 | guard let v = row.value else { return nil } 130 | if let formatter = (row as? FormatterConformance)?.formatter, useFormatter { 131 | return textField?.isFirstResponder == true ? formatter.editingString(for: v) : formatter.string(for: v) 132 | } 133 | return row.displayValueFor?(v) ?? String(describing: v) 134 | } 135 | 136 | //MARK: TextFieldDelegate 137 | public func textFieldDidBeginEditing(_ textField: UITextField) { 138 | formViewController()?.beginEditing(of: self) 139 | if let fieldRowConformance = row as? FormatterConformance, let _ = fieldRowConformance.formatter, fieldRowConformance.useFormatterOnDidBeginEditing ?? fieldRowConformance.useFormatterDuringInput { 140 | textField.text = displayValue(useFormatter: true) 141 | } else { 142 | textField.text = displayValue(useFormatter: false) 143 | } 144 | } 145 | 146 | public func textFieldDidEndEditing(_ textField: UITextField) { 147 | formViewController()?.endEditing(of: self) 148 | formViewController()?.textInputDidEndEditing(textField, cell: self) 149 | textFieldDidChange(textField) 150 | textField.text = displayValue(useFormatter: (row as? FormatterConformance)?.formatter != nil) 151 | } 152 | 153 | public func textFieldShouldReturn(_ textField: UITextField) -> Bool { 154 | return formViewController()?.textInputShouldReturn(textField, cell: self) ?? true 155 | } 156 | 157 | public func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { 158 | return formViewController()?.textInput(textField, shouldChangeCharactersInRange:range, replacementString:string, cell: self) ?? true 159 | } 160 | 161 | public func textFieldShouldBeginEditing(_ textField: UITextField) -> Bool { 162 | return formViewController()?.textInputShouldBeginEditing(textField, cell: self) ?? true 163 | } 164 | 165 | public func textFieldShouldClear(_ textField: UITextField) -> Bool { 166 | return formViewController()?.textInputShouldClear(textField, cell: self) ?? true 167 | } 168 | 169 | public func textFieldShouldEndEditing(_ textField: UITextField) -> Bool { 170 | return formViewController()?.textInputShouldEndEditing(textField, cell: self) ?? true 171 | } 172 | 173 | } 174 | 175 | 176 | public class TextFloatLabelCell : _FloatLabelCell, CellType { 177 | 178 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 179 | super.init(style: style, reuseIdentifier: reuseIdentifier) 180 | } 181 | 182 | required public init?(coder aDecoder: NSCoder) { 183 | fatalError("init(coder:) has not been implemented") 184 | } 185 | 186 | public override func setup() { 187 | super.setup() 188 | textField?.autocorrectionType = .default 189 | textField?.autocapitalizationType = .sentences 190 | textField?.keyboardType = .default 191 | } 192 | 193 | } 194 | 195 | public class IntFloatLabelCell : _FloatLabelCell, CellType { 196 | 197 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 198 | super.init(style: style, reuseIdentifier: reuseIdentifier) 199 | } 200 | 201 | required public init?(coder aDecoder: NSCoder) { 202 | fatalError("init(coder:) has not been implemented") 203 | } 204 | 205 | public override func setup() { 206 | super.setup() 207 | textField?.autocorrectionType = .default 208 | textField?.autocapitalizationType = .none 209 | textField?.keyboardType = .numberPad 210 | } 211 | 212 | } 213 | 214 | public class DecimalFloatLabelCell : _FloatLabelCell, CellType { 215 | 216 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 217 | super.init(style: style, reuseIdentifier: reuseIdentifier) 218 | } 219 | 220 | required public init?(coder aDecoder: NSCoder) { 221 | fatalError("init(coder:) has not been implemented") 222 | } 223 | 224 | public override func setup() { 225 | super.setup() 226 | textField?.keyboardType = .decimalPad 227 | textField.autocorrectionType = .no 228 | } 229 | 230 | } 231 | 232 | 233 | public class URLFloatLabelCell : _FloatLabelCell, CellType { 234 | 235 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 236 | super.init(style: style, reuseIdentifier: reuseIdentifier) 237 | } 238 | 239 | required public init?(coder aDecoder: NSCoder) { 240 | fatalError("init(coder:) has not been implemented") 241 | } 242 | 243 | public override func setup() { 244 | super.setup() 245 | textField?.keyboardType = .URL 246 | } 247 | 248 | } 249 | 250 | public class TwitterFloatLabelCell : _FloatLabelCell, CellType { 251 | 252 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 253 | super.init(style: style, reuseIdentifier: reuseIdentifier) 254 | } 255 | 256 | required public init?(coder aDecoder: NSCoder) { 257 | fatalError("init(coder:) has not been implemented") 258 | } 259 | 260 | public override func setup() { 261 | super.setup() 262 | textField?.autocorrectionType = .no 263 | textField?.autocapitalizationType = .none 264 | textField?.keyboardType = .twitter 265 | } 266 | 267 | } 268 | 269 | public class AccountFloatLabelCell : _FloatLabelCell, CellType { 270 | 271 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 272 | super.init(style: style, reuseIdentifier: reuseIdentifier) 273 | } 274 | 275 | required public init?(coder aDecoder: NSCoder) { 276 | fatalError("init(coder:) has not been implemented") 277 | } 278 | 279 | public override func setup() { 280 | super.setup() 281 | textField?.autocorrectionType = .no 282 | textField?.autocapitalizationType = .none 283 | textField?.keyboardType = .asciiCapable 284 | } 285 | 286 | } 287 | 288 | public class PasswordFloatLabelCell : _FloatLabelCell, CellType { 289 | 290 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 291 | super.init(style: style, reuseIdentifier: reuseIdentifier) 292 | } 293 | 294 | required public init?(coder aDecoder: NSCoder) { 295 | fatalError("init(coder:) has not been implemented") 296 | } 297 | 298 | public override func setup() { 299 | super.setup() 300 | textField?.autocorrectionType = .no 301 | textField?.autocapitalizationType = .none 302 | textField?.keyboardType = .asciiCapable 303 | textField?.isSecureTextEntry = true 304 | } 305 | 306 | } 307 | 308 | public class NameFloatLabelCell : _FloatLabelCell, CellType { 309 | 310 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 311 | super.init(style: style, reuseIdentifier: reuseIdentifier) 312 | } 313 | 314 | required public init?(coder aDecoder: NSCoder) { 315 | fatalError("init(coder:) has not been implemented") 316 | } 317 | 318 | public override func setup() { 319 | super.setup() 320 | textField.autocorrectionType = .no 321 | textField.autocapitalizationType = .words 322 | textField.keyboardType = .asciiCapable 323 | } 324 | 325 | } 326 | 327 | public class EmailFloatLabelCell : _FloatLabelCell, CellType { 328 | 329 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 330 | super.init(style: style, reuseIdentifier: reuseIdentifier) 331 | } 332 | 333 | required public init?(coder aDecoder: NSCoder) { 334 | fatalError("init(coder:) has not been implemented") 335 | } 336 | 337 | public override func setup() { 338 | super.setup() 339 | textField?.autocorrectionType = .no 340 | textField?.autocapitalizationType = .none 341 | textField?.keyboardType = .emailAddress 342 | } 343 | 344 | } 345 | 346 | public class PhoneFloatLabelCell : _FloatLabelCell, CellType { 347 | 348 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 349 | super.init(style: style, reuseIdentifier: reuseIdentifier) 350 | } 351 | 352 | required public init?(coder aDecoder: NSCoder) { 353 | fatalError("init(coder:) has not been implemented") 354 | } 355 | 356 | public override func setup() { 357 | super.setup() 358 | textField?.keyboardType = .phonePad 359 | } 360 | 361 | } 362 | 363 | public class ZipCodeFloatLabelCell: _FloatLabelCell, CellType { 364 | 365 | required public init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 366 | super.init(style: style, reuseIdentifier: reuseIdentifier) 367 | } 368 | 369 | required public init?(coder aDecoder: NSCoder) { 370 | fatalError("init(coder:) has not been implemented") 371 | } 372 | 373 | open override func update() { 374 | super.update() 375 | textField.autocorrectionType = .no 376 | textField.autocapitalizationType = .allCharacters 377 | textField.keyboardType = .numbersAndPunctuation 378 | } 379 | 380 | } 381 | 382 | // MARK: Rows with formatter 383 | open class _IntFloatRow: FloatLabelRow { 384 | 385 | public required init(tag: String?) { 386 | super.init(tag: tag) 387 | let numberFormatter = NumberFormatter() 388 | numberFormatter.locale = Locale.current 389 | numberFormatter.numberStyle = .decimal 390 | numberFormatter.minimumFractionDigits = 0 391 | formatter = numberFormatter 392 | } 393 | 394 | } 395 | 396 | open class _DecimalFloatRow: FloatLabelRow { 397 | 398 | public required init(tag: String?) { 399 | super.init(tag: tag) 400 | let numberFormatter = NumberFormatter() 401 | numberFormatter.locale = Locale.current 402 | numberFormatter.numberStyle = .decimal 403 | numberFormatter.minimumFractionDigits = 2 404 | formatter = numberFormatter 405 | } 406 | 407 | } 408 | 409 | //MARK: FloatLabelRow 410 | open class FloatLabelRow: FormatteableRow where Cell: BaseCell, Cell: TextFieldCell { 411 | 412 | public required init(tag: String?) { 413 | super.init(tag: tag) 414 | } 415 | 416 | } 417 | 418 | public final class TextFloatLabelRow: FloatLabelRow, RowType { 419 | 420 | public required init(tag: String?) { 421 | super.init(tag: tag) 422 | } 423 | 424 | } 425 | 426 | public final class IntFloatLabelRow: _IntFloatRow, RowType { 427 | 428 | public required init(tag: String?) { 429 | super.init(tag: tag) 430 | } 431 | 432 | } 433 | 434 | public final class DecimalFloatLabelRow: _DecimalFloatRow, RowType { 435 | 436 | public required init(tag: String?) { 437 | super.init(tag: tag) 438 | } 439 | 440 | } 441 | 442 | public final class URLFloatLabelRow: FloatLabelRow, RowType { 443 | 444 | public required init(tag: String?) { 445 | super.init(tag: tag) 446 | } 447 | 448 | } 449 | 450 | public final class TwitterFloatLabelRow: FloatLabelRow, RowType { 451 | 452 | public required init(tag: String?) { 453 | super.init(tag: tag) 454 | } 455 | 456 | } 457 | 458 | public final class AccountFloatLabelRow: FloatLabelRow, RowType { 459 | 460 | public required init(tag: String?) { 461 | super.init(tag: tag) 462 | } 463 | 464 | } 465 | 466 | public final class PasswordFloatLabelRow: FloatLabelRow, RowType { 467 | 468 | public required init(tag: String?) { 469 | super.init(tag: tag) 470 | } 471 | 472 | } 473 | 474 | public final class NameFloatLabelRow: FloatLabelRow, RowType { 475 | 476 | public required init(tag: String?) { 477 | super.init(tag: tag) 478 | } 479 | 480 | } 481 | 482 | public final class EmailFloatLabelRow: FloatLabelRow, RowType { 483 | 484 | public required init(tag: String?) { 485 | super.init(tag: tag) 486 | } 487 | 488 | } 489 | 490 | public final class PhoneFloatLabelRow: FloatLabelRow, RowType { 491 | 492 | public required init(tag: String?) { 493 | super.init(tag: tag) 494 | } 495 | 496 | } 497 | 498 | public final class ZipCodeFloatLabelRow: FloatLabelRow, RowType { 499 | 500 | required public init(tag: String?) { 501 | super.init(tag: tag) 502 | } 503 | 504 | } 505 | -------------------------------------------------------------------------------- /Sources/FloatLabelTextField.swift: -------------------------------------------------------------------------------- 1 | // FloatLabelRow.swift 2 | // Eureka ( https://github.com/xmartlabs/Eureka ) 3 | // 4 | // Copyright (c) 2016 Xmartlabs SRL ( http://xmartlabs.com ) 5 | // 6 | // 7 | // Permission is hereby granted, free of charge, to any person obtaining a copy 8 | // of this software and associated documentation files (the "Software"), to deal 9 | // in the Software without restriction, including without limitation the rights 10 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | // copies of the Software, and to permit persons to whom the Software is 12 | // furnished to do so, subject to the following conditions: 13 | // 14 | // The above copyright notice and this permission notice shall be included in 15 | // all copies or substantial portions of the Software. 16 | // 17 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23 | // THE SOFTWARE. 24 | 25 | import UIKit 26 | 27 | @IBDesignable public class FloatLabelTextField: UITextField { 28 | 29 | let animationDuration = 0.3 30 | var title = UILabel() 31 | 32 | // MARK:- Properties 33 | override public var accessibilityLabel:String! { 34 | get { 35 | if text?.isEmpty ?? true { 36 | return title.text 37 | } else { 38 | return text 39 | } 40 | } 41 | set { 42 | self.accessibilityLabel = newValue 43 | } 44 | } 45 | 46 | override public var placeholder:String? { 47 | didSet { 48 | title.text = placeholder 49 | title.sizeToFit() 50 | } 51 | } 52 | 53 | override public var attributedPlaceholder:NSAttributedString? { 54 | didSet { 55 | title.text = attributedPlaceholder?.string 56 | title.sizeToFit() 57 | } 58 | } 59 | 60 | public var titleFont: UIFont = .systemFont(ofSize: 12.0) { 61 | didSet { 62 | title.font = titleFont 63 | title.sizeToFit() 64 | } 65 | } 66 | 67 | @IBInspectable public var hintYPadding:CGFloat = 0.0 68 | 69 | @IBInspectable public var titleYPadding:CGFloat = 0.0 { 70 | didSet { 71 | var r = title.frame 72 | r.origin.y = titleYPadding 73 | title.frame = r 74 | } 75 | } 76 | 77 | @IBInspectable public var titleTextColor:UIColor = .gray { 78 | didSet { 79 | if !isFirstResponder { 80 | title.textColor = titleTextColor 81 | } 82 | } 83 | } 84 | 85 | @IBInspectable public var titleActiveTextColor:UIColor! { 86 | didSet { 87 | if isFirstResponder { 88 | title.textColor = titleActiveTextColor 89 | } 90 | } 91 | } 92 | 93 | // MARK:- Init 94 | required public init?(coder aDecoder:NSCoder) { 95 | super.init(coder:aDecoder) 96 | setup() 97 | } 98 | 99 | override init(frame:CGRect) { 100 | super.init(frame:frame) 101 | setup() 102 | } 103 | 104 | // MARK:- Overrides 105 | override public func layoutSubviews() { 106 | super.layoutSubviews() 107 | setTitlePositionForTextAlignment() 108 | let isResp = isFirstResponder 109 | if isResp && !(text?.isEmpty ?? true) { 110 | title.textColor = titleActiveTextColor 111 | } else { 112 | title.textColor = titleTextColor 113 | } 114 | // Should we show or hide the title label? 115 | if text?.isEmpty ?? true { 116 | // Hide 117 | hideTitle(isResp) 118 | } else { 119 | // Show 120 | showTitle(isResp) 121 | } 122 | } 123 | 124 | override public func textRect(forBounds bounds:CGRect) -> CGRect { 125 | var r = super.textRect(forBounds: bounds) 126 | if !(text?.isEmpty ?? true){ 127 | var top = ceil(title.font.lineHeight + hintYPadding) 128 | top = min(top, maxTopInset()) 129 | r = r.inset(by: UIEdgeInsets(top: top, left: 0.0, bottom: 0.0, right: 0.0)) 130 | } 131 | return r.integral 132 | } 133 | 134 | override public func editingRect(forBounds bounds:CGRect) -> CGRect { 135 | var r = super.editingRect(forBounds: bounds) 136 | if !(text?.isEmpty ?? true) { 137 | var top = ceil(title.font.lineHeight + hintYPadding) 138 | top = min(top, maxTopInset()) 139 | r = r.inset(by: UIEdgeInsets(top: top, left: 0.0, bottom: 0.0, right: 0.0)) 140 | } 141 | return r.integral 142 | } 143 | 144 | override public func clearButtonRect(forBounds bounds:CGRect) -> CGRect { 145 | var r = super.clearButtonRect(forBounds: bounds) 146 | if !(text?.isEmpty ?? true) { 147 | var top = ceil(title.font.lineHeight + hintYPadding) 148 | top = min(top, maxTopInset()) 149 | r = CGRect(x:r.origin.x, y:r.origin.y + (top * 0.5), width:r.size.width, height:r.size.height) 150 | } 151 | return r.integral 152 | } 153 | 154 | // MARK:- Private Methods 155 | private func setup() { 156 | borderStyle = UITextField.BorderStyle.none 157 | titleActiveTextColor = tintColor 158 | // Set up title label 159 | title.alpha = 0.0 160 | title.font = titleFont 161 | title.textColor = titleTextColor 162 | if let str = placeholder, !str.isEmpty { 163 | title.text = str 164 | title.sizeToFit() 165 | } 166 | self.addSubview(title) 167 | } 168 | 169 | private func maxTopInset()->CGFloat { 170 | return max(0, floor(bounds.size.height - (font?.lineHeight ?? 0) - 4.0)) 171 | } 172 | 173 | private func setTitlePositionForTextAlignment() { 174 | let r = textRect(forBounds: bounds) 175 | var x = r.origin.x 176 | if textAlignment == .center { 177 | x = r.origin.x + (r.size.width * 0.5) - title.frame.size.width 178 | } else if textAlignment == .right { 179 | x = r.origin.x + r.size.width - title.frame.size.width 180 | } 181 | title.frame = CGRect(x:x, y:title.frame.origin.y, width:title.frame.size.width, height:title.frame.size.height) 182 | } 183 | 184 | private func showTitle(_ animated:Bool) { 185 | let dur = animated ? animationDuration : 0 186 | UIView.animate(withDuration: dur, delay:0, options: UIView.AnimationOptions.beginFromCurrentState.union(.curveEaseOut), animations:{ 187 | // Animation 188 | self.title.alpha = 1.0 189 | var r = self.title.frame 190 | r.origin.y = self.titleYPadding 191 | self.title.frame = r 192 | }) 193 | } 194 | 195 | private func hideTitle(_ animated:Bool) { 196 | let dur = animated ? animationDuration : 0 197 | UIView.animate(withDuration: dur, delay:0, options: UIView.AnimationOptions.beginFromCurrentState.union(.curveEaseIn), animations:{ 198 | // Animation 199 | self.title.alpha = 0.0 200 | var r = self.title.frame 201 | r.origin.y = self.title.font.lineHeight + self.hintYPadding 202 | self.title.frame = r 203 | }) 204 | } 205 | 206 | } 207 | -------------------------------------------------------------------------------- /Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Tests/FloatLabelRowTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // FloatLabelRowTests.swift 3 | // FloatLabelRowTests 4 | // 5 | // Copyright © 2016 Xmartlabs SRL. All rights reserved. 6 | // 7 | 8 | import XCTest 9 | @testable import FloatLabelRow 10 | 11 | class FloatLabelRowTests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | // Put setup code here. This method is called before the invocation of each test method in the class. 16 | } 17 | 18 | override func tearDown() { 19 | // Put teardown code here. This method is called after the invocation of each test method in the class. 20 | super.tearDown() 21 | } 22 | 23 | func testExample() { 24 | // This is an example of a functional test case. 25 | // Use XCTAssert and related functions to verify your tests produce the correct results. 26 | } 27 | 28 | func testPerformanceExample() { 29 | // This is an example of a performance test case. 30 | self.measure { 31 | // Put the code you want to measure the time of here. 32 | } 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | --------------------------------------------------------------------------------