Commit a969227d by Daniel Dahan

development: renamed prepareView to prepare

parent ae1deec3
......@@ -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 /* TitleCard.swift */; };
96264C121D840B5F00576F37 /* ContentCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96264C111D840B5F00576F37 /* ContentCard.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 = TitleCard.swift; sourceTree = "<group>"; };
96264C111D840B5F00576F37 /* ContentCard.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContentCard.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 /* TitleCard.swift */,
96264C111D840B5F00576F37 /* ContentCard.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 /* TitleCard.swift in Sources */,
96264C121D840B5F00576F37 /* ContentCard.swift in Sources */,
96BCB7E41CB40DC500C806FE /* Text.swift in Sources */,
96BCB7AB1CB40DC500C806FE /* ImageCard.swift in Sources */,
96BCB7CB1CB40DC500C806FE /* PulseAnimation.swift in Sources */,
......
......@@ -70,13 +70,13 @@ open class BarView: ContentView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
prepareDivider()
}
......
......@@ -87,7 +87,7 @@ open class BottomNavigationController: UITabBarController, UITabBarControllerDel
open override func viewDidLoad() {
super.viewDidLoad()
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
view.clipsToBounds = true
view.contentScaleFactor = Device.scale
delegate = self
......
......@@ -58,7 +58,7 @@ open class BottomTabBar: UITabBar {
*/
public override init(frame: CGRect) {
super.init(frame: frame)
prepareView()
prepare()
}
/// A convenience initializer.
......@@ -68,7 +68,7 @@ open class BottomTabBar: UITabBar {
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
public func prepareView() {
public func prepare() {
depthPreset = .depth1
divider.alignment = .top
contentScaleFactor = Device.scale
......
......@@ -103,7 +103,7 @@ open class Button: UIButton {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -114,7 +114,7 @@ open class Button: UIButton {
*/
public override init(frame: CGRect) {
super.init(frame: frame)
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
contentScaleFactor = Device.scale
contentEdgeInsetsPreset = .none
prepareVisualLayer()
......
......@@ -312,13 +312,13 @@ open class Capture: View, UIGestureRecognizerDelegate {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
backgroundColor = Color.black
prepareCaptureSession()
preparePreviewView()
......
......@@ -58,13 +58,13 @@ open class CapturePreview: View {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
preparePreviewLayer()
}
......
......@@ -392,10 +392,10 @@ open class Card: PulseView {
}
/**
:name: prepareView
:name: prepare
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
depthPreset = .depth1
dividerColor = Color.grey.lighten3
cornerRadiusPreset = .cornerRadius1
......
......@@ -177,7 +177,7 @@ open class MaterialCollectionReusableView: UICollectionReusableView {
public required init?(coder aDecoder: NSCoder) {
contentsGravityPreset = .ResizeAspectFill
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -189,7 +189,7 @@ open class MaterialCollectionReusableView: UICollectionReusableView {
public override init(frame: CGRect) {
contentsGravityPreset = .ResizeAspectFill
super.init(frame: frame)
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
contentScaleFactor = Device.scale
pulseAnimation = .none
prepareVisualLayer()
......
......@@ -84,7 +84,7 @@ open class CollectionView: UICollectionView {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -94,7 +94,7 @@ open class CollectionView: UICollectionView {
*/
public override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {
super.init(frame: frame, collectionViewLayout: layout)
prepareView()
prepare()
}
/**
......@@ -103,7 +103,7 @@ open class CollectionView: UICollectionView {
*/
public init(frame: CGRect) {
super.init(frame: frame, collectionViewLayout: CollectionViewLayout())
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
contentScaleFactor = Device.scale
backgroundColor = Color.clear
contentInset = .zero
......
......@@ -187,7 +187,7 @@ open class CollectionViewCell: UICollectionViewCell {
public required init?(coder aDecoder: NSCoder) {
contentsGravityPreset = .ResizeAspectFill
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -199,7 +199,7 @@ open class CollectionViewCell: UICollectionViewCell {
public override init(frame: CGRect) {
contentsGravityPreset = .ResizeAspectFill
super.init(frame: frame)
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
contentScaleFactor = Device.scale
prepareVisualLayer()
prepareDivider()
......
......@@ -30,14 +30,14 @@
import UIKit
open class TitleCard: PulseView {
/// An internal reference to the titleBar.
internal var internalTitleBar: Toolbar?
open class ContentCard: PulseView {
/// An internal reference to the titleToolbar.
internal var internalTitleToolbar: Toolbar?
/// A reference to the titleBar.
open var titleBar: Toolbar {
prepareTitleBar()
return internalTitleBar!
/// A reference to the titleToolbar.
open var titleToolbar: Toolbar {
prepareTitleToolbar()
return internalTitleToolbar!
}
/// An internal reference to the contentView.
......@@ -49,24 +49,24 @@ open class TitleCard: PulseView {
return internalContentView!
}
/// An internal reference to the detailBar.
internal var internalDetailBar: Toolbar?
/// An internal reference to the detailToolbar.
internal var internalDetailToolbar: Toolbar?
/// A reference to the detailBar.
open var detailBar: Toolbar {
prepareDetailBar()
return internalDetailBar!
/// A reference to the detailToolbar.
open var detailToolbar: Toolbar {
prepareDetailToolbar()
return internalDetailToolbar!
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
pulseAnimation = .none
}
......@@ -81,12 +81,12 @@ open class TitleCard: PulseView {
}
/// Prepares the titleBar.
private func prepareTitleBar() {
guard nil == internalTitleBar else {
/// Prepares the titleToolbar.
private func prepareTitleToolbar() {
guard nil == internalTitleToolbar else {
return
}
internalTitleBar = Toolbar()
internalTitleToolbar = Toolbar()
}
/// Prepares the contentView.
......@@ -97,11 +97,11 @@ open class TitleCard: PulseView {
internalContentView = UIView()
}
/// Prepares the detailBar.
private func prepareDetailBar() {
guard nil == internalDetailBar else {
/// Prepares the detailToolbar.
private func prepareDetailToolbar() {
guard nil == internalDetailToolbar else {
return
}
internalDetailBar = Toolbar()
internalDetailToolbar = Toolbar()
}
}
......@@ -217,13 +217,13 @@ open class ContentView: View {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
prepareContentView()
}
......
......@@ -40,13 +40,13 @@ public class ErrorTextField: TextField {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
override public func prepareView() {
super.prepareView()
override public func prepare() {
super.prepare()
revealError = false
detailColor = Color.red.base
}
......
......@@ -33,13 +33,13 @@ import UIKit
open class FabButton: Button {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
depthPreset = .depth1
shapePreset = .circle
pulseAnimation = .centerWithBacking
......
......@@ -33,13 +33,13 @@ import UIKit
open class FlatButton: Button {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
cornerRadiusPreset = .cornerRadius1
}
}
......@@ -33,13 +33,13 @@ import UIKit
open class IconButton: Button {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
pulseAnimation = .center
}
}
......@@ -540,10 +540,10 @@ open class ImageCard: PulseView {
}
/**
:name: prepareView
:name: prepare
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
depthPreset = .depth1
dividerColor = Color.grey.lighten3
cornerRadiusPreset = .cornerRadius1
......
......@@ -120,7 +120,7 @@ open class Label: UILabel {
wrapped = true
contentsScale = Device.scale
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -130,7 +130,7 @@ open class Label: UILabel {
wrapped = true
contentsScale = Device.scale
super.init(frame: frame)
prepareView()
prepare()
}
/**
......@@ -148,9 +148,9 @@ open class Label: UILabel {
}
/**
:name: prepareView
:name: prepare
*/
open func prepareView() {
open func prepare() {
contentScaleFactor = Device.scale
textAlignment = .left
}
......
......@@ -131,13 +131,13 @@ open class Menu: View {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
backgroundColor = nil
interimSpacePreset = .interimSpace6
}
......
......@@ -116,13 +116,13 @@ open class MenuController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
prepareMenuView()
}
......
......@@ -133,7 +133,7 @@ open class NavigationBar: UINavigationBar {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -144,7 +144,7 @@ open class NavigationBar: UINavigationBar {
*/
public override init(frame: CGRect) {
super.init(frame: frame)
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
public func prepareView() {
public func prepare() {
barStyle = .black
isTranslucent = false
depthPreset = .depth1
......
......@@ -91,7 +91,7 @@ open class NavigationController: UINavigationController {
open override func viewDidLoad() {
super.viewDidLoad()
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
view.clipsToBounds = true
view.backgroundColor = Color.white
view.contentScaleFactor = Device.scale
......
......@@ -371,7 +371,7 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
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)
prepareView()
prepare()
}
/**
......@@ -394,18 +394,18 @@ open class NavigationDrawerController: RootController, UIGestureRecognizerDelega
super.init(rootViewController: rootViewController)
self.leftViewController = leftViewController
self.rightViewController = rightViewController
prepareView()
prepare()
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
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
prepareViewControllerWithinContainer(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 {
prepareViewControllerWithinContainer(viewController: leftViewController, container: v)
prepareControllerWithinContainer(viewController: leftViewController, container: v)
}
}
/// A method that prepares the rightViewController.
private func prepareRightViewController() {
if let v: View = rightView {
prepareViewControllerWithinContainer(viewController: rightViewController, container: v)
prepareControllerWithinContainer(viewController: rightViewController, container: v)
}
}
......
......@@ -34,15 +34,15 @@ import UIKit
private var PageTabBarItemKey: UInt8 = 0
open class PageTabBarItem: FlatButton {
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
pulseAnimation = .none
}
}
open class PageTabBar: TabBar {
open override func prepareView() {
super.prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
preparePageTabBar()
}
......
......@@ -36,17 +36,17 @@ open class PhotoLibraryController: UIViewController {
open override func viewDidLoad() {
super.viewDidLoad()
prepareView()
prepare()
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
view.clipsToBounds = true
view.backgroundColor = Color.white
view.contentScaleFactor = Device.scale
......
......@@ -33,13 +33,13 @@ import UIKit
open class RaisedButton: Button {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
depthPreset = .depth1
cornerRadiusPreset = .cornerRadius1
backgroundColor = Color.white
......
......@@ -36,17 +36,17 @@ open class RemindersController: UIViewController {
open override func viewDidLoad() {
super.viewDidLoad()
prepareView()
prepare()
}
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
view.clipsToBounds = true
view.backgroundColor = Color.white
view.contentScaleFactor = Device.scale
......
......@@ -70,7 +70,7 @@ open class RootController: UIViewController {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -80,7 +80,7 @@ open class RootController: UIViewController {
*/
public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
prepareView()
prepare()
}
/**
......@@ -90,7 +90,7 @@ open class RootController: UIViewController {
public init(rootViewController: UIViewController) {
super.init(nibName: nil, bundle: nil)
self.rootViewController = rootViewController
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
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() {
prepareViewControllerWithinContainer(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 prepareViewControllerWithinContainer(viewController: UIViewController?, container: UIView) {
internal func prepareControllerWithinContainer(viewController: UIViewController?, container: UIView) {
if let v: UIViewController = viewController {
addChildViewController(v)
container.addSubview(v.view)
......
......@@ -127,13 +127,13 @@ open class SearchBar: BarView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
interimSpacePreset = .interimSpace3
contentEdgeInsetsPreset = .square1
prepareTextField()
......
......@@ -73,13 +73,13 @@ open class SearchBarController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
prepareSearchBar()
}
......
......@@ -86,13 +86,13 @@ open class Snackbar: BarView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
depthPreset = .none
interimSpacePreset = .interimSpace8
contentEdgeInsets.left = interimSpace
......
......@@ -163,13 +163,13 @@ open class SnackbarController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
prepareSnackbar()
}
......
......@@ -66,13 +66,13 @@ open class StatusBarController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
prepareStatusBarView()
}
......
......@@ -199,13 +199,13 @@ open class TabBar: BarView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
autoresizingMask = .flexibleWidth
prepareLine()
......
......@@ -68,7 +68,7 @@ open class TableViewCell: UITableViewCell {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -78,7 +78,7 @@ open class TableViewCell: UITableViewCell {
*/
public override init(style: UITableViewCellStyle, reuseIdentifier: String!) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
selectionStyle = .none
separatorInset = .zero
contentScaleFactor = Device.scale
......
......@@ -291,7 +291,7 @@ open class TextField: UITextField {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -302,7 +302,7 @@ open class TextField: UITextField {
*/
public override init(frame: CGRect) {
super.init(frame: frame)
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
super.placeholder = nil
clipsToBounds = false
borderStyle = .none
......
......@@ -114,7 +114,7 @@ public class TextView: UITextView {
*/
public required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -126,7 +126,7 @@ public class TextView: UITextView {
*/
public override init(frame: CGRect, textContainer: NSTextContainer?) {
super.init(frame: frame, textContainer: textContainer)
prepareView()
prepare()
}
/**
......@@ -214,12 +214,12 @@ public class TextView: UITextView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
public func prepareView() {
public func prepare() {
contentScaleFactor = Device.scale
textContainerInset = .zero
backgroundColor = Color.white
......
......@@ -140,13 +140,13 @@ open class Toolbar: BarView {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
contentViewAlignment = .center
interimSpacePreset = .interimSpace3
contentEdgeInsetsPreset = .square1
......
......@@ -176,13 +176,13 @@ open class ToolbarController: RootController {
/**
Prepares the view instance when intialized. When subclassing,
it is recommended to override the prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open override func prepareView() {
super.prepareView()
open override func prepare() {
super.prepare()
prepareToolbar()
}
......
......@@ -132,7 +132,7 @@ open class View: UIView {
public required init?(coder aDecoder: NSCoder) {
contentsGravityPreset = .ResizeAspectFill
super.init(coder: aDecoder)
prepareView()
prepare()
}
/**
......@@ -144,7 +144,7 @@ open class View: UIView {
public override init(frame: CGRect) {
contentsGravityPreset = .ResizeAspectFill
super.init(frame: frame)
prepareView()
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 prepareView method
it is recommended to override the prepare method
to initialize property values and other setup operations.
The super.prepareView method should always be called immediately
The super.prepare method should always be called immediately
when subclassing.
*/
open func prepareView() {
open func prepare() {
contentScaleFactor = Device.scale
backgroundColor = Color.white
prepareVisualLayer()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment