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
17733f51
Commit
17733f51
authored
Feb 25, 2018
by
intoxicated
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed iOS 11 navigationBar layoutMargin to zero
parent
0eb7acf7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
Sources/iOS/NavigationBar.swift
+10
-4
No files found.
Sources/iOS/NavigationBar.swift
View file @
17733f51
...
...
@@ -134,6 +134,13 @@ open class NavigationBar: UINavigationBar {
layoutShape
()
layoutShadowPath
()
//iOS 11 added left/right layout margin in subviews of UINavigationBar
//since we do not want to unsafely access private view directly
//iterate subviews to set `layoutMargin` to zero
for
view
in
subviews
{
view
.
layoutMargins
=
.
zero
}
if
let
v
=
topItem
{
layoutNavigationItem
(
item
:
v
)
}
...
...
@@ -141,7 +148,6 @@ open class NavigationBar: UINavigationBar {
if
let
v
=
backItem
{
layoutNavigationItem
(
item
:
v
)
}
layoutDivider
()
}
...
...
@@ -155,10 +161,10 @@ open class NavigationBar: UINavigationBar {
open
func
prepare
()
{
barStyle
=
.
black
isTranslucent
=
false
depthPreset
=
.
depth1
depthPreset
=
.
none
contentScaleFactor
=
Screen
.
scale
contentEdgeInsetsPreset
=
.
square1
interimSpacePreset
=
.
interimSpace3
contentEdgeInsetsPreset
=
.
none
interimSpacePreset
=
.
none
backButtonImage
=
Icon
.
cm
.
arrowBack
if
#available(iOS 11, *)
{
...
...
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