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
0ff4ab03
Commit
0ff4ab03
authored
Mar 06, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added contentsGravityPreset where appropriate
parent
77e68079
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
431 additions
and
95 deletions
+431
-95
Examples/Programmatic/App/App/FeedViewController.swift
+2
-2
Examples/Programmatic/CardView/CardView/ViewController.swift
+2
-2
Examples/Programmatic/Grid/Grid/ViewController.swift
+5
-5
Examples/Storyboards/CardView/CardView/ViewController.swift
+1
-1
Sources/ImageCardView.swift
+7
-6
Sources/MaterialCollectionViewCell.swift
+79
-27
Sources/MaterialDevice.swift
+11
-0
Sources/MaterialLayer.swift
+10
-0
Sources/MaterialView.swift
+29
-16
Sources/NavigationBar.swift
+279
-26
Sources/NavigationController.swift
+0
-7
Sources/StatusBarView.swift
+6
-3
No files found.
Examples/Programmatic/App/App/FeedViewController.swift
View file @
0ff4ab03
...
@@ -63,7 +63,7 @@ class FeedViewController: UIViewController {
...
@@ -63,7 +63,7 @@ class FeedViewController: UIViewController {
menuButton
.
pulseScale
=
false
menuButton
.
pulseScale
=
false
menuButton
.
setImage
(
image
,
forState
:
.
Normal
)
menuButton
.
setImage
(
image
,
forState
:
.
Normal
)
menuButton
.
setImage
(
image
,
forState
:
.
Highlighted
)
menuButton
.
setImage
(
image
,
forState
:
.
Highlighted
)
menuButton
.
addTarget
(
self
,
action
:
"handleMenuButton"
,
forControlEvents
:
.
TouchUpInside
)
//
menuButton.addTarget(self, action: "handleMenuButton", forControlEvents: .TouchUpInside)
// Switch control.
// Switch control.
let
switchControl
:
MaterialSwitch
=
MaterialSwitch
(
state
:
.
Off
,
style
:
.
LightContent
,
size
:
.
Small
)
let
switchControl
:
MaterialSwitch
=
MaterialSwitch
(
state
:
.
Off
,
style
:
.
LightContent
,
size
:
.
Small
)
...
@@ -75,7 +75,7 @@ class FeedViewController: UIViewController {
...
@@ -75,7 +75,7 @@ class FeedViewController: UIViewController {
searchButton
.
pulseScale
=
false
searchButton
.
pulseScale
=
false
searchButton
.
setImage
(
image
,
forState
:
.
Normal
)
searchButton
.
setImage
(
image
,
forState
:
.
Normal
)
searchButton
.
setImage
(
image
,
forState
:
.
Highlighted
)
searchButton
.
setImage
(
image
,
forState
:
.
Highlighted
)
searchButton
.
addTarget
(
self
,
action
:
"handleSearchButton"
,
forControlEvents
:
.
TouchUpInside
)
//
searchButton.addTarget(self, action: "handleSearchButton", forControlEvents: .TouchUpInside)
navigationController
?
.
navigationBar
.
leftControls
=
[
menuButton
]
navigationController
?
.
navigationBar
.
leftControls
=
[
menuButton
]
navigationController
?
.
navigationBar
.
rightControls
=
[
switchControl
,
searchButton
]
navigationController
?
.
navigationBar
.
rightControls
=
[
switchControl
,
searchButton
]
...
...
Examples/Programmatic/CardView/CardView/ViewController.swift
View file @
0ff4ab03
...
@@ -109,7 +109,7 @@ class ViewController: UIViewController {
...
@@ -109,7 +109,7 @@ class ViewController: UIViewController {
cardView
.
pulseColor
=
nil
cardView
.
pulseColor
=
nil
cardView
.
image
=
UIImage
(
named
:
"Material-iTunesArtWork"
)?
.
resize
(
toHeight
:
150
)
cardView
.
image
=
UIImage
(
named
:
"Material-iTunesArtWork"
)?
.
resize
(
toHeight
:
150
)
cardView
.
contentsGravity
=
.
BottomRight
cardView
.
contentsGravity
Preset
=
.
BottomRight
// Title label.
// Title label.
let
titleLabel
:
UILabel
=
UILabel
()
let
titleLabel
:
UILabel
=
UILabel
()
...
@@ -154,7 +154,7 @@ class ViewController: UIViewController {
...
@@ -154,7 +154,7 @@ class ViewController: UIViewController {
// Image.
// Image.
cardView
.
image
=
UIImage
(
named
:
"Graph"
)?
.
resize
(
toHeight
:
150
)
cardView
.
image
=
UIImage
(
named
:
"Graph"
)?
.
resize
(
toHeight
:
150
)
cardView
.
contentsGravity
=
.
Right
cardView
.
contentsGravity
Preset
=
.
Right
// Title label.
// Title label.
let
titleLabel
:
UILabel
=
UILabel
()
let
titleLabel
:
UILabel
=
UILabel
()
...
...
Examples/Programmatic/Grid/Grid/ViewController.swift
View file @
0ff4ab03
...
@@ -191,7 +191,7 @@ class ViewController: UIViewController {
...
@@ -191,7 +191,7 @@ class ViewController: UIViewController {
var
image
:
UIImage
?
=
UIImage
(
named
:
"VeganCakeFull"
)
var
image
:
UIImage
?
=
UIImage
(
named
:
"VeganCakeFull"
)
let
imageView
:
MaterialView
=
MaterialView
()
let
imageView
:
MaterialView
=
MaterialView
()
imageView
.
image
=
image
imageView
.
image
=
image
imageView
.
contentsGravity
=
.
ResizeAspectFill
imageView
.
contentsGravity
Preset
=
.
ResizeAspectFill
cardView
.
addSubview
(
imageView
)
cardView
.
addSubview
(
imageView
)
let
contentView
:
MaterialView
=
MaterialView
()
let
contentView
:
MaterialView
=
MaterialView
()
...
@@ -288,7 +288,7 @@ class ViewController: UIViewController {
...
@@ -288,7 +288,7 @@ class ViewController: UIViewController {
var
image
:
UIImage
?
=
UIImage
(
named
:
"CosmicMindInverted"
)
var
image
:
UIImage
?
=
UIImage
(
named
:
"CosmicMindInverted"
)
let
imageView
:
MaterialView
=
MaterialView
()
let
imageView
:
MaterialView
=
MaterialView
()
imageView
.
image
=
image
imageView
.
image
=
image
imageView
.
contentsGravity
=
.
ResizeAspectFill
imageView
.
contentsGravity
Preset
=
.
ResizeAspectFill
cardView
.
addSubview
(
imageView
)
cardView
.
addSubview
(
imageView
)
let
contentView
:
MaterialView
=
MaterialView
()
let
contentView
:
MaterialView
=
MaterialView
()
...
@@ -387,17 +387,17 @@ class ViewController: UIViewController {
...
@@ -387,17 +387,17 @@ class ViewController: UIViewController {
let
leftImageView
:
MaterialView
=
MaterialView
()
let
leftImageView
:
MaterialView
=
MaterialView
()
leftImageView
.
image
=
image
leftImageView
.
image
=
image
leftImageView
.
contentsGravity
=
.
ResizeAspectFill
leftImageView
.
contentsGravity
Preset
=
.
ResizeAspectFill
cardView
.
addSubview
(
leftImageView
)
cardView
.
addSubview
(
leftImageView
)
let
topImageView
:
MaterialView
=
MaterialView
()
let
topImageView
:
MaterialView
=
MaterialView
()
topImageView
.
image
=
image
topImageView
.
image
=
image
topImageView
.
contentsGravity
=
.
ResizeAspectFill
topImageView
.
contentsGravity
Preset
=
.
ResizeAspectFill
cardView
.
addSubview
(
topImageView
)
cardView
.
addSubview
(
topImageView
)
let
bottomImageView
:
MaterialView
=
MaterialView
()
let
bottomImageView
:
MaterialView
=
MaterialView
()
bottomImageView
.
image
=
image
bottomImageView
.
image
=
image
bottomImageView
.
contentsGravity
=
.
ResizeAspectFill
bottomImageView
.
contentsGravity
Preset
=
.
ResizeAspectFill
cardView
.
addSubview
(
bottomImageView
)
cardView
.
addSubview
(
bottomImageView
)
let
contentView
:
MaterialView
=
MaterialView
()
let
contentView
:
MaterialView
=
MaterialView
()
...
...
Examples/Storyboards/CardView/CardView/ViewController.swift
View file @
0ff4ab03
...
@@ -100,7 +100,7 @@ class ViewController: UIViewController {
...
@@ -100,7 +100,7 @@ class ViewController: UIViewController {
// Image.
// Image.
secondCardView
.
image
=
UIImage
(
named
:
"Graph"
)?
.
resize
(
toHeight
:
100
)
secondCardView
.
image
=
UIImage
(
named
:
"Graph"
)?
.
resize
(
toHeight
:
100
)
secondCardView
.
contentsGravity
=
.
TopLeft
secondCardView
.
contentsGravity
Preset
=
.
TopLeft
// Title label.
// Title label.
let
titleLabel
:
UILabel
=
UILabel
()
let
titleLabel
:
UILabel
=
UILabel
()
...
...
Sources/ImageCardView.swift
View file @
0ff4ab03
...
@@ -152,13 +152,14 @@ public class ImageCardView : MaterialPulseView {
...
@@ -152,13 +152,14 @@ public class ImageCardView : MaterialPulseView {
}
}
}
}
/**
/// Determines how content should be aligned within the visualLayer's bounds.
:name: contentsGravity
public
override
var
contentsGravity
:
String
{
*/
get
{
public
override
var
contentsGravity
:
MaterialGravity
{
return
nil
==
imageLayer
?
""
:
imageLayer
!.
contentsGravity
didSet
{
}
set
(
value
)
{
prepareImageLayer
()
prepareImageLayer
()
imageLayer
?
.
contentsGravity
=
MaterialGravityToString
(
contentsGravity
)
imageLayer
?
.
contentsGravity
=
value
}
}
}
}
...
...
Sources/MaterialCollectionViewCell.swift
View file @
0ff4ab03
...
@@ -33,6 +33,28 @@ import UIKit
...
@@ -33,6 +33,28 @@ import UIKit
@objc(MaterialCollectionViewCell)
@objc(MaterialCollectionViewCell)
public
class
MaterialCollectionViewCell
:
UICollectionViewCell
{
public
class
MaterialCollectionViewCell
:
UICollectionViewCell
{
/**
/**
A CAShapeLayer used to manage elements that would be affected by
the clipToBounds property of the backing layer. For example, this
allows the dropshadow effect on the backing layer, while clipping
the image to a desired shape within the visualLayer.
*/
public
private(set)
lazy
var
visualLayer
:
CAShapeLayer
=
CAShapeLayer
()
/**
A base delegate reference used when subclassing MaterialView.
*/
public
weak
var
delegate
:
MaterialDelegate
?
/// Sets whether the scaling animation should be used.
public
lazy
var
pulseScale
:
Bool
=
true
/// The opcaity value for the pulse animation.
public
var
pulseColorOpacity
:
CGFloat
=
0.25
/// The color of the pulse effect.
public
var
pulseColor
:
UIColor
?
/**
A property that manages an image for the visualLayer's contents
A property that manages an image for the visualLayer's contents
property. Images should not be set to the backing layer's contents
property. Images should not be set to the backing layer's contents
property to avoid conflicts when using clipsToBounds.
property to avoid conflicts when using clipsToBounds.
...
@@ -43,10 +65,62 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
...
@@ -43,10 +65,62 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
}
}
}
}
/// Determines how content should be aligned within the visualLayer's bounds.
/**
public
var
contentsGravity
:
MaterialGravity
{
Allows a relative subrectangle within the range of 0 to 1 to be
specified for the visualLayer's contents property. This allows
much greater flexibility than the contentsGravity property in
terms of how the image is cropped and stretched.
*/
public
var
contentsRect
:
CGRect
{
get
{
return
visualLayer
.
contentsRect
}
set
(
value
)
{
visualLayer
.
contentsRect
=
value
}
}
/**
A CGRect that defines a stretchable region inside the visualLayer
with a fixed border around the edge.
*/
public
var
contentsCenter
:
CGRect
{
get
{
return
visualLayer
.
contentsCenter
}
set
(
value
)
{
visualLayer
.
contentsCenter
=
value
}
}
/**
A floating point value that defines a ratio between the pixel
dimensions of the visualLayer's contents property and the size
of the view. By default, this value is set to the MaterialDevice.scale.
*/
public
var
contentsScale
:
CGFloat
{
get
{
return
visualLayer
.
contentsScale
}
set
(
value
)
{
visualLayer
.
contentsScale
=
value
}
}
/// A Preset for the contentsGravity property.
public
var
contentsGravityPreset
:
MaterialGravity
{
didSet
{
didSet
{
visualLayer
.
contentsGravity
=
MaterialGravityToString
(
contentsGravity
)
contentsGravity
=
MaterialGravityToString
(
contentsGravityPreset
)
}
}
/// Determines how content should be aligned within the visualLayer's bounds.
public
var
contentsGravity
:
String
{
get
{
return
visualLayer
.
contentsGravity
}
set
(
value
)
{
visualLayer
.
contentsGravity
=
value
}
}
}
}
...
@@ -88,28 +162,6 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
...
@@ -88,28 +162,6 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
}
}
/**
/**
A CAShapeLayer used to manage elements that would be affected by
the clipToBounds property of the backing layer. For example, this
allows the dropshadow effect on the backing layer, while clipping
the image to a desired shape within the visualLayer.
*/
public
private(set)
lazy
var
visualLayer
:
CAShapeLayer
=
CAShapeLayer
()
/**
A base delegate reference used when subclassing MaterialView.
*/
public
weak
var
delegate
:
MaterialDelegate
?
/// Sets whether the scaling animation should be used.
public
lazy
var
pulseScale
:
Bool
=
true
/// The opcaity value for the pulse animation.
public
var
pulseColorOpacity
:
CGFloat
=
0.25
/// The color of the pulse effect.
public
var
pulseColor
:
UIColor
?
/**
This property is the same as clipsToBounds. It crops any of the view's
This property is the same as clipsToBounds. It crops any of the view's
contents from bleeding past the view's frame. If an image is set using
contents from bleeding past the view's frame. If an image is set using
the image property, then this value does not need to be set, since the
the image property, then this value does not need to be set, since the
...
@@ -360,7 +412,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
...
@@ -360,7 +412,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
depth
=
.
None
depth
=
.
None
cornerRadiusPreset
=
.
None
cornerRadiusPreset
=
.
None
shape
=
.
None
shape
=
.
None
contentsGravity
=
.
ResizeAspectFill
contentsGravity
Preset
=
.
ResizeAspectFill
super
.
init
(
coder
:
aDecoder
)
super
.
init
(
coder
:
aDecoder
)
prepareView
()
prepareView
()
}
}
...
@@ -375,7 +427,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
...
@@ -375,7 +427,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
depth
=
.
None
depth
=
.
None
cornerRadiusPreset
=
.
None
cornerRadiusPreset
=
.
None
shape
=
.
None
shape
=
.
None
contentsGravity
=
.
ResizeAspectFill
contentsGravity
Preset
=
.
ResizeAspectFill
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
prepareView
()
prepareView
()
}
}
...
...
Sources/MaterialDevice.swift
View file @
0ff4ab03
...
@@ -76,4 +76,14 @@ public struct MaterialDevice {
...
@@ -76,4 +76,14 @@ public struct MaterialDevice {
public
static
var
scale
:
CGFloat
{
public
static
var
scale
:
CGFloat
{
return
UIScreen
.
mainScreen
()
.
scale
return
UIScreen
.
mainScreen
()
.
scale
}
}
/// Retrieves the device status bar style.
public
static
var
statusBarStyle
:
UIStatusBarStyle
{
get
{
return
UIApplication
.
sharedApplication
()
.
statusBarStyle
}
set
(
value
)
{
UIApplication
.
sharedApplication
()
.
statusBarStyle
=
value
}
}
}
}
\ No newline at end of file
Sources/MaterialLayer.swift
View file @
0ff4ab03
...
@@ -143,6 +143,13 @@ public class MaterialLayer : CAShapeLayer {
...
@@ -143,6 +143,13 @@ public class MaterialLayer : CAShapeLayer {
}
}
}
}
/// A Preset for the contentsGravity property.
public
var
contentsGravityPreset
:
MaterialGravity
{
didSet
{
contentsGravity
=
MaterialGravityToString
(
contentsGravityPreset
)
}
}
/// Determines how content should be aligned within the visualLayer's bounds.
/// Determines how content should be aligned within the visualLayer's bounds.
public
override
var
contentsGravity
:
String
{
public
override
var
contentsGravity
:
String
{
get
{
get
{
...
@@ -236,6 +243,7 @@ public class MaterialLayer : CAShapeLayer {
...
@@ -236,6 +243,7 @@ public class MaterialLayer : CAShapeLayer {
- Parameter aDecoder: A NSCoder instance.
- Parameter aDecoder: A NSCoder instance.
*/
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
contentsGravityPreset
=
.
ResizeAspectFill
super
.
init
(
coder
:
aDecoder
)
super
.
init
(
coder
:
aDecoder
)
prepareVisualLayer
()
prepareVisualLayer
()
}
}
...
@@ -246,12 +254,14 @@ public class MaterialLayer : CAShapeLayer {
...
@@ -246,12 +254,14 @@ public class MaterialLayer : CAShapeLayer {
- Parameter layer: AnyObject.
- Parameter layer: AnyObject.
*/
*/
public
override
init
(
layer
:
AnyObject
)
{
public
override
init
(
layer
:
AnyObject
)
{
contentsGravityPreset
=
.
ResizeAspectFill
super
.
init
()
super
.
init
()
prepareVisualLayer
()
prepareVisualLayer
()
}
}
/// A convenience initializer.
/// A convenience initializer.
public
override
init
()
{
public
override
init
()
{
contentsGravityPreset
=
.
ResizeAspectFill
super
.
init
()
super
.
init
()
prepareVisualLayer
()
prepareVisualLayer
()
}
}
...
...
Sources/MaterialView.swift
View file @
0ff4ab03
...
@@ -63,8 +63,11 @@ public class MaterialView : UIView {
...
@@ -63,8 +63,11 @@ public class MaterialView : UIView {
terms of how the image is cropped and stretched.
terms of how the image is cropped and stretched.
*/
*/
public
var
contentsRect
:
CGRect
{
public
var
contentsRect
:
CGRect
{
didSet
{
get
{
visualLayer
.
contentsRect
=
contentsRect
return
visualLayer
.
contentsRect
}
set
(
value
)
{
visualLayer
.
contentsRect
=
value
}
}
}
}
...
@@ -73,8 +76,11 @@ public class MaterialView : UIView {
...
@@ -73,8 +76,11 @@ public class MaterialView : UIView {
with a fixed border around the edge.
with a fixed border around the edge.
*/
*/
public
var
contentsCenter
:
CGRect
{
public
var
contentsCenter
:
CGRect
{
didSet
{
get
{
visualLayer
.
contentsCenter
=
contentsCenter
return
visualLayer
.
contentsCenter
}
set
(
value
)
{
visualLayer
.
contentsCenter
=
value
}
}
}
}
...
@@ -84,15 +90,28 @@ public class MaterialView : UIView {
...
@@ -84,15 +90,28 @@ public class MaterialView : UIView {
of the view. By default, this value is set to the MaterialDevice.scale.
of the view. By default, this value is set to the MaterialDevice.scale.
*/
*/
public
var
contentsScale
:
CGFloat
{
public
var
contentsScale
:
CGFloat
{
get
{
return
visualLayer
.
contentsScale
}
set
(
value
)
{
visualLayer
.
contentsScale
=
value
}
}
/// A Preset for the contentsGravity property.
public
var
contentsGravityPreset
:
MaterialGravity
{
didSet
{
didSet
{
visualLayer
.
contentsScale
=
contentsScale
contentsGravity
=
MaterialGravityToString
(
contentsGravityPreset
)
}
}
}
}
/// Determines how content should be aligned within the visualLayer's bounds.
/// Determines how content should be aligned within the visualLayer's bounds.
public
var
contentsGravity
:
MaterialGravity
{
public
var
contentsGravity
:
String
{
didSet
{
get
{
visualLayer
.
contentsGravity
=
MaterialGravityToString
(
contentsGravity
)
return
visualLayer
.
contentsGravity
}
set
(
value
)
{
visualLayer
.
contentsGravity
=
value
}
}
}
}
...
@@ -344,10 +363,7 @@ public class MaterialView : UIView {
...
@@ -344,10 +363,7 @@ public class MaterialView : UIView {
- Parameter aDecoder: A NSCoder instance.
- Parameter aDecoder: A NSCoder instance.
*/
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
contentsRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
contentsGravityPreset
=
.
ResizeAspectFill
contentsCenter
=
CGRectMake
(
0
,
0
,
1
,
1
)
contentsScale
=
MaterialDevice
.
scale
contentsGravity
=
.
ResizeAspectFill
super
.
init
(
coder
:
aDecoder
)
super
.
init
(
coder
:
aDecoder
)
prepareView
()
prepareView
()
}
}
...
@@ -359,10 +375,7 @@ public class MaterialView : UIView {
...
@@ -359,10 +375,7 @@ public class MaterialView : UIView {
- Parameter frame: A CGRect instance.
- Parameter frame: A CGRect instance.
*/
*/
public
override
init
(
frame
:
CGRect
)
{
public
override
init
(
frame
:
CGRect
)
{
contentsRect
=
CGRectMake
(
0
,
0
,
1
,
1
)
contentsGravityPreset
=
.
ResizeAspectFill
contentsCenter
=
CGRectMake
(
0
,
0
,
1
,
1
)
contentsScale
=
MaterialDevice
.
scale
contentsGravity
=
.
ResizeAspectFill
super
.
init
(
frame
:
frame
)
super
.
init
(
frame
:
frame
)
prepareView
()
prepareView
()
}
}
...
...
Sources/NavigationBar.swift
View file @
0ff4ab03
This diff is collapsed.
Click to expand it.
Sources/NavigationController.swift
View file @
0ff4ab03
...
@@ -56,11 +56,4 @@ public class NavigationController : UINavigationController {
...
@@ -56,11 +56,4 @@ public class NavigationController : UINavigationController {
public
func
prepareView
()
{
public
func
prepareView
()
{
navigationItem
.
title
=
"Title"
navigationItem
.
title
=
"Title"
}
}
public
override
func
viewWillLayoutSubviews
()
{
super
.
viewWillLayoutSubviews
()
if
let
v
:
NavigationBar
=
navigationBar
as?
NavigationBar
{
v
.
reloadView
()
}
}
}
}
Sources/StatusBarView.swift
View file @
0ff4ab03
...
@@ -41,9 +41,12 @@ public class StatusBarView : ControlView {
...
@@ -41,9 +41,12 @@ public class StatusBarView : ControlView {
public
var
heightForLandscapeOrientation
:
CGFloat
=
44
public
var
heightForLandscapeOrientation
:
CGFloat
=
44
/// Device status bar style.
/// Device status bar style.
public
var
statusBarStyle
:
UIStatusBarStyle
=
UIApplication
.
sharedApplication
()
.
statusBarStyle
{
public
var
statusBarStyle
:
UIStatusBarStyle
{
didSet
{
get
{
UIApplication
.
sharedApplication
()
.
statusBarStyle
=
statusBarStyle
return
MaterialDevice
.
statusBarStyle
}
set
(
value
)
{
MaterialDevice
.
statusBarStyle
=
value
}
}
}
}
...
...
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