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
ff3d131f
Commit
ff3d131f
authored
May 03, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial rework for SideNavigationController
parent
cebb68d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
7 deletions
+30
-7
Sources/iOS/SideNavigationController.swift
+30
-7
No files found.
Sources/iOS/SideNavigationController.swift
View file @
ff3d131f
...
@@ -958,13 +958,37 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
...
@@ -958,13 +958,37 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
}
}
}
}
// /// Shows the statusBar.
// private func showStatusBar() {
// willHideStatusBar = false
// UIView.animateWithDuration(NSTimeInterval(UINavigationControllerHideShowBarDuration),
// animations: { [weak self] in
// self?.setNeedsStatusBarAppearanceUpdate()
// MaterialDevice.statusBarHidden = false
// })
// delegate?.sideNavigationStatusBarHiddenState?(self, hidden: false)
// }
//
// /// Hides the statusBar.
// private func hideStatusBar() {
// if enableHideStatusbar {
// willHideStatusBar = true
// UIView.animateWithDuration(NSTimeInterval(UINavigationControllerHideShowBarDuration),
// animations: { [weak self] in
// self?.setNeedsStatusBarAppearanceUpdate()
// MaterialDevice.statusBarHidden = true
// })
// delegate?.sideNavigationStatusBarHiddenState?(self, hidden: true)
// }
// }
/// Shows the statusBar.
/// Shows the statusBar.
private
func
showStatusBar
()
{
private
func
showStatusBar
()
{
willHideStatusBar
=
false
willHideStatusBar
=
false
UIView
.
animateWithDuration
(
NSTimeInterval
(
UINavigationControllerHideShowBarDuration
),
UIView
.
animateWithDuration
(
NSTimeInterval
(
UINavigationControllerHideShowBarDuration
),
animations
:
{
[
weak
self
]
in
animations
:
{
[
weak
self
]
in
self
?
.
setNeedsStatusBarAppearanceUpdate
()
self
?
.
setNeedsStatusBarAppearanceUpdate
()
MaterialDevice
.
statusBarHidden
=
false
MaterialDevice
.
statusBarHidden
=
false
})
})
delegate
?
.
sideNavigationStatusBarHiddenState
?(
self
,
hidden
:
false
)
delegate
?
.
sideNavigationStatusBarHiddenState
?(
self
,
hidden
:
false
)
}
}
...
@@ -974,9 +998,9 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
...
@@ -974,9 +998,9 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
if
enableHideStatusbar
{
if
enableHideStatusbar
{
willHideStatusBar
=
true
willHideStatusBar
=
true
UIView
.
animateWithDuration
(
NSTimeInterval
(
UINavigationControllerHideShowBarDuration
),
UIView
.
animateWithDuration
(
NSTimeInterval
(
UINavigationControllerHideShowBarDuration
),
animations
:
{
[
weak
self
]
in
animations
:
{
[
weak
self
]
in
self
?
.
setNeedsStatusBarAppearanceUpdate
()
self
?
.
setNeedsStatusBarAppearanceUpdate
()
MaterialDevice
.
statusBarHidden
=
true
MaterialDevice
.
statusBarHidden
=
true
})
})
delegate
?
.
sideNavigationStatusBarHiddenState
?(
self
,
hidden
:
true
)
delegate
?
.
sideNavigationStatusBarHiddenState
?(
self
,
hidden
:
true
)
}
}
...
@@ -1052,7 +1076,6 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
...
@@ -1052,7 +1076,6 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
/// Layout subviews.
/// Layout subviews.
private
func
layoutSubviews
()
{
private
func
layoutSubviews
()
{
toggleStatusBar
()
toggleStatusBar
()
if
let
v
:
MaterialView
=
leftView
{
if
let
v
:
MaterialView
=
leftView
{
v
.
width
=
leftViewWidth
v
.
width
=
leftViewWidth
v
.
height
=
view
.
bounds
.
height
v
.
height
=
view
.
bounds
.
height
...
...
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