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
ac2d4a0f
Commit
ac2d4a0f
authored
May 26, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated TextField offset properties
parent
c1f56440
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Sources/iOS/TextField.swift
+4
-4
No files found.
Sources/iOS/TextField.swift
View file @
ac2d4a0f
...
...
@@ -229,7 +229,7 @@ public class TextField : UITextField {
}
/// Vertical distance for the detailLabel from the divider.
@IBInspectable
public
var
detailVertical
DistanceFromDivider
:
CGFloat
=
8
{
@IBInspectable
public
var
detailVertical
Offset
:
CGFloat
=
8
{
didSet
{
layoutDetailLabel
()
}
...
...
@@ -330,7 +330,7 @@ public class TextField : UITextField {
public
private(set)
var
visibilityIconButton
:
IconButton
?
/// This property adds a padding to placeholder y position animation
public
var
placeholderVertical
Animation
Offset
:
CGFloat
=
0
public
var
placeholderVerticalOffset
:
CGFloat
=
0
/**
An initializer that initializes the object with a NSCoder object.
...
...
@@ -523,7 +523,7 @@ public class TextField : UITextField {
/// Layout the detailLabel.
public
func
layoutDetailLabel
()
{
let
h
:
CGFloat
=
nil
==
detail
?
12
:
detailLabel
.
font
.
stringSize
(
detail
!
,
constrainedToWidth
:
Double
(
width
))
.
height
detailLabel
.
frame
=
CGRectMake
(
0
,
divider
.
frame
.
origin
.
y
+
detailVertical
DistanceFromDivider
,
width
,
h
)
detailLabel
.
frame
=
CGRectMake
(
0
,
divider
.
frame
.
origin
.
y
+
detailVertical
Offset
,
width
,
h
)
}
/// Layout the clearIconButton.
...
...
@@ -570,7 +570,7 @@ public class TextField : UITextField {
v
.
placeholderLabel
.
frame
.
origin
.
x
=
v
.
width
-
v
.
placeholderLabel
.
frame
.
width
default
:
break
}
v
.
placeholderLabel
.
frame
.
origin
.
y
=
-
v
.
placeholderLabel
.
frame
.
size
.
height
+
v
.
placeholderVertical
Animation
Offset
v
.
placeholderLabel
.
frame
.
origin
.
y
=
-
v
.
placeholderLabel
.
frame
.
size
.
height
+
v
.
placeholderVerticalOffset
v
.
placeholderLabel
.
textColor
=
v
.
placeholderActiveColor
}
})
{
[
weak
self
]
_
in
...
...
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