Commit 4bd00a90 by Daniel Dahan

development: renamed Event to Events and refined API

parent ff3a3716
...@@ -40,8 +40,12 @@ ...@@ -40,8 +40,12 @@
96328B9E1E05C24E009A4C90 /* TableView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96328B961E05C0BB009A4C90 /* TableView.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96328B9E1E05C24E009A4C90 /* TableView.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96328B961E05C0BB009A4C90 /* TableView.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96328B9F1E05C24E009A4C90 /* TableViewController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96328B981E05C0CE009A4C90 /* TableViewController.swift */; settings = {ATTRIBUTES = (Public, ); }; }; 96328B9F1E05C24E009A4C90 /* TableViewController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 96328B981E05C0CE009A4C90 /* TableViewController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
96334EF61C8B84660083986B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96334EF51C8B84660083986B /* Assets.xcassets */; }; 96334EF61C8B84660083986B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 96334EF51C8B84660083986B /* Assets.xcassets */; };
9639526C1EC3882F004BA9DE /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9639526A1EC3882F004BA9DE /* Event.swift */; }; 9639526C1EC3882F004BA9DE /* Events.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9639526A1EC3882F004BA9DE /* Events.swift */; };
9639526D1EC3882F004BA9DE /* EventController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9639526B1EC3882F004BA9DE /* EventController.swift */; }; 9639526D1EC3882F004BA9DE /* EventsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9639526B1EC3882F004BA9DE /* EventsController.swift */; };
964335B71EC9432400FA9954 /* Events.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9639526A1EC3882F004BA9DE /* Events.swift */; settings = {ATTRIBUTES = (Public, ); }; };
964335B81EC9432400FA9954 /* EventsController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9639526B1EC3882F004BA9DE /* EventsController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
964335B91EC9432400FA9954 /* Material+MotionDynamics.swift in Headers */ = {isa = PBXBuildFile; fileRef = 960E35051EB0FC5700EB124A /* Material+MotionDynamics.swift */; settings = {ATTRIBUTES = (Public, ); }; };
964335BA1EC9432400FA9954 /* TabsController.swift in Headers */ = {isa = PBXBuildFile; fileRef = 9606CFAB1E957AC3006B4E74 /* TabsController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
965E80CC1DD4C50600D61E4B /* Bar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7981CB40DC500C806FE /* Bar.swift */; }; 965E80CC1DD4C50600D61E4B /* Bar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7981CB40DC500C806FE /* Bar.swift */; };
965E80CD1DD4C50600D61E4B /* Button.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7701CB40DC500C806FE /* Button.swift */; }; 965E80CD1DD4C50600D61E4B /* Button.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB7701CB40DC500C806FE /* Button.swift */; };
965E80CE1DD4C50600D61E4B /* FABButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB75F1CB40DC500C806FE /* FABButton.swift */; }; 965E80CE1DD4C50600D61E4B /* FABButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 96BCB75F1CB40DC500C806FE /* FABButton.swift */; };
...@@ -206,8 +210,8 @@ ...@@ -206,8 +210,8 @@
96328B981E05C0CE009A4C90 /* TableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = "<group>"; }; 96328B981E05C0CE009A4C90 /* TableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = "<group>"; };
96334EF51C8B84660083986B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 96334EF51C8B84660083986B /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
963832361B88DFD80015F710 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Material.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 963832361B88DFD80015F710 /* Material.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Material.framework; sourceTree = BUILT_PRODUCTS_DIR; };
9639526A1EC3882F004BA9DE /* Event.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Event.swift; sourceTree = "<group>"; }; 9639526A1EC3882F004BA9DE /* Events.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Events.swift; sourceTree = "<group>"; };
9639526B1EC3882F004BA9DE /* EventController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventController.swift; sourceTree = "<group>"; }; 9639526B1EC3882F004BA9DE /* EventsController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EventsController.swift; sourceTree = "<group>"; };
963FBEFC1D669510008F8512 /* Snackbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Snackbar.swift; sourceTree = "<group>"; }; 963FBEFC1D669510008F8512 /* Snackbar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Snackbar.swift; sourceTree = "<group>"; };
965532281E47E388005C2792 /* SpringAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpringAnimation.swift; sourceTree = "<group>"; }; 965532281E47E388005C2792 /* SpringAnimation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SpringAnimation.swift; sourceTree = "<group>"; };
9658F2161CD6FA4700B902C1 /* IconButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IconButton.swift; sourceTree = "<group>"; }; 9658F2161CD6FA4700B902C1 /* IconButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IconButton.swift; sourceTree = "<group>"; };
...@@ -394,13 +398,12 @@ ...@@ -394,13 +398,12 @@
name = Products; name = Products;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
963952691EC3882F004BA9DE /* Event */ = { 963952691EC3882F004BA9DE /* Events */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
9639526A1EC3882F004BA9DE /* Event.swift */, 9639526A1EC3882F004BA9DE /* Events.swift */,
9639526B1EC3882F004BA9DE /* EventController.swift */, 9639526B1EC3882F004BA9DE /* EventsController.swift */,
); );
name = Event;
path = Events; path = Events;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
...@@ -509,7 +512,7 @@ ...@@ -509,7 +512,7 @@
96328B9A1E05C135009A4C90 /* Data */, 96328B9A1E05C135009A4C90 /* Data */,
96BCB80B1CB410CC00C806FE /* Device */, 96BCB80B1CB410CC00C806FE /* Device */,
96230AB61D6A51FD00AF47DC /* Divider */, 96230AB61D6A51FD00AF47DC /* Divider */,
963952691EC3882F004BA9DE /* Event */, 963952691EC3882F004BA9DE /* Events */,
96BCB80A1CB410A100C806FE /* Extension */, 96BCB80A1CB410A100C806FE /* Extension */,
963FBF021D6696D0008F8512 /* FABMenu */, 963FBF021D6696D0008F8512 /* FABMenu */,
96BCB8071CB4101C00C806FE /* Font */, 96BCB8071CB4101C00C806FE /* Font */,
...@@ -826,6 +829,10 @@ ...@@ -826,6 +829,10 @@
96BFC16D1E63C10A0075DE1F /* Material+Motion.swift in Headers */, 96BFC16D1E63C10A0075DE1F /* Material+Motion.swift in Headers */,
96BFC16E1E63C10A0075DE1F /* Material+MotionAnimation.swift in Headers */, 96BFC16E1E63C10A0075DE1F /* Material+MotionAnimation.swift in Headers */,
96BFC16F1E63C10A0075DE1F /* SpringAnimation.swift in Headers */, 96BFC16F1E63C10A0075DE1F /* SpringAnimation.swift in Headers */,
964335B71EC9432400FA9954 /* Events.swift in Headers */,
964335B81EC9432400FA9954 /* EventsController.swift in Headers */,
964335B91EC9432400FA9954 /* Material+MotionDynamics.swift in Headers */,
964335BA1EC9432400FA9954 /* TabsController.swift in Headers */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -936,11 +943,11 @@ ...@@ -936,11 +943,11 @@
965E81191DD4D5C800D61E4B /* SnackbarController.swift in Sources */, 965E81191DD4D5C800D61E4B /* SnackbarController.swift in Sources */,
965E811A1DD4D5C800D61E4B /* StatusBarController.swift in Sources */, 965E811A1DD4D5C800D61E4B /* StatusBarController.swift in Sources */,
965E811B1DD4D5C800D61E4B /* Switch.swift in Sources */, 965E811B1DD4D5C800D61E4B /* Switch.swift in Sources */,
9639526C1EC3882F004BA9DE /* Event.swift in Sources */, 9639526C1EC3882F004BA9DE /* Events.swift in Sources */,
965E811C1DD4D5C800D61E4B /* TabBar.swift in Sources */, 965E811C1DD4D5C800D61E4B /* TabBar.swift in Sources */,
965E811D1DD4D5C800D61E4B /* TableViewCell.swift in Sources */, 965E811D1DD4D5C800D61E4B /* TableViewCell.swift in Sources */,
965E811E1DD4D5C800D61E4B /* TextField.swift in Sources */, 965E811E1DD4D5C800D61E4B /* TextField.swift in Sources */,
9639526D1EC3882F004BA9DE /* EventController.swift in Sources */, 9639526D1EC3882F004BA9DE /* EventsController.swift in Sources */,
965E811F1DD4D5C800D61E4B /* ErrorTextField.swift in Sources */, 965E811F1DD4D5C800D61E4B /* ErrorTextField.swift in Sources */,
965E81211DD4D5C800D61E4B /* TextStorage.swift in Sources */, 965E81211DD4D5C800D61E4B /* TextStorage.swift in Sources */,
965E81221DD4D5C800D61E4B /* TextView.swift in Sources */, 965E81221DD4D5C800D61E4B /* TextView.swift in Sources */,
......
...@@ -32,15 +32,15 @@ import UIKit ...@@ -32,15 +32,15 @@ import UIKit
extension UIViewController { extension UIViewController {
/** /**
A convenience property that provides access to the EventController. A convenience property that provides access to the EventsController.
This is the recommended method of accessing the EventController This is the recommended method of accessing the EventsController
through child UIViewControllers. through child UIViewControllers.
*/ */
public var eventController: EventController? { public var eventsController: EventsController? {
var viewController: UIViewController? = self var viewController: UIViewController? = self
while nil != viewController { while nil != viewController {
if viewController is EventController { if viewController is EventsController {
return viewController as? EventController return viewController as? EventsController
} }
viewController = viewController?.parent viewController = viewController?.parent
} }
...@@ -48,9 +48,9 @@ extension UIViewController { ...@@ -48,9 +48,9 @@ extension UIViewController {
} }
} }
open class EventController: UIViewController { open class EventsController: UIViewController {
/// A reference to an Event instance. /// A reference to an Events instance.
open let event = Event() open let events = Events()
open override func viewDidLoad() { open override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -68,15 +68,15 @@ open class EventController: UIViewController { ...@@ -68,15 +68,15 @@ open class EventController: UIViewController {
view.clipsToBounds = true view.clipsToBounds = true
view.backgroundColor = .white view.backgroundColor = .white
view.contentScaleFactor = Screen.scale view.contentScaleFactor = Screen.scale
prepareEvent() prepareEvents()
} }
} }
extension EventController { extension EventsController {
/// Prepares the event instance. /// Prepares the events instance.
fileprivate func prepareEvent() { fileprivate func prepareEvents() {
event.delegate = self events.delegate = self
} }
} }
extension EventController: EventDelegate {} extension EventsController: EventsDelegate {}
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