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
30004d7d
Commit
30004d7d
authored
Mar 26, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added performance updates
parent
b864a98b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
13 additions
and
6 deletions
+13
-6
Examples/Programmatic/App/App/AppDelegate.swift
+1
-1
Examples/Programmatic/App/App/Info.plist
+2
-0
Sources/BottomNavigationController.swift
+2
-5
Sources/MenuViewController.swift
+2
-0
Sources/NavigationController.swift
+2
-0
Sources/SideNavigationController.swift
+2
-0
Sources/StatusBarViewController.swift
+2
-0
No files found.
Examples/Programmatic/App/App/AppDelegate.swift
View file @
30004d7d
...
...
@@ -39,7 +39,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
func
application
(
application
:
UIApplication
,
didFinishLaunchingWithOptions
launchOptions
:
[
NSObject
:
AnyObject
]?)
->
Bool
{
let
bottomNavigationController
:
BottomNavigationController
=
BottomNavigationController
()
bottomNavigationController
.
viewControllers
=
[
App
NavigationController
(
rootViewController
:
RecipesViewController
(
)),
VideoViewController
(),
PhotoViewController
()]
bottomNavigationController
.
viewControllers
=
[
App
MenuViewController
(
mainViewController
:
AppNavigationController
(
rootViewController
:
RecipesViewController
()
)),
VideoViewController
(),
PhotoViewController
()]
bottomNavigationController
.
selectedIndex
=
0
bottomNavigationController
.
tabBar
.
tintColor
=
MaterialColor
.
lightBlue
.
base
bottomNavigationController
.
tabBar
.
backgroundColor
=
MaterialColor
.
grey
.
darken4
...
...
Examples/Programmatic/App/App/Info.plist
View file @
30004d7d
...
...
@@ -34,6 +34,8 @@
<
a
rr
a
y
>
<
string
>
UIInterfaceOrientationPortrait
<
/string
>
<
string
>
UIInterfaceOrientationPortraitUpsideDown
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeLeft
<
/string
>
<
string
>
UIInterfaceOrientationLandscapeRight
<
/string
>
<
/
a
rr
a
y
>
<
k
e
y
>
UISupportedInterfaceOrientations
~
ipad
<
/k
e
y
>
<
a
rr
a
y
>
...
...
Sources/BottomNavigationController.swift
View file @
30004d7d
...
...
@@ -100,11 +100,6 @@ public class BottomNavigationController : UITabBarController, UITabBarController
}
}
}
if
let
v
:
Array
<
UIViewController
>
=
viewControllers
{
for
controller
in
v
{
controller
.
edgesForExtendedLayout
=
.
None
}
}
}
/**
...
...
@@ -115,6 +110,7 @@ public class BottomNavigationController : UITabBarController, UITabBarController
when subclassing.
*/
public
func
prepareView
()
{
view
.
clipsToBounds
=
true
delegate
=
self
tabBar
.
depth
=
.
Depth1
tabBar
.
backgroundColor
=
MaterialColor
.
white
...
...
@@ -122,6 +118,7 @@ public class BottomNavigationController : UITabBarController, UITabBarController
tabBar
.
backgroundImage
=
UIImage
()
}
/// Handles transitions when tabBarItems are pressed.
public
func
tabBarController
(
tabBarController
:
UITabBarController
,
animationControllerForTransitionFromViewController
fromVC
:
UIViewController
,
toViewController
toVC
:
UIViewController
)
->
UIViewControllerAnimatedTransitioning
?
{
return
.
Fade
==
transitionAnimation
?
BottomNavigationFadeAnimatedTransitioning
()
:
nil
}
...
...
Sources/MenuViewController.swift
View file @
30004d7d
...
...
@@ -153,6 +153,8 @@ public class MenuViewController : UIViewController {
/// A method that generally prepares the MenuViewController.
private
func
prepareView
()
{
edgesForExtendedLayout
=
.
None
view
.
clipsToBounds
=
true
prepareMenuView
()
prepareMainViewController
()
}
...
...
Sources/NavigationController.swift
View file @
30004d7d
...
...
@@ -60,6 +60,8 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
public
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
edgesForExtendedLayout
=
.
None
view
.
clipsToBounds
=
true
// This ensures the panning gesture is available when going back between views.
if
let
v
:
UIGestureRecognizer
=
interactivePopGestureRecognizer
{
...
...
Sources/SideNavigationController.swift
View file @
30004d7d
...
...
@@ -723,6 +723,7 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
/// A method that generally prepares the SideNavigationController.
private
func
prepareView
()
{
edgesForExtendedLayout
=
.
None
prepareMainViewController
()
prepareLeftView
()
prepareRightView
()
...
...
@@ -733,6 +734,7 @@ public class SideNavigationController : UIViewController, UIGestureRecognizerDel
/// A method that prepares the mainViewController.
private
func
prepareMainViewController
()
{
mainViewController
.
view
.
clipsToBounds
=
true
prepareViewControllerWithinContainer
(
mainViewController
,
container
:
view
)
}
...
...
Sources/StatusBarViewController.swift
View file @
30004d7d
...
...
@@ -114,6 +114,8 @@ public class StatusBarViewController : UIViewController {
when subclassing.
*/
public
func
prepareView
()
{
edgesForExtendedLayout
=
.
None
view
.
clipsToBounds
=
true
prepareMainViewController
()
}
...
...
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