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
a969227d
Unverified
Commit
a969227d
authored
Sep 10, 2016
by
Daniel Dahan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
development: renamed prepareView to prepare
parent
ae1deec3
Hide whitespace changes
Inline
Side-by-side
Showing
41 changed files
with
208 additions
and
208 deletions
+208
-208
Material.xcodeproj/project.pbxproj
+4
-4
Sources/iOS/BarView.swift
+4
-4
Sources/iOS/BottomNavigationController.swift
+4
-4
Sources/iOS/BottomTabBar.swift
+5
-5
Sources/iOS/Button.swift
+5
-5
Sources/iOS/Capture.swift
+4
-4
Sources/iOS/CapturePreview.swift
+4
-4
Sources/iOS/Card.swift
+3
-3
Sources/iOS/CollectionReusableView.swift
+5
-5
Sources/iOS/CollectionView.swift
+6
-6
Sources/iOS/CollectionViewCell.swift
+5
-5
Sources/iOS/ContentCard.swift
+25
-25
Sources/iOS/ContentView.swift
+4
-4
Sources/iOS/ErrorTextField.swift
+4
-4
Sources/iOS/FabButton.swift
+4
-4
Sources/iOS/FlatButton.swift
+4
-4
Sources/iOS/IconButton.swift
+4
-4
Sources/iOS/ImageCard.swift
+3
-3
Sources/iOS/Label.swift
+4
-4
Sources/iOS/Menu.swift
+4
-4
Sources/iOS/MenuController.swift
+4
-4
Sources/iOS/NavigationBar.swift
+5
-5
Sources/iOS/NavigationController.swift
+4
-4
Sources/iOS/NavigationDrawerController.swift
+10
-10
Sources/iOS/PageTabBarController.swift
+8
-8
Sources/iOS/PhotoLibraryController.swift
+4
-4
Sources/iOS/RaisedButton.swift
+4
-4
Sources/iOS/RemindersController.swift
+4
-4
Sources/iOS/RootController.swift
+8
-8
Sources/iOS/SearchBar.swift
+4
-4
Sources/iOS/SearchBarController.swift
+4
-4
Sources/iOS/Snackbar.swift
+4
-4
Sources/iOS/SnackbarController.swift
+4
-4
Sources/iOS/StatusBarController.swift
+4
-4
Sources/iOS/TabBar.swift
+4
-4
Sources/iOS/TableViewCell.swift
+5
-5
Sources/iOS/TextField.swift
+5
-5
Sources/iOS/TextView.swift
+5
-5
Sources/iOS/Toolbar.swift
+4
-4
Sources/iOS/ToolbarController.swift
+4
-4
Sources/iOS/View.swift
+5
-5
No files found.
Material.xcodeproj/project.pbxproj
View file @
a969227d
...
...
@@ -13,7 +13,7 @@
96264BE71D833D2800576F37
/* Reminders.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96264BE61D833D2800576F37
/* Reminders.swift */
;
};
96264BE91D833D3400576F37
/* RemindersController.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96264BE81D833D3400576F37
/* RemindersController.swift */
;
};
96264C0E1D84051900576F37
/* Checkbox.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96264C0D1D84051900576F37
/* Checkbox.swift */
;
};
96264C121D840B5F00576F37
/*
TitleCard.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96264C111D840B5F00576F37
/* Title
Card.swift */
;
};
96264C121D840B5F00576F37
/*
ContentCard.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
96264C111D840B5F00576F37
/* Content
Card.swift */
;
};
9628645A1D53FE3E00690B69
/* Material+UIWindow.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
962864591D53FE3E00690B69
/* Material+UIWindow.swift */
;
};
9628645F1D540AF300690B69
/* DynamicFontType.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
9628645E1D540AF300690B69
/* DynamicFontType.swift */
;
};
962864621D54111D00690B69
/* JSON.swift in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
962864611D54111D00690B69
/* JSON.swift */
;
};
...
...
@@ -208,7 +208,7 @@
96264BE61D833D2800576F37
/* Reminders.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Reminders.swift
;
sourceTree
=
"<group>"
;
};
96264BE81D833D3400576F37
/* RemindersController.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
RemindersController.swift
;
sourceTree
=
"<group>"
;
};
96264C0D1D84051900576F37
/* Checkbox.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Checkbox.swift
;
sourceTree
=
"<group>"
;
};
96264C111D840B5F00576F37
/*
TitleCard.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Title
Card.swift
;
sourceTree
=
"<group>"
;
};
96264C111D840B5F00576F37
/*
ContentCard.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
Content
Card.swift
;
sourceTree
=
"<group>"
;
};
962864591D53FE3E00690B69
/* Material+UIWindow.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
"Material+UIWindow.swift"
;
sourceTree
=
"<group>"
;
};
9628645E1D540AF300690B69
/* DynamicFontType.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
DynamicFontType.swift
;
sourceTree
=
"<group>"
;
};
962864611D54111D00690B69
/* JSON.swift */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.swift
;
path
=
JSON.swift
;
sourceTree
=
"<group>"
;
};
...
...
@@ -630,7 +630,7 @@
96BCB8021CB40F3B00C806FE
/* Card */
=
{
isa
=
PBXGroup
;
children
=
(
96264C111D840B5F00576F37
/*
Title
Card.swift */
,
96264C111D840B5F00576F37
/*
Content
Card.swift */
,
96BCB75D1CB40DC500C806FE
/* Card.swift */
,
96BCB7621CB40DC500C806FE
/* ImageCard.swift */
,
);
...
...
@@ -1141,7 +1141,7 @@
96BCB7CD1CB40DC500C806FE
/* PulseView.swift in Sources */
,
96BCB7DA1CB40DC500C806FE
/* NavigationController.swift in Sources */
,
96BCB7A81CB40DC500C806FE
/* FabButton.swift in Sources */
,
96264C121D840B5F00576F37
/*
Title
Card.swift in Sources */
,
96264C121D840B5F00576F37
/*
Content
Card.swift in Sources */
,
96BCB7E41CB40DC500C806FE
/* Text.swift in Sources */
,
96BCB7AB1CB40DC500C806FE
/* ImageCard.swift in Sources */
,
96BCB7CB1CB40DC500C806FE
/* PulseAnimation.swift in Sources */
,
...
...
Sources/iOS/BarView.swift
View file @
a969227d
...
...
@@ -70,13 +70,13 @@ open class BarView: ContentView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
prepareDivider
()
}
...
...
Sources/iOS/BottomNavigationController.swift
View file @
a969227d
...
...
@@ -87,7 +87,7 @@ open class BottomNavigationController: UITabBarController, UITabBarControllerDel
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
prepare
View
()
prepare
()
}
open
override
func
viewWillLayoutSubviews
()
{
...
...
@@ -124,12 +124,12 @@ open class BottomNavigationController: UITabBarController, UITabBarControllerDel
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
view
.
clipsToBounds
=
true
view
.
contentScaleFactor
=
Device
.
scale
delegate
=
self
...
...
Sources/iOS/BottomTabBar.swift
View file @
a969227d
...
...
@@ -58,7 +58,7 @@ open class BottomTabBar: UITabBar {
*/
public
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
prepare
View
()
prepare
()
}
/// A convenience initializer.
...
...
@@ -68,7 +68,7 @@ open class BottomTabBar: UITabBar {
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
open
override
func
layoutSublayers
(
of
layer
:
CALayer
)
{
...
...
@@ -117,12 +117,12 @@ open class BottomTabBar: UITabBar {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
public
func
prepare
View
()
{
public
func
prepare
()
{
depthPreset
=
.
depth1
divider
.
alignment
=
.
top
contentScaleFactor
=
Device
.
scale
...
...
Sources/iOS/Button.swift
View file @
a969227d
...
...
@@ -103,7 +103,7 @@ open class Button: UIButton {
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -114,7 +114,7 @@ open class Button: UIButton {
*/
public
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
prepare
View
()
prepare
()
}
/// A convenience initializer.
...
...
@@ -224,12 +224,12 @@ open class Button: UIButton {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
contentScaleFactor
=
Device
.
scale
contentEdgeInsetsPreset
=
.
none
prepareVisualLayer
()
...
...
Sources/iOS/Capture.swift
View file @
a969227d
...
...
@@ -312,13 +312,13 @@ open class Capture: View, UIGestureRecognizerDelegate {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
backgroundColor
=
Color
.
black
prepareCaptureSession
()
preparePreviewView
()
...
...
Sources/iOS/CapturePreview.swift
View file @
a969227d
...
...
@@ -58,13 +58,13 @@ open class CapturePreview: View {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
preparePreviewLayer
()
}
...
...
Sources/iOS/Card.swift
View file @
a969227d
...
...
@@ -392,10 +392,10 @@ open class Card: PulseView {
}
/**
:name: prepare
View
:name: prepare
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
depthPreset
=
.
depth1
dividerColor
=
Color
.
grey
.
lighten3
cornerRadiusPreset
=
.
cornerRadius1
...
...
Sources/iOS/CollectionReusableView.swift
View file @
a969227d
...
...
@@ -177,7 +177,7 @@ open class MaterialCollectionReusableView: UICollectionReusableView {
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
contentsGravityPreset
=
.
ResizeAspectFill
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -189,7 +189,7 @@ open class MaterialCollectionReusableView: UICollectionReusableView {
public
override
init
(
frame
:
CGRect
)
{
contentsGravityPreset
=
.
ResizeAspectFill
super
.
init
(
frame
:
frame
)
prepare
View
()
prepare
()
}
/// A convenience initializer.
...
...
@@ -261,12 +261,12 @@ open class MaterialCollectionReusableView: UICollectionReusableView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
contentScaleFactor
=
Device
.
scale
pulseAnimation
=
.
none
prepareVisualLayer
()
...
...
Sources/iOS/CollectionView.swift
View file @
a969227d
...
...
@@ -84,7 +84,7 @@ open class CollectionView: UICollectionView {
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -94,7 +94,7 @@ open class CollectionView: UICollectionView {
*/
public
override
init
(
frame
:
CGRect
,
collectionViewLayout
layout
:
UICollectionViewLayout
)
{
super
.
init
(
frame
:
frame
,
collectionViewLayout
:
layout
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -103,7 +103,7 @@ open class CollectionView: UICollectionView {
*/
public
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
,
collectionViewLayout
:
CollectionViewLayout
())
prepare
View
()
prepare
()
}
/// A convenience initializer that initializes the object.
...
...
@@ -113,12 +113,12 @@ open class CollectionView: UICollectionView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
contentScaleFactor
=
Device
.
scale
backgroundColor
=
Color
.
clear
contentInset
=
.
zero
...
...
Sources/iOS/CollectionViewCell.swift
View file @
a969227d
...
...
@@ -187,7 +187,7 @@ open class CollectionViewCell: UICollectionViewCell {
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
contentsGravityPreset
=
.
ResizeAspectFill
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -199,7 +199,7 @@ open class CollectionViewCell: UICollectionViewCell {
public
override
init
(
frame
:
CGRect
)
{
contentsGravityPreset
=
.
ResizeAspectFill
super
.
init
(
frame
:
frame
)
prepare
View
()
prepare
()
}
/// A convenience initializer.
...
...
@@ -271,12 +271,12 @@ open class CollectionViewCell: UICollectionViewCell {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
contentScaleFactor
=
Device
.
scale
prepareVisualLayer
()
prepareDivider
()
...
...
Sources/iOS/
Title
Card.swift
→
Sources/iOS/
Content
Card.swift
View file @
a969227d
...
...
@@ -30,14 +30,14 @@
import
UIKit
open
class
Title
Card
:
PulseView
{
/// An internal reference to the title
B
ar.
internal
var
internalTitle
B
ar
:
Toolbar
?
open
class
Content
Card
:
PulseView
{
/// An internal reference to the title
Toolb
ar.
internal
var
internalTitle
Toolb
ar
:
Toolbar
?
/// A reference to the title
B
ar.
open
var
title
B
ar
:
Toolbar
{
prepareTitle
B
ar
()
return
internalTitle
B
ar
!
/// A reference to the title
Toolb
ar.
open
var
title
Toolb
ar
:
Toolbar
{
prepareTitle
Toolb
ar
()
return
internalTitle
Toolb
ar
!
}
/// An internal reference to the contentView.
...
...
@@ -49,24 +49,24 @@ open class TitleCard: PulseView {
return
internalContentView
!
}
/// An internal reference to the detail
B
ar.
internal
var
internalDetail
B
ar
:
Toolbar
?
/// An internal reference to the detail
Toolb
ar.
internal
var
internalDetail
Toolb
ar
:
Toolbar
?
/// A reference to the detail
B
ar.
open
var
detail
B
ar
:
Toolbar
{
prepareDetail
B
ar
()
return
internalDetail
B
ar
!
/// A reference to the detail
Toolb
ar.
open
var
detail
Toolb
ar
:
Toolbar
{
prepareDetail
Toolb
ar
()
return
internalDetail
Toolb
ar
!
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
pulseAnimation
=
.
none
}
...
...
@@ -81,12 +81,12 @@ open class TitleCard: PulseView {
}
/// Prepares the title
B
ar.
private
func
prepareTitle
B
ar
()
{
guard
nil
==
internalTitle
B
ar
else
{
/// Prepares the title
Toolb
ar.
private
func
prepareTitle
Toolb
ar
()
{
guard
nil
==
internalTitle
Toolb
ar
else
{
return
}
internalTitle
B
ar
=
Toolbar
()
internalTitle
Toolb
ar
=
Toolbar
()
}
/// Prepares the contentView.
...
...
@@ -97,11 +97,11 @@ open class TitleCard: PulseView {
internalContentView
=
UIView
()
}
/// Prepares the detail
B
ar.
private
func
prepareDetail
B
ar
()
{
guard
nil
==
internalDetail
B
ar
else
{
/// Prepares the detail
Toolb
ar.
private
func
prepareDetail
Toolb
ar
()
{
guard
nil
==
internalDetail
Toolb
ar
else
{
return
}
internalDetail
B
ar
=
Toolbar
()
internalDetail
Toolb
ar
=
Toolbar
()
}
}
Sources/iOS/ContentView.swift
View file @
a969227d
...
...
@@ -217,13 +217,13 @@ open class ContentView: View {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
prepareContentView
()
}
...
...
Sources/iOS/ErrorTextField.swift
View file @
a969227d
...
...
@@ -40,13 +40,13 @@ public class ErrorTextField: TextField {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
override
public
func
prepare
View
()
{
super
.
prepare
View
()
override
public
func
prepare
()
{
super
.
prepare
()
revealError
=
false
detailColor
=
Color
.
red
.
base
}
...
...
Sources/iOS/FabButton.swift
View file @
a969227d
...
...
@@ -33,13 +33,13 @@ import UIKit
open
class
FabButton
:
Button
{
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
depthPreset
=
.
depth1
shapePreset
=
.
circle
pulseAnimation
=
.
centerWithBacking
...
...
Sources/iOS/FlatButton.swift
View file @
a969227d
...
...
@@ -33,13 +33,13 @@ import UIKit
open
class
FlatButton
:
Button
{
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
cornerRadiusPreset
=
.
cornerRadius1
}
}
Sources/iOS/IconButton.swift
View file @
a969227d
...
...
@@ -33,13 +33,13 @@ import UIKit
open
class
IconButton
:
Button
{
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
pulseAnimation
=
.
center
}
}
Sources/iOS/ImageCard.swift
View file @
a969227d
...
...
@@ -540,10 +540,10 @@ open class ImageCard: PulseView {
}
/**
:name: prepare
View
:name: prepare
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
depthPreset
=
.
depth1
dividerColor
=
Color
.
grey
.
lighten3
cornerRadiusPreset
=
.
cornerRadius1
...
...
Sources/iOS/Label.swift
View file @
a969227d
...
...
@@ -120,7 +120,7 @@ open class Label: UILabel {
wrapped
=
true
contentsScale
=
Device
.
scale
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -130,7 +130,7 @@ open class Label: UILabel {
wrapped
=
true
contentsScale
=
Device
.
scale
super
.
init
(
frame
:
frame
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -148,9 +148,9 @@ open class Label: UILabel {
}
/**
:name: prepare
View
:name: prepare
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
contentScaleFactor
=
Device
.
scale
textAlignment
=
.
left
}
...
...
Sources/iOS/Menu.swift
View file @
a969227d
...
...
@@ -131,13 +131,13 @@ open class Menu: View {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
backgroundColor
=
nil
interimSpacePreset
=
.
interimSpace6
}
...
...
Sources/iOS/MenuController.swift
View file @
a969227d
...
...
@@ -116,13 +116,13 @@ open class MenuController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
prepareMenuView
()
}
...
...
Sources/iOS/NavigationBar.swift
View file @
a969227d
...
...
@@ -133,7 +133,7 @@ open class NavigationBar: UINavigationBar {
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -144,7 +144,7 @@ open class NavigationBar: UINavigationBar {
*/
public
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
prepare
View
()
prepare
()
}
/// A convenience initializer.
...
...
@@ -286,12 +286,12 @@ open class NavigationBar: UINavigationBar {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
public
func
prepare
View
()
{
public
func
prepare
()
{
barStyle
=
.
black
isTranslucent
=
false
depthPreset
=
.
depth1
...
...
Sources/iOS/NavigationController.swift
View file @
a969227d
...
...
@@ -91,7 +91,7 @@ open class NavigationController: UINavigationController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
prepare
View
()
prepare
()
}
open
override
func
viewDidAppear
(
_
animated
:
Bool
)
{
...
...
@@ -106,12 +106,12 @@ open class NavigationController: UINavigationController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
view
.
clipsToBounds
=
true
view
.
backgroundColor
=
Color
.
white
view
.
contentScaleFactor
=
Device
.
scale
...
...
Sources/iOS/NavigationDrawerController.swift
View file @
a969227d
...
...
@@ -371,7 +371,7 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -381,7 +381,7 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
*/
public
override
init
(
nibName
nibNameOrNil
:
String
?,
bundle
nibBundleOrNil
:
Bundle
?)
{
super
.
init
(
nibName
:
nibNameOrNil
,
bundle
:
nibBundleOrNil
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -394,18 +394,18 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
super
.
init
(
rootViewController
:
rootViewController
)
self
.
leftViewController
=
leftViewController
self
.
rightViewController
=
rightViewController
prepare
View
()
prepare
()
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
prepareContentViewController
()
prepareLeftView
()
prepareRightView
()
...
...
@@ -888,21 +888,21 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
/// Prepares the contentViewController.
private
func
prepareContentViewController
()
{
contentViewController
.
view
.
backgroundColor
=
Color
.
black
prepare
View
ControllerWithinContainer
(
viewController
:
contentViewController
,
container
:
view
)
prepareControllerWithinContainer
(
viewController
:
contentViewController
,
container
:
view
)
view
.
sendSubview
(
toBack
:
contentViewController
.
view
)
}
/// A method that prepares the leftViewController.
private
func
prepareLeftViewController
()
{
if
let
v
:
View
=
leftView
{
prepare
View
ControllerWithinContainer
(
viewController
:
leftViewController
,
container
:
v
)
prepareControllerWithinContainer
(
viewController
:
leftViewController
,
container
:
v
)
}
}
/// A method that prepares the rightViewController.
private
func
prepareRightViewController
()
{
if
let
v
:
View
=
rightView
{
prepare
View
ControllerWithinContainer
(
viewController
:
rightViewController
,
container
:
v
)
prepareControllerWithinContainer
(
viewController
:
rightViewController
,
container
:
v
)
}
}
...
...
Sources/iOS/PageTabBarController.swift
View file @
a969227d
...
...
@@ -34,15 +34,15 @@ import UIKit
private
var
PageTabBarItemKey
:
UInt8
=
0
open
class
PageTabBarItem
:
FlatButton
{
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
pulseAnimation
=
.
none
}
}
open
class
PageTabBar
:
TabBar
{
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
isLineAnimated
=
false
lineAlignment
=
.
top
}
...
...
@@ -180,13 +180,13 @@ open class PageTabBarController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
preparePageTabBar
()
}
...
...
Sources/iOS/PhotoLibraryController.swift
View file @
a969227d
...
...
@@ -36,17 +36,17 @@ open class PhotoLibraryController: UIViewController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
prepare
View
()
prepare
()
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
view
.
clipsToBounds
=
true
view
.
backgroundColor
=
Color
.
white
view
.
contentScaleFactor
=
Device
.
scale
...
...
Sources/iOS/RaisedButton.swift
View file @
a969227d
...
...
@@ -33,13 +33,13 @@ import UIKit
open
class
RaisedButton
:
Button
{
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
depthPreset
=
.
depth1
cornerRadiusPreset
=
.
cornerRadius1
backgroundColor
=
Color
.
white
...
...
Sources/iOS/RemindersController.swift
View file @
a969227d
...
...
@@ -36,17 +36,17 @@ open class RemindersController: UIViewController {
open
override
func
viewDidLoad
()
{
super
.
viewDidLoad
()
prepare
View
()
prepare
()
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
view
.
clipsToBounds
=
true
view
.
backgroundColor
=
Color
.
white
view
.
contentScaleFactor
=
Device
.
scale
...
...
Sources/iOS/RootController.swift
View file @
a969227d
...
...
@@ -70,7 +70,7 @@ open class RootController: UIViewController {
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -80,7 +80,7 @@ open class RootController: UIViewController {
*/
public
override
init
(
nibName
nibNameOrNil
:
String
?,
bundle
nibBundleOrNil
:
Bundle
?)
{
super
.
init
(
nibName
:
nibNameOrNil
,
bundle
:
nibBundleOrNil
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -90,7 +90,7 @@ open class RootController: UIViewController {
public
init
(
rootViewController
:
UIViewController
)
{
super
.
init
(
nibName
:
nil
,
bundle
:
nil
)
self
.
rootViewController
=
rootViewController
prepare
View
()
prepare
()
}
open
override
func
viewWillLayoutSubviews
()
{
...
...
@@ -145,12 +145,12 @@ open class RootController: UIViewController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
view
.
clipsToBounds
=
true
view
.
backgroundColor
=
Color
.
white
view
.
contentScaleFactor
=
Device
.
scale
...
...
@@ -160,7 +160,7 @@ open class RootController: UIViewController {
/// A method that prepares the rootViewController.
internal
func
prepareRootViewController
()
{
prepare
View
ControllerWithinContainer
(
viewController
:
rootViewController
,
container
:
view
)
prepareControllerWithinContainer
(
viewController
:
rootViewController
,
container
:
view
)
}
/**
...
...
@@ -171,7 +171,7 @@ open class RootController: UIViewController {
- Parameter container: A UIView that is the parent of the
passed in controller view within the view hierarchy.
*/
internal
func
prepare
View
ControllerWithinContainer
(
viewController
:
UIViewController
?,
container
:
UIView
)
{
internal
func
prepareControllerWithinContainer
(
viewController
:
UIViewController
?,
container
:
UIView
)
{
if
let
v
:
UIViewController
=
viewController
{
addChildViewController
(
v
)
container
.
addSubview
(
v
.
view
)
...
...
Sources/iOS/SearchBar.swift
View file @
a969227d
...
...
@@ -127,13 +127,13 @@ open class SearchBar: BarView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
interimSpacePreset
=
.
interimSpace3
contentEdgeInsetsPreset
=
.
square1
prepareTextField
()
...
...
Sources/iOS/SearchBarController.swift
View file @
a969227d
...
...
@@ -73,13 +73,13 @@ open class SearchBarController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
prepareSearchBar
()
}
...
...
Sources/iOS/Snackbar.swift
View file @
a969227d
...
...
@@ -86,13 +86,13 @@ open class Snackbar: BarView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
depthPreset
=
.
none
interimSpacePreset
=
.
interimSpace8
contentEdgeInsets
.
left
=
interimSpace
...
...
Sources/iOS/SnackbarController.swift
View file @
a969227d
...
...
@@ -163,13 +163,13 @@ open class SnackbarController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
prepareSnackbar
()
}
...
...
Sources/iOS/StatusBarController.swift
View file @
a969227d
...
...
@@ -66,13 +66,13 @@ open class StatusBarController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
prepareStatusBarView
()
}
...
...
Sources/iOS/TabBar.swift
View file @
a969227d
...
...
@@ -199,13 +199,13 @@ open class TabBar: BarView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
autoresizingMask
=
.
flexibleWidth
prepareLine
()
...
...
Sources/iOS/TableViewCell.swift
View file @
a969227d
...
...
@@ -68,7 +68,7 @@ open class TableViewCell: UITableViewCell {
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -78,7 +78,7 @@ open class TableViewCell: UITableViewCell {
*/
public
override
init
(
style
:
UITableViewCellStyle
,
reuseIdentifier
:
String
!
)
{
super
.
init
(
style
:
style
,
reuseIdentifier
:
reuseIdentifier
)
prepare
View
()
prepare
()
}
open
override
func
layoutSublayers
(
of
layer
:
CALayer
)
{
...
...
@@ -145,12 +145,12 @@ open class TableViewCell: UITableViewCell {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
selectionStyle
=
.
none
separatorInset
=
.
zero
contentScaleFactor
=
Device
.
scale
...
...
Sources/iOS/TextField.swift
View file @
a969227d
...
...
@@ -291,7 +291,7 @@ open class TextField: UITextField {
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -302,7 +302,7 @@ open class TextField: UITextField {
*/
public
override
init
(
frame
:
CGRect
)
{
super
.
init
(
frame
:
frame
)
prepare
View
()
prepare
()
}
/// A convenience initializer.
...
...
@@ -359,12 +359,12 @@ open class TextField: UITextField {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
super
.
placeholder
=
nil
clipsToBounds
=
false
borderStyle
=
.
none
...
...
Sources/iOS/TextView.swift
View file @
a969227d
...
...
@@ -114,7 +114,7 @@ public class TextView: UITextView {
*/
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -126,7 +126,7 @@ public class TextView: UITextView {
*/
public
override
init
(
frame
:
CGRect
,
textContainer
:
NSTextContainer
?)
{
super
.
init
(
frame
:
frame
,
textContainer
:
textContainer
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -214,12 +214,12 @@ public class TextView: UITextView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
public
func
prepare
View
()
{
public
func
prepare
()
{
contentScaleFactor
=
Device
.
scale
textContainerInset
=
.
zero
backgroundColor
=
Color
.
white
...
...
Sources/iOS/Toolbar.swift
View file @
a969227d
...
...
@@ -140,13 +140,13 @@ open class Toolbar: BarView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
contentViewAlignment
=
.
center
interimSpacePreset
=
.
interimSpace3
contentEdgeInsetsPreset
=
.
square1
...
...
Sources/iOS/ToolbarController.swift
View file @
a969227d
...
...
@@ -176,13 +176,13 @@ open class ToolbarController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
override
func
prepare
View
()
{
super
.
prepare
View
()
open
override
func
prepare
()
{
super
.
prepare
()
prepareToolbar
()
}
...
...
Sources/iOS/View.swift
View file @
a969227d
...
...
@@ -132,7 +132,7 @@ open class View: UIView {
public
required
init
?(
coder
aDecoder
:
NSCoder
)
{
contentsGravityPreset
=
.
ResizeAspectFill
super
.
init
(
coder
:
aDecoder
)
prepare
View
()
prepare
()
}
/**
...
...
@@ -144,7 +144,7 @@ open class View: UIView {
public
override
init
(
frame
:
CGRect
)
{
contentsGravityPreset
=
.
ResizeAspectFill
super
.
init
(
frame
:
frame
)
prepare
View
()
prepare
()
}
/// A convenience initializer.
...
...
@@ -167,12 +167,12 @@ open class View: UIView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepare
View
method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepare
View
method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open
func
prepare
View
()
{
open
func
prepare
()
{
contentScaleFactor
=
Device
.
scale
backgroundColor
=
Color
.
white
prepareVisualLayer
()
...
...
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