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
ccd546c8
Unverified
Commit
ccd546c8
authored
Sep 16, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: updated RootController API for preparation statements
parent
da9375eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
Sources/iOS/NavigationDrawerController.swift
+11
-7
Sources/iOS/RootController.swift
+5
-7
No files found.
Sources/iOS/NavigationDrawerController.swift
View file @
ccd546c8
...
...
@@ -887,22 +887,26 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
/// Prepares the contentViewController.
private
func
prepareContentViewController
()
{
contentViewController
.
view
.
backgroundColor
=
Color
.
black
prepare
ControllerWithinContainer
(
viewController
:
contentViewController
,
c
ontainer
:
view
)
prepare
(
viewController
:
contentViewController
,
withC
ontainer
:
view
)
view
.
sendSubview
(
toBack
:
contentViewController
.
view
)
}
/// A method that prepares the leftViewController.
private
func
prepareLeftViewController
()
{
if
let
v
:
View
=
leftView
{
prepareControllerWithinContainer
(
viewController
:
leftViewController
,
container
:
v
)
}
guard
let
v
=
leftView
else
{
return
}
prepare
(
viewController
:
leftViewController
,
withContainer
:
v
)
}
/// A method that prepares the rightViewController.
private
func
prepareRightViewController
()
{
if
let
v
:
View
=
rightView
{
prepareControllerWithinContainer
(
viewController
:
rightViewController
,
container
:
v
)
}
guard
let
v
=
leftView
else
{
return
}
prepare
(
viewController
:
rightViewController
,
withContainer
:
v
)
}
/// A method that prepares the leftView.
...
...
Sources/iOS/RootController.swift
View file @
ccd546c8
...
...
@@ -121,8 +121,7 @@ open class RootController: UIViewController {
to
:
viewController
,
duration
:
duration
,
options
:
options
,
animations
:
animations
,
completion
:
{
[
weak
self
]
(
result
:
Bool
)
in
animations
:
animations
)
{
[
weak
self
,
completion
=
completion
]
(
result
:
Bool
)
in
guard
let
s
=
self
else
{
return
}
...
...
@@ -134,7 +133,7 @@ open class RootController: UIViewController {
s
.
rootViewController
.
view
.
autoresizingMask
=
[
.
flexibleWidth
,
.
flexibleHeight
]
s
.
rootViewController
.
view
.
contentScaleFactor
=
Device
.
scale
completion
?(
result
)
}
)
}
}
/**
...
...
@@ -155,13 +154,12 @@ open class RootController: UIViewController {
view
.
clipsToBounds
=
true
view
.
backgroundColor
=
Color
.
white
view
.
contentScaleFactor
=
Device
.
scale
prepareRootViewController
()
}
/// A method that prepares the rootViewController.
internal
func
prepareRootViewController
()
{
prepare
ControllerWithinContainer
(
viewController
:
rootViewController
,
c
ontainer
:
view
)
prepare
(
viewController
:
rootViewController
,
withC
ontainer
:
view
)
}
/**
...
...
@@ -169,10 +167,10 @@ open class RootController: UIViewController {
the BarController within the passed in
container view.
- Parameter viewController: A UIViewController to add as a child.
- Parameter container: A UIView that is the parent of the
- Parameter
withContainer
container: A UIView that is the parent of the
passed in controller view within the view hierarchy.
*/
internal
func
prepare
ControllerWithinContainer
(
viewController
:
UIViewController
?,
container
:
UIView
)
{
internal
func
prepare
(
viewController
:
UIViewController
?,
withContainer
container
:
UIView
)
{
guard
let
v
=
viewController
else
{
return
}
...
...
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