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
47b798d8
Commit
47b798d8
authored
Jun 18, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated CG*Zero values to CG*.zero
parent
6d7e43fb
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
15 additions
and
17 deletions
+15
-17
Sources/iOS/ControlView.swift
+1
-1
Sources/iOS/Material+UIImage+FilterBlur.swift
+1
-1
Sources/iOS/MaterialCollectionViewLayout.swift
+3
-3
Sources/iOS/MaterialDepth.swift
+1
-1
Sources/iOS/MaterialTextLayer.swift
+1
-1
Sources/iOS/Menu.swift
+1
-1
Sources/iOS/NavigationBar.swift
+3
-3
Sources/iOS/NavigationDrawerController.swift
+3
-5
Sources/iOS/RootController.swift
+1
-1
No files found.
Sources/iOS/ControlView.swift
View file @
47b798d8
...
@@ -33,7 +33,7 @@ import UIKit
...
@@ -33,7 +33,7 @@ import UIKit
public
class
ControlView
:
MaterialView
{
public
class
ControlView
:
MaterialView
{
/// Will render the view.
/// Will render the view.
public
var
willRenderView
:
Bool
{
public
var
willRenderView
:
Bool
{
return
0
<
width
return
0
<
width
&&
0
<
height
}
}
/// A preset wrapper around contentInset.
/// A preset wrapper around contentInset.
...
...
Sources/iOS/Material+UIImage+FilterBlur.swift
View file @
47b798d8
...
@@ -52,7 +52,7 @@ public extension UIImage {
...
@@ -52,7 +52,7 @@ public extension UIImage {
var
effectImage
:
UIImage
=
self
var
effectImage
:
UIImage
=
self
let
screenScale
:
CGFloat
=
MaterialDevice
.
scale
let
screenScale
:
CGFloat
=
MaterialDevice
.
scale
let
imageRect
:
CGRect
=
CGRect
(
origin
:
CGPoint
Z
ero
,
size
:
size
)
let
imageRect
:
CGRect
=
CGRect
(
origin
:
CGPoint
.
z
ero
,
size
:
size
)
let
hasBlur
:
Bool
=
blurRadius
>
CGFloat
(
FLT_EPSILON
)
let
hasBlur
:
Bool
=
blurRadius
>
CGFloat
(
FLT_EPSILON
)
let
hasSaturationChange
:
Bool
=
fabs
(
saturationDeltaFactor
-
1.0
)
>
CGFloat
(
FLT_EPSILON
)
let
hasSaturationChange
:
Bool
=
fabs
(
saturationDeltaFactor
-
1.0
)
>
CGFloat
(
FLT_EPSILON
)
...
...
Sources/iOS/MaterialCollectionViewLayout.swift
View file @
47b798d8
...
@@ -32,10 +32,10 @@ import UIKit
...
@@ -32,10 +32,10 @@ import UIKit
public
class
MaterialCollectionViewLayout
:
UICollectionViewLayout
{
public
class
MaterialCollectionViewLayout
:
UICollectionViewLayout
{
/// Used to calculate the dimensions of the cells.
/// Used to calculate the dimensions of the cells.
internal
var
offset
:
CGPoint
=
CGPoint
Z
ero
internal
var
offset
:
CGPoint
=
CGPoint
.
z
ero
/// The size of items.
/// The size of items.
public
var
itemSize
:
CGSize
=
CGSize
Z
ero
public
var
itemSize
:
CGSize
=
CGSize
.
z
ero
/// A preset wrapper around contentInset.
/// A preset wrapper around contentInset.
public
var
contentInsetPreset
:
MaterialEdgeInset
=
.
None
{
public
var
contentInsetPreset
:
MaterialEdgeInset
=
.
None
{
...
@@ -48,7 +48,7 @@ public class MaterialCollectionViewLayout : UICollectionViewLayout {
...
@@ -48,7 +48,7 @@ public class MaterialCollectionViewLayout : UICollectionViewLayout {
public
var
contentInset
:
UIEdgeInsets
=
UIEdgeInsetsZero
public
var
contentInset
:
UIEdgeInsets
=
UIEdgeInsetsZero
/// Size of the content.
/// Size of the content.
public
private(set)
var
contentSize
:
CGSize
=
CGSize
Z
ero
public
private(set)
var
contentSize
:
CGSize
=
CGSize
.
z
ero
/// Layout attribute items.
/// Layout attribute items.
public
private(set)
var
layoutItems
:
Array
<
(
UICollectionViewLayoutAttributes
,
NSIndexPath
)
>
=
Array
<
(
UICollectionViewLayoutAttributes
,
NSIndexPath
)
>
()
public
private(set)
var
layoutItems
:
Array
<
(
UICollectionViewLayoutAttributes
,
NSIndexPath
)
>
=
Array
<
(
UICollectionViewLayoutAttributes
,
NSIndexPath
)
>
()
...
...
Sources/iOS/MaterialDepth.swift
View file @
47b798d8
...
@@ -45,7 +45,7 @@ public enum MaterialDepth {
...
@@ -45,7 +45,7 @@ public enum MaterialDepth {
public
func
MaterialDepthToValue
(
depth
:
MaterialDepth
)
->
MaterialDepthType
{
public
func
MaterialDepthToValue
(
depth
:
MaterialDepth
)
->
MaterialDepthType
{
switch
depth
{
switch
depth
{
case
.
None
:
case
.
None
:
return
(
offset
:
CGSize
Z
ero
,
opacity
:
0
,
radius
:
0
)
return
(
offset
:
CGSize
.
z
ero
,
opacity
:
0
,
radius
:
0
)
case
.
Depth1
:
case
.
Depth1
:
return
(
offset
:
CGSizeMake
(
0
,
1
),
opacity
:
0.3
,
radius
:
1
)
return
(
offset
:
CGSizeMake
(
0
,
1
),
opacity
:
0.3
,
radius
:
1
)
case
.
Depth2
:
case
.
Depth2
:
...
...
Sources/iOS/MaterialTextLayer.swift
View file @
47b798d8
...
@@ -201,7 +201,7 @@ public class MaterialTextLayer : CATextLayer {
...
@@ -201,7 +201,7 @@ public class MaterialTextLayer : CATextLayer {
return
v
.
stringSize
(
text
!
,
constrainedToWidth
:
width
)
return
v
.
stringSize
(
text
!
,
constrainedToWidth
:
width
)
}
}
}
}
return
CGSize
Z
ero
return
CGSize
.
z
ero
}
}
/**
/**
...
...
Sources/iOS/Menu.swift
View file @
47b798d8
...
@@ -97,7 +97,7 @@ public class Menu {
...
@@ -97,7 +97,7 @@ public class Menu {
/// Convenience initializer.
/// Convenience initializer.
public
convenience
init
()
{
public
convenience
init
()
{
self
.
init
(
origin
:
CGPoint
Z
ero
)
self
.
init
(
origin
:
CGPoint
.
z
ero
)
}
}
/// Reload the view layout.
/// Reload the view layout.
...
...
Sources/iOS/NavigationBar.swift
View file @
47b798d8
...
@@ -290,11 +290,11 @@ public class NavigationBar : UINavigationBar {
...
@@ -290,11 +290,11 @@ public class NavigationBar : UINavigationBar {
public
override
func
intrinsicContentSize
()
->
CGSize
{
public
override
func
intrinsicContentSize
()
->
CGSize
{
switch
navigationBarStyle
{
switch
navigationBarStyle
{
case
.
Tiny
:
case
.
Tiny
:
return
CGSize
Make
(
width
??
MaterialDevice
.
width
,
32
)
return
CGSize
(
width
:
width
??
MaterialDevice
.
width
,
height
:
32
)
case
.
Default
:
case
.
Default
:
return
CGSize
Make
(
width
??
MaterialDevice
.
width
,
44
)
return
CGSize
(
width
:
width
??
MaterialDevice
.
width
,
height
:
44
)
case
.
Medium
:
case
.
Medium
:
return
CGSize
Make
(
width
??
MaterialDevice
.
width
,
56
)
return
CGSize
(
width
:
width
??
MaterialDevice
.
width
,
height
:
56
)
}
}
}
}
...
...
Sources/iOS/NavigationDrawerController.swift
View file @
47b798d8
...
@@ -319,7 +319,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
...
@@ -319,7 +319,7 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
this, and to add a hidden transition viewController for complex
this, and to add a hidden transition viewController for complex
situations, the contentViewController was added.
situations, the contentViewController was added.
*/
*/
public
private(set)
var
contentViewController
:
UIViewController
?
public
private(set)
lazy
var
contentViewController
:
UIViewController
=
UIViewController
()
/**
/**
A UIViewController property that references the
A UIViewController property that references the
...
@@ -861,11 +861,9 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
...
@@ -861,11 +861,9 @@ public class NavigationDrawerController : RootController, UIGestureRecognizerDel
/// Prepares the contentViewController.
/// Prepares the contentViewController.
private
func
prepareContentViewController
()
{
private
func
prepareContentViewController
()
{
if
nil
==
contentViewController
{
contentViewController
.
view
.
backgroundColor
=
MaterialColor
.
black
contentViewController
=
UIViewController
()
contentViewController
!.
view
.
backgroundColor
=
MaterialColor
.
black
}
prepareViewControllerWithinContainer
(
contentViewController
,
container
:
view
)
prepareViewControllerWithinContainer
(
contentViewController
,
container
:
view
)
view
.
sendSubviewToBack
(
contentViewController
.
view
)
}
}
/// A method that prepares the leftViewController.
/// A method that prepares the leftViewController.
...
...
Sources/iOS/RootController.swift
View file @
47b798d8
...
@@ -129,6 +129,7 @@ public class RootController : UIViewController {
...
@@ -129,6 +129,7 @@ public class RootController : UIViewController {
s
.
rootViewController
=
toViewController
s
.
rootViewController
=
toViewController
s
.
rootViewController
.
view
.
clipsToBounds
=
true
s
.
rootViewController
.
view
.
clipsToBounds
=
true
s
.
rootViewController
.
view
.
autoresizingMask
=
[
.
FlexibleWidth
,
.
FlexibleHeight
]
s
.
rootViewController
.
view
.
autoresizingMask
=
[
.
FlexibleWidth
,
.
FlexibleHeight
]
s
.
rootViewController
.
view
.
contentScaleFactor
=
MaterialDevice
.
scale
completion
?(
result
)
completion
?(
result
)
}
}
})
})
...
@@ -171,7 +172,6 @@ public class RootController : UIViewController {
...
@@ -171,7 +172,6 @@ public class RootController : UIViewController {
if
let
v
:
UIViewController
=
viewController
{
if
let
v
:
UIViewController
=
viewController
{
addChildViewController
(
v
)
addChildViewController
(
v
)
container
.
addSubview
(
v
.
view
)
container
.
addSubview
(
v
.
view
)
container
.
sendSubviewToBack
(
v
.
view
)
v
.
didMoveToParentViewController
(
self
)
v
.
didMoveToParentViewController
(
self
)
v
.
view
.
clipsToBounds
=
true
v
.
view
.
clipsToBounds
=
true
v
.
view
.
autoresizingMask
=
[
.
FlexibleWidth
,
.
FlexibleHeight
]
v
.
view
.
autoresizingMask
=
[
.
FlexibleWidth
,
.
FlexibleHeight
]
...
...
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