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
55ab6425
Commit
55ab6425
authored
Aug 19, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: moved PageBarController to PageTabBarController and PageBar to TabBar
parent
d452c8b7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
39 deletions
+39
-39
Material.xcodeproj/project.pbxproj
+15
-15
Sources/iOS/PageTabBarController.swift
+20
-20
Sources/iOS/TabBar.swift
+4
-4
No files found.
Material.xcodeproj/project.pbxproj
View file @
55ab6425
This diff is collapsed.
Click to expand it.
Sources/iOS/PageBarController.swift
→
Sources/iOS/Page
Tab
BarController.swift
View file @
55ab6425
...
...
@@ -32,15 +32,15 @@ import UIKit
extension
UIViewController
{
/**
A convenience property that provides access to the PageBarController.
This is the recommended method of accessing the PageBarController
A convenience property that provides access to the Page
Tab
BarController.
This is the recommended method of accessing the Page
Tab
BarController
through child UIViewControllers.
*/
public
var
page
BarController
:
Page
BarController
?
{
public
var
page
TabBarController
:
PageTab
BarController
?
{
var
viewController
:
UIViewController
?
=
self
while
nil
!=
viewController
{
if
viewController
is
PageBarController
{
return
viewController
as?
PageBarController
if
viewController
is
Page
Tab
BarController
{
return
viewController
as?
Page
Tab
BarController
}
viewController
=
viewController
?
.
parent
}
...
...
@@ -48,18 +48,18 @@ extension UIViewController {
}
}
@objc(PageBarControllerDelegate)
public
protocol
PageBarControllerDelegate
:
MaterialDelegate
{
@objc(Page
Tab
BarControllerDelegate)
public
protocol
Page
Tab
BarControllerDelegate
:
MaterialDelegate
{
}
@objc(PageBarController)
open
class
PageBarController
:
RootController
{
/// Reference to the
Page
Bar.
open
internal(set)
var
pageBar
:
Page
Bar
!
@objc(Page
Tab
BarController)
open
class
Page
Tab
BarController
:
RootController
{
/// Reference to the
Tab
Bar.
open
internal(set)
var
tabBar
:
Tab
Bar
!
/// Delegation handler.
public
weak
var
delegate
:
PageBarControllerDelegate
?
public
weak
var
delegate
:
Page
Tab
BarControllerDelegate
?
/**
To execute in the order of the layout chain, override this
...
...
@@ -68,7 +68,7 @@ open class PageBarController: RootController {
*/
open
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
guard
let
v
=
page
Bar
else
{
guard
let
v
=
tab
Bar
else
{
return
}
...
...
@@ -94,15 +94,15 @@ open class PageBarController: RootController {
*/
open
override
func
prepareView
()
{
super
.
prepareView
()
prepare
Page
Bar
()
prepare
Tab
Bar
()
}
/// Prepares the
page
Bar.
private
func
prepare
Page
Bar
()
{
if
nil
==
page
Bar
{
pageBar
=
Page
Bar
()
page
Bar
.
zPosition
=
1000
view
.
addSubview
(
page
Bar
)
/// Prepares the
tab
Bar.
private
func
prepare
Tab
Bar
()
{
if
nil
==
tab
Bar
{
tabBar
=
Tab
Bar
()
tab
Bar
.
zPosition
=
1000
view
.
addSubview
(
tab
Bar
)
}
}
}
Sources/iOS/
Page
Bar.swift
→
Sources/iOS/
Tab
Bar.swift
View file @
55ab6425
...
...
@@ -30,18 +30,18 @@
import
UIKit
@objc(
Page
BarLineAlignment)
public
enum
Page
BarLineAlignment
:
Int
{
@objc(
Tab
BarLineAlignment)
public
enum
Tab
BarLineAlignment
:
Int
{
case
top
case
bottom
}
open
class
Page
Bar
:
View
{
open
class
Tab
Bar
:
View
{
/// A reference to the line UIView.
open
internal(set)
var
line
:
UIView
!
/// A value for the line alignment.
open
var
lineAlignment
:
Page
BarLineAlignment
=
.
bottom
{
open
var
lineAlignment
:
Tab
BarLineAlignment
=
.
bottom
{
didSet
{
layoutSubviews
()
}
...
...
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