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
399c927d
Commit
399c927d
authored
Jun 30, 2016
by
Daniel Dahan
Committed by
GitHub
Jun 30, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #457 from Sufi-Al-Hussaini/master
Resolves issue #456 (TextField misplaced placeholder (RTL))
parents
c309b843
cf2e3ca7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
Sources/iOS/TextField.swift
+11
-0
No files found.
Sources/iOS/TextField.swift
View file @
399c927d
...
...
@@ -477,6 +477,7 @@ public class TextField : UITextField {
preparePlaceholderLabel
()
prepareDetailLabel
()
prepareTargetHandlers
()
prepareTextAlignment
()
}
/// Ensures that the components are sized correctly.
...
...
@@ -628,4 +629,14 @@ public class TextField : UITextField {
addTarget
(
self
,
action
:
#selector(
handleEditingDidBegin
)
,
forControlEvents
:
.
EditingDidBegin
)
addTarget
(
self
,
action
:
#selector(
handleEditingDidEnd
)
,
forControlEvents
:
.
EditingDidEnd
)
}
/// Prepares the target handlers.
private
func
prepareTextAlignment
()
{
if
(
UIApplication
.
sharedApplication
()
.
userInterfaceLayoutDirection
==
.
RightToLeft
)
{
self
.
textAlignment
=
.
Right
}
else
{
self
.
textAlignment
=
.
Left
}
}
}
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