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
...
@@ -32,15 +32,15 @@ import UIKit
extension
UIViewController
{
extension
UIViewController
{
/**
/**
A convenience property that provides access to the PageBarController.
A convenience property that provides access to the Page
Tab
BarController.
This is the recommended method of accessing the PageBarController
This is the recommended method of accessing the Page
Tab
BarController
through child UIViewControllers.
through child UIViewControllers.
*/
*/
public
var
page
BarController
:
Page
BarController
?
{
public
var
page
TabBarController
:
PageTab
BarController
?
{
var
viewController
:
UIViewController
?
=
self
var
viewController
:
UIViewController
?
=
self
while
nil
!=
viewController
{
while
nil
!=
viewController
{
if
viewController
is
PageBarController
{
if
viewController
is
Page
Tab
BarController
{
return
viewController
as?
PageBarController
return
viewController
as?
Page
Tab
BarController
}
}
viewController
=
viewController
?
.
parent
viewController
=
viewController
?
.
parent
}
}
...
@@ -48,18 +48,18 @@ extension UIViewController {
...
@@ -48,18 +48,18 @@ extension UIViewController {
}
}
}
}
@objc(PageBarControllerDelegate)
@objc(Page
Tab
BarControllerDelegate)
public
protocol
PageBarControllerDelegate
:
MaterialDelegate
{
public
protocol
Page
Tab
BarControllerDelegate
:
MaterialDelegate
{
}
}
@objc(PageBarController)
@objc(Page
Tab
BarController)
open
class
PageBarController
:
RootController
{
open
class
Page
Tab
BarController
:
RootController
{
/// Reference to the
Page
Bar.
/// Reference to the
Tab
Bar.
open
internal(set)
var
pageBar
:
Page
Bar
!
open
internal(set)
var
tabBar
:
Tab
Bar
!
/// Delegation handler.
/// 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
To execute in the order of the layout chain, override this
...
@@ -68,7 +68,7 @@ open class PageBarController: RootController {
...
@@ -68,7 +68,7 @@ open class PageBarController: RootController {
*/
*/
open
override
func
layoutSubviews
()
{
open
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
super
.
layoutSubviews
()
guard
let
v
=
page
Bar
else
{
guard
let
v
=
tab
Bar
else
{
return
return
}
}
...
@@ -94,15 +94,15 @@ open class PageBarController: RootController {
...
@@ -94,15 +94,15 @@ open class PageBarController: RootController {
*/
*/
open
override
func
prepareView
()
{
open
override
func
prepareView
()
{
super
.
prepareView
()
super
.
prepareView
()
prepare
Page
Bar
()
prepare
Tab
Bar
()
}
}
/// Prepares the
page
Bar.
/// Prepares the
tab
Bar.
private
func
prepare
Page
Bar
()
{
private
func
prepare
Tab
Bar
()
{
if
nil
==
page
Bar
{
if
nil
==
tab
Bar
{
pageBar
=
Page
Bar
()
tabBar
=
Tab
Bar
()
page
Bar
.
zPosition
=
1000
tab
Bar
.
zPosition
=
1000
view
.
addSubview
(
page
Bar
)
view
.
addSubview
(
tab
Bar
)
}
}
}
}
}
}
Sources/iOS/
Page
Bar.swift
→
Sources/iOS/
Tab
Bar.swift
View file @
55ab6425
...
@@ -30,18 +30,18 @@
...
@@ -30,18 +30,18 @@
import
UIKit
import
UIKit
@objc(
Page
BarLineAlignment)
@objc(
Tab
BarLineAlignment)
public
enum
Page
BarLineAlignment
:
Int
{
public
enum
Tab
BarLineAlignment
:
Int
{
case
top
case
top
case
bottom
case
bottom
}
}
open
class
Page
Bar
:
View
{
open
class
Tab
Bar
:
View
{
/// A reference to the line UIView.
/// A reference to the line UIView.
open
internal(set)
var
line
:
UIView
!
open
internal(set)
var
line
:
UIView
!
/// A value for the line alignment.
/// A value for the line alignment.
open
var
lineAlignment
:
Page
BarLineAlignment
=
.
bottom
{
open
var
lineAlignment
:
Tab
BarLineAlignment
=
.
bottom
{
didSet
{
didSet
{
layoutSubviews
()
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