Skip to content

Commit 993225c

Browse files
authored
Merge pull request #2 from pogramos/1.0.1
Issue #1
2 parents 9e4483f + 5e63d1d commit 993225c

23 files changed

Lines changed: 146 additions & 542 deletions

File tree

.DS_Store

6 KB
Binary file not shown.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ playground.xcworkspace
5353
# Add this line if you want to avoid checking in source code from Carthage dependencies.
5454
# Carthage/Checkouts
5555

56-
Carthage/Build
56+
Carthage
5757

5858
# fastlane
5959
#

.swift-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
language: objective-c
2-
osx_image: xcode9.4
3-
xcode_sdk: iphonesimulator11.4
2+
osx_image: xcode10.1
3+
xcode_sdk: iphonesimulator12.1
44
xcode_project: GRSTextField.xcodeproj
55
xcode_scheme: GRSTextFieldTests
6-
xcode_destination: platform=iOS Simulator,OS=11.4,name=iPhone X
6+
xcode_destination: platform=iOS Simulator,OS=12.1,name=iPhone X
77
env:
88
global:
99
- FRAMEWORK_NAME="GRSTextField"
1010
branches:
1111
only:
1212
- master
13-
- /\d+[\.\da-zA-Z]+[^\.]/
13+
- /v\d+[\.\da-zA-Z]+[^\.]/
1414
cache:
1515
directories:
1616
- Carthage

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
@pogramos

GRSTextField.podspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "GRSTextField"
3-
s.version = "1.0"
3+
s.version = "1.0.1"
44
s.summary = "A customizable UITextField with properties for layout and mask options"
55
s.homepage = "https://github.com/pogramos/GRSTextField"
66
s.social_media_url = "http://twitter.com/pogramos"
@@ -12,4 +12,5 @@ Pod::Spec.new do |s|
1212
s.source = { :git => "https://github.com/pogramos/GRSTextField.git", :tag => s.version }
1313
s.source_files = "GRSTextField/**/*.swift"
1414
s.requires_arc = true
15+
s.swift_version = "4.0"
1516
end

GRSTextField.xcodeproj/project.pbxproj

Lines changed: 34 additions & 188 deletions
Large diffs are not rendered by default.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1010"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "E6EBEA012138929000A40C2C"
18+
BuildableName = "SampleApp.app"
19+
BlueprintName = "SampleApp"
20+
ReferencedContainer = "container:GRSTextField.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
<MacroExpansion>
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "E6EBEA012138929000A40C2C"
36+
BuildableName = "SampleApp.app"
37+
BlueprintName = "SampleApp"
38+
ReferencedContainer = "container:GRSTextField.xcodeproj">
39+
</BuildableReference>
40+
</MacroExpansion>
41+
<AdditionalOptions>
42+
</AdditionalOptions>
43+
</TestAction>
44+
<LaunchAction
45+
buildConfiguration = "Debug"
46+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
47+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
48+
launchStyle = "0"
49+
useCustomWorkingDirectory = "NO"
50+
ignoresPersistentStateOnLaunch = "NO"
51+
debugDocumentVersioning = "YES"
52+
debugServiceExtension = "internal"
53+
allowLocationSimulation = "YES">
54+
<BuildableProductRunnable
55+
runnableDebuggingMode = "0">
56+
<BuildableReference
57+
BuildableIdentifier = "primary"
58+
BlueprintIdentifier = "E6EBEA012138929000A40C2C"
59+
BuildableName = "SampleApp.app"
60+
BlueprintName = "SampleApp"
61+
ReferencedContainer = "container:GRSTextField.xcodeproj">
62+
</BuildableReference>
63+
</BuildableProductRunnable>
64+
<AdditionalOptions>
65+
</AdditionalOptions>
66+
</LaunchAction>
67+
<ProfileAction
68+
buildConfiguration = "Release"
69+
shouldUseLaunchSchemeArgsEnv = "YES"
70+
savedToolIdentifier = ""
71+
useCustomWorkingDirectory = "NO"
72+
debugDocumentVersioning = "YES">
73+
<BuildableProductRunnable
74+
runnableDebuggingMode = "0">
75+
<BuildableReference
76+
BuildableIdentifier = "primary"
77+
BlueprintIdentifier = "E6EBEA012138929000A40C2C"
78+
BuildableName = "SampleApp.app"
79+
BlueprintName = "SampleApp"
80+
ReferencedContainer = "container:GRSTextField.xcodeproj">
81+
</BuildableReference>
82+
</BuildableProductRunnable>
83+
</ProfileAction>
84+
<AnalyzeAction
85+
buildConfiguration = "Debug">
86+
</AnalyzeAction>
87+
<ArchiveAction
88+
buildConfiguration = "Release"
89+
revealArchiveInOrganizer = "YES">
90+
</ArchiveAction>
91+
</Scheme>

GRSTextField/GRSTextField.swift

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@
88

99
import UIKit
1010

11-
@objc
1211
public enum GRSTextFieldBorderType: Int {
1312
case left = 0
1413
case right
1514
case bottom
1615
case top
1716
}
1817

19-
@objc @IBDesignable
18+
@IBDesignable
2019
public class GRSTextField: UITextField {
21-
@objc
2220
public var unmasked: String? {
2321
return text?.unmask()
2422
}
@@ -45,25 +43,25 @@ public class GRSTextField: UITextField {
4543

4644
@IBInspectable public var selectedBorderColor: UIColor? = .blue
4745

48-
@objc @IBInspectable public var maskPattern: String = String.empty {
46+
@IBInspectable public var maskPattern: String = String.empty {
4947
didSet {
5048
if maskPattern != String.empty {
5149
keyboardType = .numberPad
5250
}
5351
}
5452
}
5553

56-
@objc @IBInspectable public var hintMessage: String = String.empty
54+
@IBInspectable public var hintMessage: String = String.empty
5755

58-
@objc @IBInspectable public var errorMessage: String = String.empty
56+
@IBInspectable public var errorMessage: String = String.empty
5957

60-
@objc @IBInspectable public var maxCharacters: Int = 0
58+
@IBInspectable public var maxCharacters: Int = 0
6159

62-
@objc @IBInspectable public var hasBorders: Bool = false
60+
@IBInspectable public var hasBorders: Bool = false
6361

64-
@objc @IBInspectable public var textInsets: CGPoint = .zero
62+
@IBInspectable public var textInsets: CGPoint = .zero
6563

66-
@objc var valid: Bool = true {
64+
var valid: Bool = true {
6765
didSet {
6866
updateColors()
6967
errorLabel?.isHidden = hintMessage.isEmpty && valid
@@ -189,15 +187,13 @@ public class GRSTextField: UITextField {
189187
height: rect.size.height))
190188
}
191189

192-
@objc
193190
public func applyMask() {
194191
guard let text = text else {
195192
return
196193
}
197194
self.text = change(text: text)
198195
}
199196

200-
@objc(setError:)
201197
public func setError(_ hasError: Bool) {
202198
if hasError {
203199
setError(errorMessage)
@@ -206,7 +202,6 @@ public class GRSTextField: UITextField {
206202
}
207203
}
208204

209-
@objc(setErrorWithMessage:)
210205
public func setError(_ message: String = "") {
211206
valid = message.isEmpty
212207
if !valid {

GRSTextField/Supporting Files/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.0</string>
18+
<string>1.0.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

0 commit comments

Comments
 (0)