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
ab0f186c
Commit
ab0f186c
authored
Dec 18, 2015
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated README with TextField
parent
2bfceb08
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
11 deletions
+9
-11
README.md
+8
-10
Sources/TextField.swift
+1
-1
No files found.
README.md
View file @
ab0f186c
...
...
@@ -28,11 +28,11 @@ Run carthage to build the framework and drag the built MaterialKit.framework int
### Table of Contents
*
[
TextView
](
#textview
)
*
[
MaterialColor
](
#materialcolor
)
*
[
MaterialLayer
](
#materiallayer
)
*
[
MaterialView
](
#materialview
)
*
[
MaterialPulseView
](
#materialpulseview
)
*
[
TextField
](
#textfield
)
*
[
FlatButton
](
#flatbutton
)
*
[
RaisedButton
](
#raisedbutton
)
*
[
FabButton
](
#fabbutton
)
...
...
@@ -52,15 +52,6 @@ Run carthage to build the framework and drag the built MaterialKit.framework int
*
Scrolling Techniques
*
More Examples
<a
name=
"textview"
/>
### TextField
A TextField is a great option to increase UX. Below is an example.
Space on mobile devices

<a
name=
"materialcolor"
/>
### MaterialColor
...
...
@@ -125,6 +116,13 @@ materialPulseView.shadowDepth = .Depth2
view
.
addSubview
(
materialPulseView
)
```
<a
name=
"textfield"
/>
### TextField
A TextField is an excellent way to improve UX. Checkout the Examples directory for a project using this component.

<a
name=
"flatbutton"
/>
### FlatButton
...
...
Sources/TextField.swift
View file @
ab0f186c
...
...
@@ -89,6 +89,7 @@ public class TextField : UITextField {
*/
internal
func
textFieldDidBegin
(
textField
:
TextField
)
{
count
=
text
?
.
utf16
.
count
titleLabel
?
.
text
=
placeholder
titleLabel
?
.
textColor
=
0
==
count
?
titleLabelNormalColor
:
titleLabelHighlightedColor
}
...
...
@@ -152,7 +153,6 @@ public class TextField : UITextField {
v
.
hidden
=
true
v
.
alpha
=
0
}
v
.
text
=
placeholder
let
h
:
CGFloat
=
v
.
font
.
stringSize
(
v
.
text
!
,
constrainedToWidth
:
Double
(
bounds
.
width
))
.
height
v
.
frame
=
CGRectMake
(
0
,
-
h
,
bounds
.
width
,
h
)
addSubview
(
v
)
...
...
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