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