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
034d693f
Commit
034d693f
authored
Jul 21, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed warnings and removed code signing
parent
a3146a47
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
28 additions
and
27 deletions
+28
-27
Material.xcodeproj/project.pbxproj
+1
-0
Sources/iOS/Animation.swift
+1
-1
Sources/iOS/BottomTabBar.swift
+1
-1
Sources/iOS/Button.swift
+1
-1
Sources/iOS/Capture.swift
+1
-1
Sources/iOS/Card.swift
+4
-4
Sources/iOS/Device.swift
+1
-1
Sources/iOS/ImageCard.swift
+5
-5
Sources/iOS/MaterialCollectionReusableView.swift
+1
-1
Sources/iOS/MaterialCollectionViewCell.swift
+1
-1
Sources/iOS/MaterialTableViewCell.swift
+1
-1
Sources/iOS/PulseAnimation.swift
+3
-3
Sources/iOS/PulseView.swift
+1
-1
Sources/iOS/StatusBarController.swift
+1
-1
Sources/iOS/TextView.swift
+5
-5
No files found.
Material.xcodeproj/project.pbxproj
View file @
034d693f
...
...
@@ -816,6 +816,7 @@
DevelopmentTeam
=
9Z76XCNLGL
;
DevelopmentTeamName
=
"CosmicMind Inc."
;
LastSwiftMigration
=
0800
;
ProvisioningStyle
=
Manual
;
};
963832401B88DFD80015F710
=
{
CreatedOnToolsVersion
=
6.4
;
...
...
Sources/iOS/Animation.swift
View file @
034d693f
...
...
@@ -127,7 +127,7 @@ public struct Animation {
:name: animateWithDelay
*/
public
static
func
animateWithDelay
(
delay
d
:
CFTimeInterval
,
duration
:
CFTimeInterval
,
animations
:
(()
->
Void
),
completion
:
(()
->
Void
)?
=
nil
)
{
delay
(
time
:
d
)
{
_
=
delay
(
time
:
d
)
{
animateWithDuration
(
duration
:
duration
,
animations
:
animations
,
completion
:
completion
)
}
}
...
...
Sources/iOS/BottomTabBar.swift
View file @
034d693f
...
...
@@ -150,7 +150,7 @@ public class BottomTabBar: UITabBar {
super
.
didMoveToSuperview
()
if
autoLayoutToSuperview
{
if
let
v
:
UIView
=
superview
{
v
.
layout
(
self
)
.
bottom
()
.
horizontally
()
_
=
v
.
layout
(
self
)
.
bottom
()
.
horizontally
()
}
}
}
...
...
Sources/iOS/Button.swift
View file @
034d693f
...
...
@@ -218,7 +218,7 @@ public class Button: UIButton {
public
func
pulse
(
point
:
CGPoint
?
=
nil
)
{
let
p
:
CGPoint
=
nil
==
point
?
CGPoint
(
x
:
CGFloat
(
width
/
2
),
y
:
CGFloat
(
height
/
2
))
:
point
!
Animation
.
pulseExpandAnimation
(
layer
:
layer
,
visualLayer
:
visualLayer
,
pulseColor
:
pulseColor
,
pulseOpacity
:
pulseOpacity
,
point
:
p
,
width
:
width
,
height
:
height
,
pulseLayers
:
&
pulseLayers
,
pulseAnimation
:
pulseAnimation
)
Animation
.
delay
(
time
:
0.35
)
{
[
weak
self
]
in
_
=
Animation
.
delay
(
time
:
0.35
)
{
[
weak
self
]
in
guard
let
s
=
self
else
{
return
}
...
...
Sources/iOS/Capture.swift
View file @
034d693f
...
...
@@ -559,7 +559,7 @@ public class Capture : View, UIGestureRecognizerDelegate {
}
v
.
transform
=
CATransform3DMakeScale
(
0.5
,
0.5
,
1
)
})
{
Animation
.
delay
(
time
:
0.4
)
{
[
weak
layer
]
in
_
=
Animation
.
delay
(
time
:
0.4
)
{
[
weak
layer
]
in
Animation
.
animationDisabled
{
[
weak
layer
]
in
guard
let
v
=
layer
else
{
return
...
...
Sources/iOS/Card.swift
View file @
034d693f
...
...
@@ -277,7 +277,7 @@ public class Card: PulseView {
verticalFormat
+=
"-[titleLabel]"
views
[
"titleLabel"
]
=
v
layout
(
v
)
.
horizontally
(
left
:
contentInset
.
left
+
titleLabelInset
.
left
,
right
:
contentInset
.
right
+
titleLabelInset
.
right
)
_
=
layout
(
v
)
.
horizontally
(
left
:
contentInset
.
left
+
titleLabelInset
.
left
,
right
:
contentInset
.
right
+
titleLabelInset
.
right
)
}
// detail
...
...
@@ -292,7 +292,7 @@ public class Card: PulseView {
verticalFormat
+=
"-[contentView]"
views
[
"contentView"
]
=
v
layout
(
v
)
.
horizontally
(
left
:
contentInset
.
left
+
contentViewInset
.
left
,
right
:
contentInset
.
right
+
contentViewInset
.
right
)
_
=
layout
(
v
)
.
horizontally
(
left
:
contentInset
.
left
+
contentViewInset
.
left
,
right
:
contentInset
.
right
+
contentViewInset
.
right
)
}
// leftButtons
...
...
@@ -314,7 +314,7 @@ public class Card: PulseView {
h
+=
"[
\(
k
)
]"
layout
(
b
)
.
bottom
(
contentInset
.
bottom
+
leftButtonsInset
.
bottom
)
_
=
layout
(
b
)
.
bottom
(
contentInset
.
bottom
+
leftButtonsInset
.
bottom
)
i
+=
1
}
...
...
@@ -343,7 +343,7 @@ public class Card: PulseView {
h
+=
"-(right_left)-"
}
layout
(
b
)
.
bottom
(
contentInset
.
bottom
+
rightButtonsInset
.
bottom
)
_
=
layout
(
b
)
.
bottom
(
contentInset
.
bottom
+
rightButtonsInset
.
bottom
)
i
-=
1
}
...
...
Sources/iOS/Device.swift
View file @
034d693f
...
...
@@ -45,7 +45,7 @@ public struct Device {
let
machineMirror
=
Mirror
(
reflecting
:
systemInfo
.
machine
)
let
identifier
=
machineMirror
.
children
.
reduce
(
""
)
{
(
identifier
,
element
)
in
guard
let
value
=
element
.
value
as?
Int8
where
value
!=
0
else
{
guard
let
value
=
element
.
value
as?
Int8
,
value
!=
0
else
{
return
identifier
}
return
identifier
+
String
(
UnicodeScalar
(
UInt8
(
value
)))
...
...
Sources/iOS/ImageCard.swift
View file @
034d693f
...
...
@@ -378,9 +378,9 @@ public class ImageCard: PulseView {
verticalFormat
+=
"-[titleLabel]"
views
[
"titleLabel"
]
=
v
}
else
{
layout
(
v
)
.
top
(
contentInset
.
top
+
titleLabelInset
.
top
)
_
=
layout
(
v
)
.
top
(
contentInset
.
top
+
titleLabelInset
.
top
)
}
layout
(
v
)
.
horizontally
(
left
:
contentInset
.
left
+
titleLabelInset
.
left
,
right
:
contentInset
.
right
+
titleLabelInset
.
right
)
_
=
layout
(
v
)
.
horizontally
(
left
:
contentInset
.
left
+
titleLabelInset
.
left
,
right
:
contentInset
.
right
+
titleLabelInset
.
right
)
}
// detail
...
...
@@ -395,7 +395,7 @@ public class ImageCard: PulseView {
verticalFormat
+=
"-[contentView]"
views
[
"contentView"
]
=
v
layout
(
v
)
.
horizontally
(
left
:
contentInset
.
left
+
contentViewInset
.
left
,
right
:
contentInset
.
right
+
contentViewInset
.
right
)
_
=
layout
(
v
)
.
horizontally
(
left
:
contentInset
.
left
+
contentViewInset
.
left
,
right
:
contentInset
.
right
+
contentViewInset
.
right
)
}
// leftButtons
...
...
@@ -417,7 +417,7 @@ public class ImageCard: PulseView {
h
+=
"[
\(
k
)
]"
layout
(
b
)
.
bottom
(
contentInset
.
bottom
+
leftButtonsInset
.
bottom
)
_
=
layout
(
b
)
.
bottom
(
contentInset
.
bottom
+
leftButtonsInset
.
bottom
)
i
+=
1
}
...
...
@@ -446,7 +446,7 @@ public class ImageCard: PulseView {
h
+=
"-(right_left)-"
}
layout
(
b
)
.
bottom
(
contentInset
.
bottom
+
rightButtonsInset
.
bottom
)
_
=
layout
(
b
)
.
bottom
(
contentInset
.
bottom
+
rightButtonsInset
.
bottom
)
i
-=
1
}
...
...
Sources/iOS/MaterialCollectionReusableView.swift
View file @
034d693f
...
...
@@ -307,7 +307,7 @@ public class MaterialCollectionReusableView: UICollectionReusableView {
public
func
pulse
(
point
:
CGPoint
?
=
nil
)
{
let
p
:
CGPoint
=
nil
==
point
?
CGPoint
(
x
:
CGFloat
(
width
/
2
),
y
:
CGFloat
(
height
/
2
))
:
point
!
Animation
.
pulseExpandAnimation
(
layer
:
layer
,
visualLayer
:
visualLayer
,
pulseColor
:
pulseColor
,
pulseOpacity
:
pulseOpacity
,
point
:
p
,
width
:
width
,
height
:
height
,
pulseLayers
:
&
pulseLayers
,
pulseAnimation
:
pulseAnimation
)
Animation
.
delay
(
time
:
0.35
)
{
[
weak
self
]
in
_
=
Animation
.
delay
(
time
:
0.35
)
{
[
weak
self
]
in
guard
let
s
=
self
else
{
return
}
...
...
Sources/iOS/MaterialCollectionViewCell.swift
View file @
034d693f
...
...
@@ -309,7 +309,7 @@ public class MaterialCollectionViewCell: UICollectionViewCell {
public
func
pulse
(
point
:
CGPoint
?
=
nil
)
{
let
p
:
CGPoint
=
nil
==
point
?
CGPoint
(
x
:
CGFloat
(
width
/
2
),
y
:
CGFloat
(
height
/
2
))
:
point
!
Animation
.
pulseExpandAnimation
(
layer
:
layer
,
visualLayer
:
visualLayer
,
pulseColor
:
pulseColor
,
pulseOpacity
:
pulseOpacity
,
point
:
p
,
width
:
width
,
height
:
height
,
pulseLayers
:
&
pulseLayers
,
pulseAnimation
:
pulseAnimation
)
Animation
.
delay
(
time
:
0.35
)
{
[
weak
self
]
in
_
=
Animation
.
delay
(
time
:
0.35
)
{
[
weak
self
]
in
guard
let
s
=
self
else
{
return
}
...
...
Sources/iOS/MaterialTableViewCell.swift
View file @
034d693f
...
...
@@ -166,7 +166,7 @@ public class MaterialTableViewCell: UITableViewCell {
public
func
pulse
(
point
:
CGPoint
?
=
nil
)
{
let
p
:
CGPoint
=
nil
==
point
?
CGPoint
(
x
:
CGFloat
(
width
/
2
),
y
:
CGFloat
(
height
/
2
))
:
point
!
Animation
.
pulseExpandAnimation
(
layer
:
layer
,
visualLayer
:
visualLayer
,
pulseColor
:
pulseColor
,
pulseOpacity
:
pulseOpacity
,
point
:
p
,
width
:
width
,
height
:
height
,
pulseLayers
:
&
pulseLayers
,
pulseAnimation
:
pulseAnimation
)
Animation
.
delay
(
time
:
0.35
)
{
[
weak
self
]
in
_
=
Animation
.
delay
(
time
:
0.35
)
{
[
weak
self
]
in
guard
let
s
=
self
else
{
return
}
...
...
Sources/iOS/PulseAnimation.swift
View file @
034d693f
...
...
@@ -98,7 +98,7 @@ internal extension Animation {
default
:
break
}
Animation
.
delay
(
time
:
duration
)
{
_
=
Animation
.
delay
(
time
:
duration
)
{
bLayer
.
setValue
(
true
,
forKey
:
"animated"
)
}
}
...
...
@@ -118,7 +118,7 @@ internal extension Animation {
return
}
Animation
.
delay
(
time
:
animated
?
0
:
0.15
)
{
_
=
Animation
.
delay
(
time
:
animated
?
0
:
0.15
)
{
guard
let
pLayer
:
CAShapeLayer
=
bLayer
.
sublayers
?
.
first
as?
CAShapeLayer
else
{
return
}
...
...
@@ -140,7 +140,7 @@ internal extension Animation {
default
:
break
}
Animation
.
delay
(
time
:
duration
)
{
_
=
Animation
.
delay
(
time
:
duration
)
{
pLayer
.
removeFromSuperlayer
()
bLayer
.
removeFromSuperlayer
()
}
...
...
Sources/iOS/PulseView.swift
View file @
034d693f
...
...
@@ -55,7 +55,7 @@ public class PulseView: View {
public
func
pulse
(
point
:
CGPoint
?
=
nil
)
{
let
p
:
CGPoint
=
nil
==
point
?
CGPoint
(
x
:
CGFloat
(
width
/
2
),
y
:
CGFloat
(
height
/
2
))
:
point
!
Animation
.
pulseExpandAnimation
(
layer
:
layer
,
visualLayer
:
visualLayer
,
pulseColor
:
pulseColor
,
pulseOpacity
:
pulseOpacity
,
point
:
p
,
width
:
width
,
height
:
height
,
pulseLayers
:
&
pulseLayers
,
pulseAnimation
:
pulseAnimation
)
Animation
.
delay
(
time
:
0.35
)
{
[
weak
self
]
in
_
=
Animation
.
delay
(
time
:
0.35
)
{
[
weak
self
]
in
guard
let
s
=
self
else
{
return
}
...
...
Sources/iOS/StatusBarController.swift
View file @
034d693f
...
...
@@ -81,6 +81,6 @@ public class StatusBarController : RootController {
statusBarView
=
View
()
statusBarView
.
zPosition
=
3000
statusBarView
.
backgroundColor
=
Color
.
black
.
withAlphaComponent
(
0.12
)
view
.
layout
(
statusBarView
)
.
top
(
0
)
.
horizontally
()
.
height
(
20
)
_
=
view
.
layout
(
statusBarView
)
.
top
(
0
)
.
horizontally
()
.
height
(
20
)
}
}
Sources/iOS/TextView.swift
View file @
034d693f
...
...
@@ -205,11 +205,11 @@ public class TextView: UITextView {
internal
func
reloadView
()
{
if
let
p
=
placeholderLabel
{
removeConstraints
(
constraints
)
layout
(
p
)
.
edges
(
top
:
textContainerInset
.
top
,
left
:
textContainerInset
.
left
+
textContainer
.
lineFragmentPadding
,
bottom
:
textContainerInset
.
bottom
,
right
:
textContainerInset
.
right
+
textContainer
.
lineFragmentPadding
)
_
=
layout
(
p
)
.
edges
(
top
:
textContainerInset
.
top
,
left
:
textContainerInset
.
left
+
textContainer
.
lineFragmentPadding
,
bottom
:
textContainerInset
.
bottom
,
right
:
textContainerInset
.
right
+
textContainer
.
lineFragmentPadding
)
}
}
...
...
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