Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Material
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dmitriy Stepanets
Material
Commits
84d242e3
Unverified
Commit
84d242e3
authored
Oct 17, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: completed rework for TextField
parent
55625112
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
9 deletions
+11
-9
Examples/Programmatic/TextField/TextField.xcodeproj/project.pbxproj
+2
-3
Examples/Programmatic/TextField/TextField/ViewController.swift
+2
-3
Sources/iOS/SearchBar.swift
+4
-0
Sources/iOS/TextField.swift
+3
-3
No files found.
Examples/Programmatic/TextField/TextField.xcodeproj/project.pbxproj
View file @
84d242e3
...
...
@@ -107,7 +107,6 @@
TargetAttributes
=
{
96090AE31D9CDD2E00709CA6
=
{
CreatedOnToolsVersion
=
8.0
;
DevelopmentTeam
=
9Z76XCNLGL
;
ProvisioningStyle
=
Automatic
;
};
};
...
...
@@ -263,7 +262,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
9Z76XCNLGL
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
TextField/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.TextField
;
...
...
@@ -276,7 +275,7 @@
isa
=
XCBuildConfiguration
;
buildSettings
=
{
ASSETCATALOG_COMPILER_APPICON_NAME
=
AppIcon
;
DEVELOPMENT_TEAM
=
9Z76XCNLGL
;
DEVELOPMENT_TEAM
=
""
;
INFOPLIST_FILE
=
TextField/Info.plist
;
LD_RUNPATH_SEARCH_PATHS
=
"$(inherited) @executable_path/Frameworks"
;
PRODUCT_BUNDLE_IDENTIFIER
=
io.cosmicmind.TextField
;
...
...
Examples/Programmatic/TextField/TextField/ViewController.swift
View file @
84d242e3
...
...
@@ -41,11 +41,11 @@ class ViewController: UIViewController {
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
view
.
backgroundColor
=
.
white
view
.
backgroundColor
=
Color
.
grey
.
lighten5
prepareNameField
()
prepareEmailField
()
//
preparePasswordField()
preparePasswordField
()
prepareResignResponderButton
()
}
...
...
@@ -75,7 +75,6 @@ class ViewController: UIViewController {
nameField
.
placeholder
=
"Name"
nameField
.
detail
=
"Your given name"
nameField
.
isClearIconButtonEnabled
=
true
nameField
.
clearButtonMode
=
.
whileEditing
let
leftView
=
UIImageView
()
leftView
.
image
=
Icon
.
phone
?
.
tint
(
with
:
Color
.
blue
.
base
)
...
...
Sources/iOS/SearchBar.swift
View file @
84d242e3
...
...
@@ -184,6 +184,10 @@ open class SearchBar: Bar {
/// Clears the textField text.
@objc
internal
func
handleClearButton
()
{
guard
nil
==
textField
.
delegate
?
.
textFieldShouldClear
||
true
==
textField
.
delegate
?
.
textFieldShouldClear
?(
textField
)
else
{
return
}
let
t
=
textField
.
text
delegate
?
.
searchBar
?(
searchBar
:
self
,
willClear
:
textField
,
with
:
t
)
...
...
Sources/iOS/TextField.swift
View file @
84d242e3
...
...
@@ -258,7 +258,7 @@ open class TextField: UITextField {
}
clearIconButton
=
IconButton
(
image
:
Icon
.
cm
.
clear
,
tintColor
:
placeholderNormalColor
)
clearIconButton
!.
contentEdgeInsets
=
.
zero
clearIconButton
!.
contentEdgeInsets
Preset
=
.
none
clearIconButton
!.
pulseAnimation
=
.
none
clearButtonMode
=
.
never
rightViewMode
=
.
whileEditing
...
...
@@ -304,7 +304,7 @@ open class TextField: UITextField {
}
visibilityIconButton
=
IconButton
(
image
:
Icon
.
visibility
,
tintColor
:
placeholderNormalColor
.
withAlphaComponent
(
isSecureTextEntry
?
0.38
:
0.54
))
visibilityIconButton
!.
contentEdgeInsets
=
.
zero
visibilityIconButton
!.
contentEdgeInsets
Preset
=
.
none
visibilityIconButton
!.
pulseAnimation
=
.
none
isSecureTextEntry
=
true
clearButtonMode
=
.
never
...
...
@@ -412,7 +412,7 @@ open class TextField: UITextField {
/// Handles the clearIconButton TouchUpInside event.
@objc
open
func
handleClearIconButton
()
{
guard
true
==
delegate
?
.
textFieldShouldClear
?(
self
)
else
{
guard
nil
==
delegate
?
.
textFieldShouldClear
||
true
==
delegate
?
.
textFieldShouldClear
?(
self
)
else
{
return
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment