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
82564ad0
Unverified
Commit
82564ad0
authored
Jan 07, 2017
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: renamed Display properties with their respective type values as prefixes to Display
parent
0d4477a7
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
21 deletions
+36
-21
Sources/iOS/Capture/CaptureController.swift
+1
-1
Sources/iOS/CollectionViewCard.swift
+4
-8
Sources/iOS/SearchBarController.swift
+5
-5
Sources/iOS/StatusBarController.swift
+20
-1
Sources/iOS/ToolbarController.swift
+6
-6
No files found.
Sources/iOS/Capture/CaptureController.swift
View file @
82564ad0
...
@@ -71,7 +71,7 @@ open class CaptureController: ToolbarController {
...
@@ -71,7 +71,7 @@ open class CaptureController: ToolbarController {
*/
*/
open
override
func
prepare
()
{
open
override
func
prepare
()
{
super
.
prepare
()
super
.
prepare
()
d
isplay
=
.
full
toolbarD
isplay
=
.
full
view
.
backgroundColor
=
.
black
view
.
backgroundColor
=
.
black
prepareStatusBar
()
prepareStatusBar
()
...
...
Sources/iOS/CollectionViewCard.swift
View file @
82564ad0
...
@@ -67,8 +67,10 @@ open class CollectionViewCard: Card {
...
@@ -67,8 +67,10 @@ open class CollectionViewCard: Card {
open
override
func
reload
()
{
open
override
func
reload
()
{
if
0
==
collectionView
.
height
{
if
0
==
collectionView
.
height
{
var
h
:
CGFloat
=
0
var
h
:
CGFloat
=
0
var
i
:
Int
=
0
for
dataSourceItem
in
dataSourceItems
{
for
dataSourceItem
in
dataSourceItems
{
h
+=
dataSourceItem
.
height
??
0
h
+=
dataSourceItem
.
height
??
(
dataSourceItems
[
i
]
.
data
as?
Card
)?
.
height
??
0
i
+=
1
}
}
collectionView
.
height
=
h
collectionView
.
height
=
h
}
}
...
@@ -94,13 +96,7 @@ extension CollectionViewCard {
...
@@ -94,13 +96,7 @@ extension CollectionViewCard {
}
}
}
}
extension
CollectionViewCard
:
CollectionViewDelegate
{
extension
CollectionViewCard
:
CollectionViewDelegate
{}
open
func
collectionView
(
_
collectionView
:
UICollectionView
,
didSelectItemAt
indexPath
:
IndexPath
)
{
// guard let card = dataSourceItemsIndexPaths[indexPath] as? Card else {
// return
// }
}
}
extension
CollectionViewCard
:
CollectionViewDataSource
{
extension
CollectionViewCard
:
CollectionViewDataSource
{
@objc
@objc
...
...
Sources/iOS/SearchBarController.swift
View file @
82564ad0
...
@@ -54,7 +54,7 @@ open class SearchBarController: StatusBarController {
...
@@ -54,7 +54,7 @@ open class SearchBarController: StatusBarController {
display the rootViewController to the full view
display the rootViewController to the full view
bounds, or up to the searchBar height.
bounds, or up to the searchBar height.
*/
*/
open
var
d
isplay
=
Display
.
partial
{
open
var
searchBarD
isplay
=
Display
.
partial
{
didSet
{
didSet
{
layoutSubviews
()
layoutSubviews
()
}
}
...
@@ -68,15 +68,15 @@ open class SearchBarController: StatusBarController {
...
@@ -68,15 +68,15 @@ open class SearchBarController: StatusBarController {
super
.
layoutSubviews
()
super
.
layoutSubviews
()
let
y
=
Application
.
shouldStatusBarBeHidden
||
statusBar
.
isHidden
?
0
:
statusBar
.
height
let
y
=
Application
.
shouldStatusBarBeHidden
||
statusBar
.
isHidden
?
0
:
statusBar
.
height
let
p
=
y
+
searchBar
.
height
searchBar
.
y
=
y
searchBar
.
y
=
y
searchBar
.
width
=
view
.
width
searchBar
.
width
=
view
.
width
switch
d
isplay
{
switch
searchBarD
isplay
{
case
.
partial
:
case
.
partial
:
rootViewController
.
view
.
y
=
p
let
h
=
y
+
searchBar
.
height
rootViewController
.
view
.
height
=
view
.
height
-
p
rootViewController
.
view
.
y
=
h
rootViewController
.
view
.
height
=
view
.
height
-
h
case
.
full
:
case
.
full
:
rootViewController
.
view
.
frame
=
view
.
bounds
rootViewController
.
view
.
frame
=
view
.
bounds
}
}
...
...
Sources/iOS/StatusBarController.swift
View file @
82564ad0
...
@@ -49,6 +49,17 @@ extension UIViewController {
...
@@ -49,6 +49,17 @@ extension UIViewController {
}
}
open
class
StatusBarController
:
RootController
{
open
class
StatusBarController
:
RootController
{
/**
A Display value to indicate whether or not to
display the rootViewController to the full view
bounds, or up to the toolbar height.
*/
open
var
statusBarDisplay
=
Display
.
full
{
didSet
{
layoutSubviews
()
}
}
/// Device status bar style.
/// Device status bar style.
open
var
statusBarStyle
:
UIStatusBarStyle
{
open
var
statusBarStyle
:
UIStatusBarStyle
{
get
{
get
{
...
@@ -88,7 +99,15 @@ open class StatusBarController: RootController {
...
@@ -88,7 +99,15 @@ open class StatusBarController: RootController {
}
}
statusBar
.
width
=
view
.
width
statusBar
.
width
=
view
.
width
rootViewController
.
view
.
frame
=
view
.
bounds
switch
statusBarDisplay
{
case
.
partial
:
let
h
=
statusBar
.
height
rootViewController
.
view
.
y
=
h
rootViewController
.
view
.
height
=
view
.
height
-
h
case
.
full
:
rootViewController
.
view
.
frame
=
view
.
bounds
}
}
}
/**
/**
...
...
Sources/iOS/ToolbarController.swift
View file @
82564ad0
...
@@ -70,11 +70,11 @@ public protocol ToolbarControllerDelegate {
...
@@ -70,11 +70,11 @@ public protocol ToolbarControllerDelegate {
@objc(ToolbarController)
@objc(ToolbarController)
open
class
ToolbarController
:
StatusBarController
{
open
class
ToolbarController
:
StatusBarController
{
/**
/**
A Display value to indicate whether or not to
A Display value to indicate whether or not to
display the rootViewController to the full view
display the rootViewController to the full view
bounds, or up to the toolbar height.
bounds, or up to the toolbar height.
*/
*/
open
var
d
isplay
=
Display
.
partial
{
open
var
toolbarD
isplay
=
Display
.
partial
{
didSet
{
didSet
{
layoutSubviews
()
layoutSubviews
()
}
}
...
@@ -182,15 +182,15 @@ open class ToolbarController: StatusBarController {
...
@@ -182,15 +182,15 @@ open class ToolbarController: StatusBarController {
super
.
layoutSubviews
()
super
.
layoutSubviews
()
let
y
=
Application
.
shouldStatusBarBeHidden
||
statusBar
.
isHidden
?
0
:
statusBar
.
height
let
y
=
Application
.
shouldStatusBarBeHidden
||
statusBar
.
isHidden
?
0
:
statusBar
.
height
let
p
=
y
+
toolbar
.
height
toolbar
.
y
=
y
toolbar
.
y
=
y
toolbar
.
width
=
view
.
width
toolbar
.
width
=
view
.
width
switch
d
isplay
{
switch
toolbarD
isplay
{
case
.
partial
:
case
.
partial
:
rootViewController
.
view
.
y
=
p
let
h
=
y
+
toolbar
.
height
rootViewController
.
view
.
height
=
view
.
height
-
p
rootViewController
.
view
.
y
=
h
rootViewController
.
view
.
height
=
view
.
height
-
h
case
.
full
:
case
.
full
:
rootViewController
.
view
.
frame
=
view
.
bounds
rootViewController
.
view
.
frame
=
view
.
bounds
}
}
...
...
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