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
1ea919be
Commit
1ea919be
authored
Aug 08, 2018
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor boolean cleanup
parent
7f344994
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
Sources/Frameworks/Motion
+1
-1
Sources/iOS/Editor.swift
+5
-4
Sources/iOS/Material+UIImage.swift
+1
-1
Sources/iOS/TextView.swift
+1
-1
No files found.
Motion
@
1d49a501
Subproject commit
d3efdaff89c024fc977904c997574b2cd90047df
Subproject commit
1d49a5012d04f705557879f4e29770141022f8a7
Sources/iOS/Editor.swift
View file @
1ea919be
...
...
@@ -36,6 +36,7 @@ public enum EditorPlaceholderAnimation {
}
open
class
Editor
:
View
{
/// Reference to textView.
public
let
textView
=
TextView
()
/// A boolean indicating whether the textView is in edit mode.
...
...
@@ -327,7 +328,7 @@ private extension Editor {
/// Notification handler for when text editing began.
@objc
func
handleTextViewTextDidBegin
()
{
updateEditorState
(
a
nimated
:
true
)
updateEditorState
(
isA
nimated
:
true
)
}
/// Notification handler for when text changed.
...
...
@@ -339,17 +340,17 @@ private extension Editor {
/// Notification handler for when text editing ended.
@objc
func
handleTextViewTextDidEnd
()
{
updateEditorState
(
a
nimated
:
true
)
updateEditorState
(
isA
nimated
:
true
)
}
/// Updates editor.
func
updateEditorState
(
a
nimated
:
Bool
=
false
)
{
func
updateEditorState
(
isA
nimated
:
Bool
=
false
)
{
updatePlaceholderVisibility
()
updatePlaceholderLabelColor
()
updateDividerHeight
()
updateDividerColor
()
guard
a
nimated
&&
isPlaceholderAnimated
else
{
guard
isA
nimated
&&
isPlaceholderAnimated
else
{
layoutPlaceholderLabel
()
return
}
...
...
Sources/iOS/Material+UIImage.swift
View file @
1ea919be
...
...
@@ -161,7 +161,7 @@ extension UIImage {
*/
open
func
crop
(
toWidth
tw
:
CGFloat
,
toHeight
th
:
CGFloat
)
->
UIImage
?
{
let
g
:
UIImage
?
let
b
:
Bool
=
width
>
height
let
b
=
width
>
height
let
s
:
CGFloat
=
b
?
th
/
height
:
tw
/
width
let
t
:
CGSize
=
CGSize
(
width
:
tw
,
height
:
th
)
...
...
Sources/iOS/TextView.swift
View file @
1ea919be
...
...
@@ -135,7 +135,7 @@ open class TextView: UITextView {
public
let
placeholderLabel
=
UILabel
()
/// A property to enable/disable operations on the placeholderLabel
internal
var
isPlaceholderLabelEnabled
:
Bool
=
true
internal
var
isPlaceholderLabelEnabled
=
true
/// Placeholder normal text
@IBInspectable
...
...
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