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
1e72fe35
Commit
1e72fe35
authored
Jun 17, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated CGRectZero to CGRect.zero
parent
414b7820
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
35 additions
and
34 deletions
+35
-34
Examples/Programmatic/NavigationDrawerController/NavigationDrawerController/AppLeftViewController.swift
+1
-3
Sources/iOS/BottomNavigationController.swift
+4
-2
Sources/iOS/BottomTabBar.swift
+1
-1
Sources/iOS/CaptureView.swift
+1
-1
Sources/iOS/CardView.swift
+2
-2
Sources/iOS/ControlView.swift
+2
-2
Sources/iOS/ImageCardView.swift
+3
-3
Sources/iOS/MaterialButton.swift
+1
-1
Sources/iOS/MaterialCollectionReusableView.swift
+1
-1
Sources/iOS/MaterialCollectionView.swift
+1
-1
Sources/iOS/MaterialCollectionViewCell.swift
+1
-1
Sources/iOS/MaterialLabel.swift
+1
-1
Sources/iOS/MaterialView.swift
+1
-1
Sources/iOS/NavigationBar.swift
+4
-3
Sources/iOS/NavigationController.swift
+5
-5
Sources/iOS/TextField.swift
+5
-5
Sources/iOS/TextView.swift
+1
-1
No files found.
Examples/Programmatic/NavigationDrawerController/NavigationDrawerController/AppLeftViewController.swift
View file @
1e72fe35
...
...
@@ -116,9 +116,7 @@ extension AppLeftViewController: UITableViewDelegate {
if
let
v
:
NavigationController
=
navigationDrawerController
?
.
rootViewController
as?
NavigationController
{
switch
item
.
text
{
case
"Orange"
:
// navigationDrawerController?.transitionFromRootViewController(OrangeViewController())
// v.pushViewController(OrangeViewController(), animated: true)
navigationDrawerController
?
.
transitionFromRootViewController
(
NavigationController
(
rootViewController
:
OrangeViewController
()))
v
.
pushViewController
(
OrangeViewController
(),
animated
:
true
)
case
"Purple"
:
v
.
pushViewController
(
PurpleViewController
(),
animated
:
true
)
case
"Green"
:
...
...
Sources/iOS/BottomNavigationController.swift
View file @
1e72fe35
...
...
@@ -69,7 +69,6 @@ public class BottomNavigationController : UITabBarController, UITabBarController
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepareView
()
}
/**
...
...
@@ -79,11 +78,14 @@ public class BottomNavigationController : UITabBarController, UITabBarController
*/
public
override
init
(
nibName
nibNameOrNil
:
String
?,
bundle
nibBundleOrNil
:
NSBundle
?)
{
super
.
init
(
nibName
:
nibNameOrNil
,
bundle
:
nibBundleOrNil
)
prepareView
()
}
public
init
()
{
super
.
init
(
nibName
:
nil
,
bundle
:
nil
)
}
public
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
prepareView
()
}
...
...
Sources/iOS/BottomTabBar.swift
View file @
1e72fe35
...
...
@@ -200,7 +200,7 @@ public class BottomTabBar : UITabBar {
/// A convenience initializer.
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
public
override
func
layoutSubviews
()
{
...
...
Sources/iOS/CaptureView.swift
View file @
1e72fe35
...
...
@@ -288,7 +288,7 @@ public class CaptureView : MaterialView, UIGestureRecognizerDelegate {
:name: init
*/
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
/**
...
...
Sources/iOS/CardView.swift
View file @
1e72fe35
...
...
@@ -216,14 +216,14 @@ public class CardView : MaterialPulseView {
:name: init
*/
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
/**
:name: init
*/
public
convenience
init
?(
image
:
UIImage
?
=
nil
,
titleLabel
:
UILabel
?
=
nil
,
contentView
:
UIView
?
=
nil
,
leftButtons
:
Array
<
UIButton
>
?
=
nil
,
rightButtons
:
Array
<
UIButton
>
?
=
nil
)
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
prepareProperties
(
image
,
titleLabel
:
titleLabel
,
contentView
:
contentView
,
leftButtons
:
leftButtons
,
rightButtons
:
rightButtons
)
}
...
...
Sources/iOS/ControlView.swift
View file @
1e72fe35
...
...
@@ -140,7 +140,7 @@ public class ControlView : MaterialView {
/// Basic initializer.
public
init
()
{
super
.
init
(
frame
:
CGRect
Z
ero
)
super
.
init
(
frame
:
CGRect
.
z
ero
)
frame
.
size
=
intrinsicContentSize
()
}
...
...
@@ -150,7 +150,7 @@ public class ControlView : MaterialView {
- Parameter rightControls: An Array of UIControls that go on the right side.
*/
public
init
(
leftControls
:
Array
<
UIControl
>
?
=
nil
,
rightControls
:
Array
<
UIControl
>
?
=
nil
)
{
super
.
init
(
frame
:
CGRect
Z
ero
)
super
.
init
(
frame
:
CGRect
.
z
ero
)
frame
.
size
=
intrinsicContentSize
()
prepareProperties
(
leftControls
,
rightControls
:
rightControls
)
}
...
...
Sources/iOS/ImageCardView.swift
View file @
1e72fe35
...
...
@@ -97,7 +97,7 @@ public class ImageCardView : MaterialPulseView {
imageLayer
?
.
hidden
=
false
}
else
{
imageLayer
?
.
contents
=
nil
imageLayer
?
.
frame
=
CGRect
Z
ero
imageLayer
?
.
frame
=
CGRect
.
z
ero
imageLayer
?
.
hidden
=
true
imageLayer
?
.
removeFromSuperlayer
()
}
...
...
@@ -309,14 +309,14 @@ public class ImageCardView : MaterialPulseView {
:name: init
*/
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
/**
:name: init
*/
public
convenience
init
?(
image
:
UIImage
?
=
nil
,
titleLabel
:
UILabel
?
=
nil
,
contentView
:
UIView
?
=
nil
,
leftButtons
:
Array
<
UIButton
>
?
=
nil
,
rightButtons
:
Array
<
UIButton
>
?
=
nil
)
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
prepareProperties
(
image
,
titleLabel
:
titleLabel
,
contentView
:
contentView
,
leftButtons
:
leftButtons
,
rightButtons
:
rightButtons
)
}
...
...
Sources/iOS/MaterialButton.swift
View file @
1e72fe35
...
...
@@ -335,7 +335,7 @@ public class MaterialButton : UIButton {
/// A convenience initializer.
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
public
override
func
layoutSublayersOfLayer
(
layer
:
CALayer
)
{
...
...
Sources/iOS/MaterialCollectionReusableView.swift
View file @
1e72fe35
...
...
@@ -440,7 +440,7 @@ public class MaterialCollectionReusableView : UICollectionReusableView {
/// A convenience initializer.
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
public
override
func
layoutSublayersOfLayer
(
layer
:
CALayer
)
{
...
...
Sources/iOS/MaterialCollectionView.swift
View file @
1e72fe35
...
...
@@ -148,7 +148,7 @@ public class MaterialCollectionView : UICollectionView {
/// A convenience initializer that initializes the object.
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
/**
...
...
Sources/iOS/MaterialCollectionViewCell.swift
View file @
1e72fe35
...
...
@@ -440,7 +440,7 @@ public class MaterialCollectionViewCell : UICollectionViewCell {
/// A convenience initializer.
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
public
override
func
layoutSublayersOfLayer
(
layer
:
CALayer
)
{
...
...
Sources/iOS/MaterialLabel.swift
View file @
1e72fe35
...
...
@@ -133,7 +133,7 @@ public class MaterialLabel : UILabel {
:name: init
*/
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
/**
...
...
Sources/iOS/MaterialView.swift
View file @
1e72fe35
...
...
@@ -381,7 +381,7 @@ public class MaterialView : UIView {
/// A convenience initializer.
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
public
override
func
layoutSublayersOfLayer
(
layer
:
CALayer
)
{
...
...
Sources/iOS/NavigationBar.swift
View file @
1e72fe35
...
...
@@ -284,7 +284,7 @@ public class NavigationBar : UINavigationBar {
/// A convenience initializer.
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
public
override
func
intrinsicContentSize
()
->
CGSize
{
...
...
@@ -304,6 +304,7 @@ public class NavigationBar : UINavigationBar {
public
override
func
layoutSubviews
()
{
super
.
layoutSubviews
()
if
let
v
:
UINavigationItem
=
topItem
{
layoutNavigationItem
(
v
)
}
...
...
@@ -456,7 +457,7 @@ public class NavigationBar : UINavigationBar {
*/
private
func
prepareTitleView
(
item
:
UINavigationItem
)
->
UIView
{
if
nil
==
item
.
titleView
{
item
.
titleView
=
UIView
(
frame
:
CGRect
Z
ero
)
item
.
titleView
=
UIView
(
frame
:
CGRect
.
z
ero
)
}
return
item
.
titleView
!
}
...
...
@@ -468,7 +469,7 @@ public class NavigationBar : UINavigationBar {
*/
private
func
prepareContentView
(
item
:
UINavigationItem
)
->
UIView
{
if
nil
==
item
.
contentView
{
item
.
contentView
=
UIView
(
frame
:
CGRect
Z
ero
)
item
.
contentView
=
UIView
(
frame
:
CGRect
.
z
ero
)
}
item
.
contentView
!.
grid
.
axis
.
direction
=
.
Vertical
return
item
.
contentView
!
...
...
Sources/iOS/NavigationController.swift
View file @
1e72fe35
...
...
@@ -58,11 +58,6 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
setViewControllers
([
rootViewController
],
animated
:
false
)
}
public
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
prepareView
()
}
public
override
func
viewWillAppear
(
animated
:
Bool
)
{
super
.
viewWillAppear
(
animated
)
if
let
v
:
UIGestureRecognizer
=
interactivePopGestureRecognizer
{
...
...
@@ -77,6 +72,11 @@ public class NavigationController : UINavigationController, UIGestureRecognizerD
}
}
public
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
prepareView
()
}
public
override
func
viewDidAppear
(
animated
:
Bool
)
{
super
.
viewDidAppear
(
animated
)
// Load the initial topItem.
...
...
Sources/iOS/TextField.swift
View file @
1e72fe35
...
...
@@ -176,7 +176,7 @@ public class TextField : UITextField {
}
/// The placeholder UILabel.
@IBInspectable
public
private(set)
lazy
var
placeholderLabel
:
UILabel
=
UILabel
(
frame
:
CGRect
Z
ero
)
@IBInspectable
public
private(set)
lazy
var
placeholderLabel
:
UILabel
=
UILabel
(
frame
:
CGRect
.
z
ero
)
/// Placeholder textColor.
@IBInspectable
public
var
placeholderColor
:
UIColor
=
MaterialColor
.
darkText
.
others
{
...
...
@@ -205,7 +205,7 @@ public class TextField : UITextField {
public
var
placeholderVerticalOffset
:
CGFloat
=
0
/// The detailLabel UILabel that is displayed.
@IBInspectable
public
private(set)
lazy
var
detailLabel
:
UILabel
=
UILabel
(
frame
:
CGRect
Z
ero
)
@IBInspectable
public
private(set)
lazy
var
detailLabel
:
UILabel
=
UILabel
(
frame
:
CGRect
.
z
ero
)
/// The detailLabel text value.
...
...
@@ -259,7 +259,7 @@ public class TextField : UITextField {
if
value
{
if
nil
==
clearIconButton
{
let
image
:
UIImage
?
=
MaterialIcon
.
cm
.
clear
clearIconButton
=
IconButton
(
frame
:
CGRect
Z
ero
)
clearIconButton
=
IconButton
(
frame
:
CGRect
.
z
ero
)
clearIconButton
!.
contentEdgeInsets
=
UIEdgeInsetsZero
clearIconButton
!.
pulseAnimation
=
.
Center
clearIconButton
!.
tintColor
=
placeholderColor
...
...
@@ -296,7 +296,7 @@ public class TextField : UITextField {
if
value
{
if
nil
==
visibilityIconButton
{
let
image
:
UIImage
?
=
MaterialIcon
.
visibility
visibilityIconButton
=
IconButton
(
frame
:
CGRect
Z
ero
)
visibilityIconButton
=
IconButton
(
frame
:
CGRect
.
z
ero
)
visibilityIconButton
!.
contentEdgeInsets
=
UIEdgeInsetsZero
visibilityIconButton
!.
pulseAnimation
=
.
Center
visibilityIconButton
!.
tintColor
=
placeholderColor
...
...
@@ -354,7 +354,7 @@ public class TextField : UITextField {
/// A convenience initializer.
public
convenience
init
()
{
self
.
init
(
frame
:
CGRect
Z
ero
)
self
.
init
(
frame
:
CGRect
.
z
ero
)
}
public
override
func
layoutSubviews
()
{
...
...
Sources/iOS/TextView.swift
View file @
1e72fe35
...
...
@@ -325,7 +325,7 @@ public class TextView: UITextView {
- Parameter textContainer: A NSTextContainer instance.
*/
public
convenience
init
(
textContainer
:
NSTextContainer
?)
{
self
.
init
(
frame
:
CGRect
Z
ero
,
textContainer
:
textContainer
)
self
.
init
(
frame
:
CGRect
.
z
ero
,
textContainer
:
textContainer
)
}
/** Denitializer. This should never be called unless you know
...
...
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