diff --git a/MVMCoreUI/Behaviors/PageBehavior.swift b/MVMCoreUI/Behaviors/PageBehavior.swift deleted file mode 100644 index aaf915a1..00000000 --- a/MVMCoreUI/Behaviors/PageBehavior.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// PageBehaviors.swift -// MVMCoreUI -// -// Created by Kyle on 5/8/20. -// Copyright © 2020 Verizon Wireless. All rights reserved. -// - -import Foundation - -public protocol PageBehaviorProtocol: ModelProtocol { - - /// The type of rule - var behaviorName: String { get } -} - -public extension PageBehaviorProtocol { - - var behaviorName: String { - get { Self.identifier } - } - - static var categoryCodingKey: String { - "behaviorName" - } - - static var categoryName: String { - "\(PageBehaviorProtocol.self)" - } -} - -public protocol PageVisibilityBehavior: PageBehaviorProtocol { - - func onPageShown() - func onPageHidden() -} - -public protocol PageScrolledBehavior: PageBehaviorProtocol { - - func pageScrolled(scrollView: UIScrollView) -} - -public protocol PageBehaviorsTemplateProtocol { - - var behaviors: [PageBehaviorProtocol]? { get set } - -} - -public extension PageBehaviorsTemplateProtocol { - mutating func add(behavior: PageBehaviorProtocol) { - var newBehaviors = behaviors ?? [] - newBehaviors.append(behavior) - self.behaviors = newBehaviors - } -} - -public extension MVMCoreUIDelegateObject { - weak var behaviorTemplateDelegate: (PageBehaviorsTemplateProtocol & NSObjectProtocol)? { - get { - return (moleculeDelegate as? PageProtocol)?.pageModel as? (PageBehaviorsTemplateProtocol & NSObjectProtocol) - } - } -}