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
d361bbb3
Commit
d361bbb3
authored
Oct 30, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue with pulse when in iOS 11 and landscape
parent
b165cae6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
34 deletions
+5
-34
Sources/iOS/Material+CALayer.swift
+5
-5
Sources/iOS/NavigationBar.swift
+0
-29
No files found.
Sources/iOS/Material+CALayer.swift
View file @
d361bbb3
...
@@ -259,12 +259,12 @@ extension CALayer {
...
@@ -259,12 +259,12 @@ extension CALayer {
return
return
}
}
if
0
==
frame
.
width
{
if
0
==
bounds
.
width
{
frame
.
size
.
width
=
frame
.
height
bounds
.
size
.
width
=
bounds
.
height
}
}
if
0
==
frame
.
height
{
if
0
==
bounds
.
height
{
frame
.
size
.
height
=
frame
.
width
bounds
.
size
.
height
=
bounds
.
width
}
}
guard
.
circle
==
shapePreset
else
{
guard
.
circle
==
shapePreset
else
{
...
@@ -272,7 +272,7 @@ extension CALayer {
...
@@ -272,7 +272,7 @@ extension CALayer {
return
return
}
}
cornerRadius
=
frame
.
size
.
width
/
2
cornerRadius
=
bounds
.
size
.
width
/
2
}
}
/// Sets the shadow path.
/// Sets the shadow path.
...
...
Sources/iOS/NavigationBar.swift
View file @
d361bbb3
...
@@ -39,9 +39,6 @@ open class NavigationBar: UINavigationBar {
...
@@ -39,9 +39,6 @@ open class NavigationBar: UINavigationBar {
/// Detail UILabel when in landscape for iOS 11.
/// Detail UILabel when in landscape for iOS 11.
fileprivate
var
toolbarToText
:
[
Toolbar
:
String
?]?
fileprivate
var
toolbarToText
:
[
Toolbar
:
String
?]?
/// PulseAnimation for different views.
fileprivate
var
viewToPulseAnimation
:
[
UIView
:
PulseAnimation
]?
open
override
var
intrinsicContentSize
:
CGSize
{
open
override
var
intrinsicContentSize
:
CGSize
{
return
CGSize
(
width
:
bounds
.
width
,
height
:
bounds
.
height
)
return
CGSize
(
width
:
bounds
.
width
,
height
:
bounds
.
height
)
}
}
...
@@ -166,7 +163,6 @@ open class NavigationBar: UINavigationBar {
...
@@ -166,7 +163,6 @@ open class NavigationBar: UINavigationBar {
if
#available(iOS 11, *)
{
if
#available(iOS 11, *)
{
toolbarToText
=
[:]
toolbarToText
=
[:]
viewToPulseAnimation
=
[:]
}
}
let
image
=
UIImage
()
let
image
=
UIImage
()
...
@@ -195,19 +191,6 @@ internal extension NavigationBar {
...
@@ -195,19 +191,6 @@ internal extension NavigationBar {
if
Application
.
shouldStatusBarBeHidden
{
if
Application
.
shouldStatusBarBeHidden
{
toolbar
.
contentEdgeInsetsPreset
=
.
none
toolbar
.
contentEdgeInsetsPreset
=
.
none
for
v
in
toolbar
.
leftViews
+
toolbar
.
rightViews
{
guard
var
b
=
v
as?
Pulseable
else
{
continue
}
guard
.
none
!=
b
.
pulseAnimation
else
{
continue
}
viewToPulseAnimation
?[
v
]
=
b
.
pulseAnimation
b
.
pulseAnimation
=
.
none
}
if
nil
!=
toolbar
.
detailLabel
.
text
{
if
nil
!=
toolbar
.
detailLabel
.
text
{
toolbarToText
?[
toolbar
]
=
toolbar
.
detailLabel
.
text
toolbarToText
?[
toolbar
]
=
toolbar
.
detailLabel
.
text
toolbar
.
detailLabel
.
text
=
nil
toolbar
.
detailLabel
.
text
=
nil
...
@@ -215,18 +198,6 @@ internal extension NavigationBar {
...
@@ -215,18 +198,6 @@ internal extension NavigationBar {
}
else
if
nil
!=
toolbarToText
?[
toolbar
]
{
}
else
if
nil
!=
toolbarToText
?[
toolbar
]
{
toolbar
.
detailLabel
.
text
=
toolbarToText
?[
toolbar
]
??
nil
toolbar
.
detailLabel
.
text
=
toolbarToText
?[
toolbar
]
??
nil
toolbarToText
?[
toolbar
]
=
nil
toolbarToText
?[
toolbar
]
=
nil
for
v
in
toolbar
.
leftViews
+
toolbar
.
rightViews
{
guard
var
b
=
v
as?
Pulseable
else
{
continue
}
guard
let
a
=
viewToPulseAnimation
?[
v
]
else
{
continue
}
b
.
pulseAnimation
=
a
}
}
}
}
}
...
...
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