Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

panel appearance callbacks in manager #29

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
PanelPinSide axes check
  • Loading branch information
omiz committed Feb 18, 2019
commit 4ca53327a1f8759989bc0f8a9e3abaa8e88f2224
21 changes: 21 additions & 0 deletions PanelKit/Model/PanelPinSide.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,27 @@ import Foundation
case bottom
}

public extension PanelPinSide {

public var isVertical: Bool {

let sides: [PanelPinSide]

sides = [.top, .bottom]

return sides.contains(self)
}

public var isHorizontal: Bool {

let sides: [PanelPinSide]

sides = [.left, .right]

return sides.contains(self)
}
}

extension PanelPinSide: CustomStringConvertible {

public var description: String {
Expand Down