From b6470982947b0ad4cb3454c33525ec743cce9f75 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 00:33:19 +0100 Subject: [PATCH 01/37] Minor update to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d92c7b7..adcbb53 100644 --- a/README.md +++ b/README.md @@ -258,4 +258,4 @@ Artwork by [Vitaliy Gorbachev][7] [peek]: https://shaps.me/peek [preview]: https://github.com/shaps80/Peek/raw/master/preview.jpg [vimeo]: https://player.vimeo.com/video/261323610 -[gif]: https://github.com/shaps80/Peek/raw/master/preview.gif +[gif]: https://github.com/shaps80/Peek/raw/master/preview.gif \ No newline at end of file From bd728a9dce2b1b1a725f63b305881937674396fc Mon Sep 17 00:00:00 2001 From: Shaps Date: Mon, 26 Mar 2018 00:49:36 +0100 Subject: [PATCH 02/37] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index adcbb53..d92c7b7 100644 --- a/README.md +++ b/README.md @@ -258,4 +258,4 @@ Artwork by [Vitaliy Gorbachev][7] [peek]: https://shaps.me/peek [preview]: https://github.com/shaps80/Peek/raw/master/preview.jpg [vimeo]: https://player.vimeo.com/video/261323610 -[gif]: https://github.com/shaps80/Peek/raw/master/preview.gif \ No newline at end of file +[gif]: https://github.com/shaps80/Peek/raw/master/preview.gif From 7ed5f066bfabd97e19b9eada0bbf75963e2fc58a Mon Sep 17 00:00:00 2001 From: Shaps Date: Mon, 26 Mar 2018 00:50:12 +0100 Subject: [PATCH 03/37] Update README.md From a81cde2de3990ba3071ca2a8cde7dad388ba31de Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 00:50:43 +0100 Subject: [PATCH 04/37] Minor changes --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d92c7b7..adcbb53 100644 --- a/README.md +++ b/README.md @@ -258,4 +258,4 @@ Artwork by [Vitaliy Gorbachev][7] [peek]: https://shaps.me/peek [preview]: https://github.com/shaps80/Peek/raw/master/preview.jpg [vimeo]: https://player.vimeo.com/video/261323610 -[gif]: https://github.com/shaps80/Peek/raw/master/preview.gif +[gif]: https://github.com/shaps80/Peek/raw/master/preview.gif \ No newline at end of file From f576d47bda430f09999bff7fb004de1772f0534d Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 12:59:02 +0100 Subject: [PATCH 05/37] Minor typo in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index adcbb53..3b57501 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Peek allows many options to be configured, allowing you more control over how Pe ```swift window?.peek.enableWithOptions { options in options.theme = .black - options.activationMode = .Auto + options.activationMode = .auto options.shouldIgnoreContainers = true /* @@ -258,4 +258,4 @@ Artwork by [Vitaliy Gorbachev][7] [peek]: https://shaps.me/peek [preview]: https://github.com/shaps80/Peek/raw/master/preview.jpg [vimeo]: https://player.vimeo.com/video/261323610 -[gif]: https://github.com/shaps80/Peek/raw/master/preview.gif \ No newline at end of file +[gif]: https://github.com/shaps80/Peek/raw/master/preview.gif From 30e3e6cb5deed7a17389d4fe5d9b57d4046860f2 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 15:10:52 +0100 Subject: [PATCH 06/37] Refactored the project to use the theme object for all styling --- Example/NotTwitter/AppDelegate.swift | 2 +- .../Accessory Views/BoolAccessoryView.swift | 10 ++- .../Inspectors/CollapsibleSections.swift | 12 +-- .../Inspectors/PreviewCell.swift | 1 - .../Layout/PeekLayoutOverlayView.swift | 6 +- .../Overlays/Layout/PeekLayoutView.swift | 10 +-- .../Overlays/Layout/PeekMetricView.swift | 4 +- .../Overlays/PeekButton.swift | 9 ++- .../Overlays/PeekOverlayView.swift | 7 +- .../PeekInspectorViewController.swift | 22 +++--- .../PeekSectionedViewController.swift | 12 +-- .../PeekViewController.swift | 6 +- .../Reporting/ReportViewController.swift | 6 +- Pod/Classes/Helpers/Color+Extensions.swift | 78 +++++++++---------- Pod/Classes/Images/Images+Inspectors.swift | 10 +-- Pod/Classes/Peek.swift | 2 +- Pod/Classes/PeekOptions.swift | 60 +++++++++++++- Pod/Classes/VolumeController.swift | 4 +- 18 files changed, 161 insertions(+), 100 deletions(-) diff --git a/Example/NotTwitter/AppDelegate.swift b/Example/NotTwitter/AppDelegate.swift index 5d01cd2..5bba679 100644 --- a/Example/NotTwitter/AppDelegate.swift +++ b/Example/NotTwitter/AppDelegate.swift @@ -18,7 +18,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { Theme.apply() window?.peek.enableWithOptions { options in - options.theme = .dark + options.theme = .light options.activationMode = .auto options.ignoresContainerViews = false diff --git a/Pod/Classes/Accessory Views/BoolAccessoryView.swift b/Pod/Classes/Accessory Views/BoolAccessoryView.swift index 8f4f917..c40517a 100644 --- a/Pod/Classes/Accessory Views/BoolAccessoryView.swift +++ b/Pod/Classes/Accessory Views/BoolAccessoryView.swift @@ -25,12 +25,16 @@ import UIKit /// This accessory view is used in Peek to show a 'switch' representing the underlying Bool value final class BoolAccessoryView: UIView { + private let theme: PeekTheme fileprivate let size = CGSize(width: 30, height: 20) fileprivate let value: Bool - init(value: Bool) { + init(value: Bool, theme: PeekTheme = .dark) { + self.theme = theme self.value = value + super.init(frame: CGRect(x: 0, y: 0, width: size.width, height: size.height)) + self.backgroundColor = UIColor.clear if #available(iOS 11.0, *) { @@ -55,11 +59,11 @@ final class BoolAccessoryView: UIView { if value { bgColor = UIColor(white: 1, alpha: 0.2) - fgColor = .primaryTint + fgColor = theme.tintColor fgPath = UIBezierPath(ovalIn: CGRect(x: rect.maxX - rect.height, y: rect.minY, width: rect.height, height: rect.height)) } else { bgColor = UIColor(white: 1, alpha: 0.2) - fgColor = .neutral + fgColor = theme.secondaryTextColor fgPath = UIBezierPath(ovalIn: CGRect(x: rect.minX, y: rect.minY, width: rect.height, height: rect.height)) } diff --git a/Pod/Classes/Controllers & Views/Inspectors/CollapsibleSections.swift b/Pod/Classes/Controllers & Views/Inspectors/CollapsibleSections.swift index 38a4f31..260271f 100644 --- a/Pod/Classes/Controllers & Views/Inspectors/CollapsibleSections.swift +++ b/Pod/Classes/Controllers & Views/Inspectors/CollapsibleSections.swift @@ -58,11 +58,6 @@ internal final class CollapsibleSectionHeaderView: UITableViewHeaderFooterView { super.init(reuseIdentifier: reuseIdentifier) - let thickness: CGFloat = 1.5 - let size = CGSize(width: 13 + thickness, height: 8 + thickness) - imageView.image = Images.disclosure(size: size, thickness: thickness) - - imageView.tintColor = .neutral label.numberOfLines = 0 contentView.addSubview(imageView, constraints: [ @@ -97,9 +92,14 @@ internal final class CollapsibleSectionHeaderView: UITableViewHeaderFooterView { }) } - func prepareHeader(for section: Int, delegate: CollapsibleSectionHeaderViewDelegate) { + func prepareHeader(for section: Int, theme: PeekTheme = .dark, delegate: CollapsibleSectionHeaderViewDelegate) { tag = section self.delegate = delegate + + let thickness: CGFloat = 1.5 + let size = CGSize(width: 13 + thickness, height: 8 + thickness) + imageView.image = Images.disclosure(size: size, thickness: thickness, theme: theme) + imageView.tintColor = theme.tintColor } internal required init?(coder aDecoder: NSCoder) { diff --git a/Pod/Classes/Controllers & Views/Inspectors/PreviewCell.swift b/Pod/Classes/Controllers & Views/Inspectors/PreviewCell.swift index 11380bc..f240291 100644 --- a/Pod/Classes/Controllers & Views/Inspectors/PreviewCell.swift +++ b/Pod/Classes/Controllers & Views/Inspectors/PreviewCell.swift @@ -20,7 +20,6 @@ internal final class PreviewCell: UITableViewCell { previewImageView.setContentHuggingPriority(.defaultLow, for: .horizontal) previewImageView.setContentHuggingPriority(.required, for: .vertical) previewImageView.setContentCompressionResistancePriority(.required, for: .vertical) - previewImageView.tintColor = .primaryTint super.init(style: .value1, reuseIdentifier: reuseIdentifier) diff --git a/Pod/Classes/Controllers & Views/Overlays/Layout/PeekLayoutOverlayView.swift b/Pod/Classes/Controllers & Views/Overlays/Layout/PeekLayoutOverlayView.swift index 6498bc8..9b0ee5c 100644 --- a/Pod/Classes/Controllers & Views/Overlays/Layout/PeekLayoutOverlayView.swift +++ b/Pod/Classes/Controllers & Views/Overlays/Layout/PeekLayoutOverlayView.swift @@ -10,14 +10,14 @@ import UIKit internal final class PeekLayoutOverlayView: PeekOverlayView { private lazy var layoutView: PeekLayoutView = { - let view = PeekLayoutView(overlayView: self, borderColor: UIColor(white: 1, alpha: 0.5), borderWidth: 1, dashed: true) + let view = PeekLayoutView(overlayView: self, borderColor: UIColor(white: 1, alpha: 0.5), borderWidth: 1, dashed: true, theme: theme) view.layer.zPosition = 0 addSubview(view) return view }() - internal override init() { - super.init() + override init(theme: PeekTheme = .dark) { + super.init(theme: theme) // TODO: Needs to be true once its implemented allowsMultipleSelection = false } diff --git a/Pod/Classes/Controllers & Views/Overlays/Layout/PeekLayoutView.swift b/Pod/Classes/Controllers & Views/Overlays/Layout/PeekLayoutView.swift index 7069e01..0ab15fd 100644 --- a/Pod/Classes/Controllers & Views/Overlays/Layout/PeekLayoutView.swift +++ b/Pod/Classes/Controllers & Views/Overlays/Layout/PeekLayoutView.swift @@ -66,13 +66,13 @@ internal final class PeekLayoutView: PeekSelectionView { internal let rightMetric: PeekMetricView internal let bottomMetric: PeekMetricView - init(overlayView: PeekOverlayView, borderColor: UIColor?, borderWidth: CGFloat, dashed: Bool) { + init(overlayView: PeekOverlayView, borderColor: UIColor?, borderWidth: CGFloat, dashed: Bool, theme: PeekTheme = .dark) { self.overlayView = overlayView - leftMetric = PeekMetricView() - topMetric = PeekMetricView() - rightMetric = PeekMetricView() - bottomMetric = PeekMetricView() + leftMetric = PeekMetricView(theme: theme) + topMetric = PeekMetricView(theme: theme) + rightMetric = PeekMetricView(theme: theme) + bottomMetric = PeekMetricView(theme: theme) rightMetric.translatesAutoresizingMaskIntoConstraints = false topMetric.translatesAutoresizingMaskIntoConstraints = false diff --git a/Pod/Classes/Controllers & Views/Overlays/Layout/PeekMetricView.swift b/Pod/Classes/Controllers & Views/Overlays/Layout/PeekMetricView.swift index d11cbc4..c10153e 100644 --- a/Pod/Classes/Controllers & Views/Overlays/Layout/PeekMetricView.swift +++ b/Pod/Classes/Controllers & Views/Overlays/Layout/PeekMetricView.swift @@ -54,10 +54,10 @@ internal final class PeekMetricView: UIVisualEffectView { fatalError() } - init() { + init(theme: PeekTheme = .dark) { label = UILabel(frame: .zero) label.font = UIFont.systemFont(ofSize: 11, weight: .semibold) - label.textColor = .textDark + label.textColor = theme.primaryTextColor label.textAlignment = .center label.setContentCompressionResistancePriority(.required, for: .horizontal) diff --git a/Pod/Classes/Controllers & Views/Overlays/PeekButton.swift b/Pod/Classes/Controllers & Views/Overlays/PeekButton.swift index 77fa443..f357665 100644 --- a/Pod/Classes/Controllers & Views/Overlays/PeekButton.swift +++ b/Pod/Classes/Controllers & Views/Overlays/PeekButton.swift @@ -37,9 +37,12 @@ internal final class PeekButton: UIControl { return UIImageView(image: Images.attributes) }() - internal override init(frame: CGRect) { - super.init(frame: frame) - + private let theme: PeekTheme + + internal init(theme: PeekTheme) { + self.theme = theme + super.init(frame: .zero) + if #available(iOS 11.0, *) { accessibilityIgnoresInvertColors = true } diff --git a/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift b/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift index ec35f2f..e4dc9a2 100644 --- a/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift +++ b/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift @@ -53,7 +53,7 @@ internal class PeekOverlayView: UIView { }() internal private(set) lazy var primarySelectionView: PeekSelectionView = { - let view = PeekSelectionView(borderColor: .primaryTint, borderWidth: 1.5) + let view = PeekSelectionView(borderColor: theme.overlayTintColor, borderWidth: 1.5) addSubview(view) return view }() @@ -64,7 +64,10 @@ internal class PeekOverlayView: UIView { return view }() - internal init() { + internal private(set) var theme: PeekTheme + + internal init(theme: PeekTheme = .dark) { + self.theme = theme super.init(frame: .zero) if #available(iOS 11.0, *) { diff --git a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift index a63a2c1..3bb2640 100644 --- a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift @@ -22,7 +22,7 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U controller.searchBar.searchBarStyle = .minimal controller.searchBar.barTintColor = navigationController?.navigationBar.barTintColor controller.searchBar.tintColor = navigationController?.navigationBar.tintColor - controller.searchBar.backgroundColor = peek.options.theme == .black ? .inspectorBlack : .inspectorDark + controller.searchBar.backgroundColor = peek.options.theme.backgroundColor controller.searchBar.isTranslucent = false controller.searchBar.keyboardAppearance = .dark controller.searchBar.autocorrectionType = .yes @@ -46,7 +46,7 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U button.frame = CGRect(x: 0, y: 0, width: 100, height: 24) button.titleLabel?.font = UIFont.systemFont(ofSize: 14, weight: .medium) button.setTitleColor(.white, for: .normal) - button.backgroundColor = .counter + button.backgroundColor = peek.options.theme.editingCounterColor button.layer.cornerRadius = button.bounds.height / 2 button.layer.masksToBounds = true return button @@ -103,8 +103,7 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil) } - let backgroundColor: UIColor? = peek.options.theme == .dark ? .inspectorDark : .inspectorBlack - tableView.backgroundColor = backgroundColor + tableView.backgroundColor = peek.options.theme.backgroundColor prepareNavigationItems(animated: false) @@ -140,7 +139,7 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U override func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { guard let header = super.tableView(tableView, viewForHeaderInSection: section) as? CollapsibleSectionHeaderView else { fatalError() } - header.prepareHeader(for: section, delegate: self) + header.prepareHeader(for: section, theme: peek.options.theme, delegate: self) return header } @@ -172,6 +171,7 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U if let preview = attribute as? PreviewAttribute, let cell = tableView.dequeueReusableCell(withIdentifier: "PreviewCell", for: indexPath) as? PreviewCell { cell.previewImageView.image = preview.image + cell.previewImageView.tintColor = peek.options.theme.tintColor cell.contentView.backgroundColor = peek.options.theme.backgroundColor cell.backgroundColor = peek.options.theme.backgroundColor return cell @@ -243,7 +243,7 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U case is NSNumber: if let value = value as? NSNumber { text = NumberTransformer().transformedValue(value) as? String - accessoryView = value.isBool() ? BoolAccessoryView(value: value.boolValue) : nil + accessoryView = value.isBool() ? BoolAccessoryView(value: value.boolValue, theme: peek.options.theme) : nil } case is UIColor: if let value = value as? UIColor { @@ -340,11 +340,11 @@ extension PeekInspectorViewController { navigationItem.setRightBarButton(send, animated: animated) UIView.animate(withDuration: animated ? 0.25 : 0) { - self.navigationController?.navigationBar.backgroundColor = .editingTint + self.navigationController?.navigationBar.backgroundColor = self.peek.options.theme.editingColor self.navigationController?.navigationBar.tintColor = .white } - tableView.tintColor = .editingTint + tableView.tintColor = peek.options.theme.editingColor navigationItem.titleView = reportButton } else { if #available(iOS 11.0, *) { @@ -355,7 +355,7 @@ extension PeekInspectorViewController { } let size = CGSize(width: 22, height: 12) - let disclosure = Images.disclosure(size: size, thickness: 2) + let disclosure = Images.disclosure(size: size, thickness: 2, theme: peek.options.theme) let close = UIBarButtonItem(image: disclosure, style: .plain, target: self, action: #selector(dismissController)) navigationItem.setRightBarButton(close, animated: animated) @@ -379,10 +379,10 @@ extension PeekInspectorViewController { UIView.animate(withDuration: animated ? 0.25 : 0) { self.navigationController?.navigationBar.backgroundColor = self.peek.options.theme.backgroundColor - self.navigationController?.navigationBar.tintColor = .primaryTint + self.navigationController?.navigationBar.tintColor = self.peek.options.theme.tintColor } - tableView.tintColor = .primaryTint + tableView.tintColor = peek.options.theme.tintColor navigationItem.titleView = nil } } diff --git a/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift b/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift index dadbc92..bbd9acf 100644 --- a/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift @@ -47,9 +47,9 @@ internal class PeekSectionedViewController: UIViewController, UITableViewDelegat guard let cell = tableView.dequeueReusableCell(withIdentifier: "InspectorCell", for: indexPath) as? InspectorCell else { fatalError() } cell.detailTextLabel?.font = UIFont.preferredFont(forTextStyle: .body) - cell.detailTextLabel?.textColor = .textLight + cell.detailTextLabel?.textColor = peek.options.theme.primaryTextColor cell.textLabel?.font = UIFont.preferredFont(forTextStyle: .body) - cell.textLabel?.textColor = .neutral + cell.textLabel?.textColor = peek.options.theme.secondaryTextColor cell.accessoryView = nil cell.accessoryType = .none @@ -64,7 +64,7 @@ internal class PeekSectionedViewController: UIViewController, UITableViewDelegat header.contentView.backgroundColor = peek.options.theme.backgroundColor header.label.text = sectionTitle(for: section) header.label.font = UIFont.systemFont(ofSize: 15, weight: .black) - header.label.textColor = .textLight + header.label.textColor = peek.options.theme.primaryTextColor header.setExpanded(sectionIsExpanded(for: section)) return header } @@ -93,9 +93,9 @@ extension PeekSectionedViewController { navigationController?.navigationBar.shadowImage = UIImage() navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) navigationController?.navigationBar.backgroundColor = peek.options.theme.backgroundColor - navigationController?.navigationBar.tintColor = .primaryTint + navigationController?.navigationBar.tintColor = peek.options.theme.primaryTextColor navigationController?.navigationBar.titleTextAttributes = [ - .foregroundColor: UIColor.white, + .foregroundColor: peek.options.theme.primaryTextColor, .font: UIFont.systemFont(ofSize: 17, weight: .regular) ] @@ -112,7 +112,7 @@ extension PeekSectionedViewController { navigationItem.largeTitleDisplayMode = .always navigationController?.navigationBar.largeTitleTextAttributes = [ - .foregroundColor: UIColor.white + .foregroundColor: peek.options.theme.primaryTextColor ] } } diff --git a/Pod/Classes/Controllers & Views/PeekViewController.swift b/Pod/Classes/Controllers & Views/PeekViewController.swift index 33a3977..2746651 100644 --- a/Pod/Classes/Controllers & Views/PeekViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekViewController.swift @@ -43,13 +43,13 @@ final class PeekViewController: UIViewController, UIViewControllerTransitioningD fileprivate var models = [UIView]() internal lazy var peekView: PeekOverlayView = { - let view = PeekLayoutOverlayView() + let view = PeekLayoutOverlayView(theme: peek.options.theme) view.delegate = self return view }() lazy var attributesButton: PeekButton = { - let button = PeekButton(frame: .zero) + let button = PeekButton(theme: peek.options.theme) button.addTarget(self, action: #selector(showInspectors), for: .touchUpInside) return button }() @@ -116,7 +116,7 @@ final class PeekViewController: UIViewController, UIViewControllerTransitioningD } fileprivate func updateBackgroundColor(alpha: CGFloat) { - view.backgroundColor = UIColor.overlay?.withAlphaComponent(alpha) + view.backgroundColor = peek.options.theme.overlayBackgroundColor?.withAlphaComponent(alpha) let animation = CATransition() animation.type = kCATransitionFade diff --git a/Pod/Classes/Controllers & Views/Reporting/ReportViewController.swift b/Pod/Classes/Controllers & Views/Reporting/ReportViewController.swift index fe398b0..a06e87d 100644 --- a/Pod/Classes/Controllers & Views/Reporting/ReportViewController.swift +++ b/Pod/Classes/Controllers & Views/Reporting/ReportViewController.swift @@ -31,8 +31,8 @@ internal final class ReportViewController: PeekSectionedViewController { title = "Report" - includeJSONSwitch.onTintColor = .editingTint - includeScreenshotSwitch.onTintColor = .editingTint + includeJSONSwitch.onTintColor = peek.options.theme.editingColor + includeScreenshotSwitch.onTintColor = peek.options.theme.editingColor includeScreenshotSwitch.addTarget(self, action: #selector(toggleScreenshot(_:)), for: .valueChanged) includeJSONSwitch.addTarget(self, action: #selector(toggleJSON(_:)), for: .valueChanged) @@ -45,7 +45,7 @@ internal final class ReportViewController: PeekSectionedViewController { override func viewDidLoad() { super.viewDidLoad() - navigationController?.navigationBar.backgroundColor = .editingTint + navigationController?.navigationBar.backgroundColor = peek.options.theme.editingColor navigationController?.navigationBar.tintColor = .white let send = UIBarButtonItem(title: "Send", style: .plain, target: self, action: #selector(sendReport(_:))) diff --git a/Pod/Classes/Helpers/Color+Extensions.swift b/Pod/Classes/Helpers/Color+Extensions.swift index 2ef0096..0e7fff1 100644 --- a/Pod/Classes/Helpers/Color+Extensions.swift +++ b/Pod/Classes/Helpers/Color+Extensions.swift @@ -24,45 +24,45 @@ import UIKit extension UIColor { - internal static var overlay: UIColor? { - return .black - } - - internal static var separator: UIColor? { - return UIColor(white: 1, alpha: 0.1) - } - - internal static var inspectorBlack: UIColor? { - return .black - } - - internal static var inspectorDark: UIColor? { - return Color(hex: "1c1c1c")!.systemColor - } - - internal static var textDark: UIColor? { - return Color(hex: "1c1c1c")!.systemColor - } - - internal static var textLight: UIColor? { - return UIColor.white - } - - internal static var editingTint: UIColor? { - return Color(hex: "4CD863")!.systemColor - } - - internal static var counter: UIColor? { - return Color(hex: "3EB454")!.systemColor - } - - internal static var neutral: UIColor? { - return UIColor(white: 1, alpha: 0.6) - } - - internal static var primaryTint: UIColor? { - return Color(literalRed: 135, green: 252, blue: 112).systemColor - } +// internal static var overlay: UIColor? { +// return .black +// } +// +// internal static var separator: UIColor? { +// return UIColor(white: 1, alpha: 0.1) +// } +// +// internal static var inspectorBlack: UIColor? { +// return .black +// } +// +// internal static var inspectorDark: UIColor? { +// return Color(hex: "1c1c1c")!.systemColor +// } +// +// internal static var textDark: UIColor? { +// return Color(hex: "1c1c1c")!.systemColor +// } +// +// internal static var textLight: UIColor? { +// return UIColor.white +// } +// +// internal static var editingTint: UIColor? { +// return Color(hex: "4CD863")!.systemColor +// } +// +// internal static var counter: UIColor? { +// return Color(hex: "3EB454")!.systemColor +// } +// +// internal static var neutral: UIColor? { +// return UIColor(white: 1, alpha: 0.6) +// } +// +// internal static var primaryTint: UIColor? { +// return Color(literalRed: 135, green: 252, blue: 112).systemColor +// } internal var hslComponents:(hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat) { var h: CGFloat = 0, s: CGFloat = 0, l: CGFloat = 0, a: CGFloat = 0 diff --git a/Pod/Classes/Images/Images+Inspectors.swift b/Pod/Classes/Images/Images+Inspectors.swift index f3b99e2..d64b7a7 100644 --- a/Pod/Classes/Images/Images+Inspectors.swift +++ b/Pod/Classes/Images/Images+Inspectors.swift @@ -24,7 +24,7 @@ import UIKit final class Images { - static func disclosure(size: CGSize, thickness: CGFloat) -> UIImage { + static func disclosure(size: CGSize, thickness: CGFloat, theme: PeekTheme) -> UIImage { return ImageRenderer(size: size).image { context in let rect = context.format.bounds.insetBy(dx: thickness, dy: thickness) let path = UIBezierPath() @@ -37,14 +37,14 @@ final class Images { path.lineCapStyle = .round path.lineJoinStyle = .round - UIColor.white.setStroke() + theme.primaryTextColor?.setStroke() path.stroke() } } static var close: UIImage { return ImageRenderer(size: CGSize(width: 18, height: 18)).image { context in - let color = UIColor.neutral + let color = UIColor.black let thickness: CGFloat = 2 let rect = context.format.bounds.insetBy(dx: thickness, dy: thickness) @@ -54,12 +54,12 @@ final class Images { path.move(to: CGPoint(x: rect.maxX, y: rect.minY)) path.addLine(to: CGPoint(x: rect.minX, y: rect.maxY)) - color?.setStroke() + color.setStroke() path.lineCapStyle = .round path.lineJoinStyle = .round path.lineWidth = thickness path.stroke() - } + }.withRenderingMode(.alwaysTemplate) } internal static var attributes: UIImage { diff --git a/Pod/Classes/Peek.swift b/Pod/Classes/Peek.swift index 01f173a..68b9215 100644 --- a/Pod/Classes/Peek.swift +++ b/Pod/Classes/Peek.swift @@ -51,7 +51,7 @@ public final class Peek: NSObject { var supportedOrientations = UIInterfaceOrientationMask.all unowned var peekingWindow: UIWindow // since this is the app's window, we don't want to retain it! - fileprivate var activationController: PeekActivationController? + fileprivate var activationController: PeekActivating? fileprivate var volumeController: VolumeController? fileprivate(set) var options = PeekOptions() fileprivate(set) var window: UIWindow? // this is the Peek Overlay window, so we have to retain it! diff --git a/Pod/Classes/PeekOptions.swift b/Pod/Classes/PeekOptions.swift index 8f56297..4e0b9b2 100644 --- a/Pod/Classes/PeekOptions.swift +++ b/Pod/Classes/PeekOptions.swift @@ -38,15 +38,67 @@ public enum PeekActivationMode { public enum PeekTheme { case dark case black - // TODO - // case light + case light + + internal var overlayBackgroundColor: UIColor? { + return .black + } + + internal var overlayTintColor: UIColor? { + return Color(literalRed: 135, green: 252, blue: 112).systemColor + } internal var backgroundColor: UIColor? { switch self { - case .dark: return .inspectorDark - case .black: return .inspectorBlack + case .dark: return Color(hex: "1c1c1c")!.systemColor + case .black: return .black + case .light: return .white + } + } + + internal var separatorColor: UIColor? { + switch self { + case .dark: return UIColor(white: 1, alpha: 0.1) + case .black: return UIColor(white: 1, alpha: 0.1) + case .light: return UIColor(white: 0, alpha: 0.1) + } + } + + internal var primaryTextColor: UIColor? { + switch self { + case .dark: return .white + case .black: return .white + case .light: return .black + } + } + + internal var secondaryTextColor: UIColor? { + switch self { + case .dark: return UIColor(white: 1, alpha: 0.6) + case .black: return UIColor(white: 1, alpha: 0.6) + case .light: return Color(hex: "1c1c1c")!.systemColor + } + } + + internal var tintColor: UIColor? { + switch self { + case .dark: return Color(literalRed: 135, green: 252, blue: 112).systemColor + case .black: return Color(literalRed: 135, green: 252, blue: 112).systemColor + case .light: return Color(hex: "4CD863")!.systemColor } } + + internal var editingColor: UIColor? { + switch self { + case .dark: return Color(hex: "4CD863")!.systemColor + case .black: return Color(hex: "4CD863")!.systemColor + case .light: return Color(hex: "4CD863")!.systemColor + } + } + + internal var editingCounterColor: UIColor? { + return Color(hex: "3EB454")!.systemColor + } } /// Defines various options to use when enabling Peek diff --git a/Pod/Classes/VolumeController.swift b/Pod/Classes/VolumeController.swift index 0969e3d..d283b58 100644 --- a/Pod/Classes/VolumeController.swift +++ b/Pod/Classes/VolumeController.swift @@ -26,14 +26,14 @@ import MediaPlayer /** * Defines a controller that is responsible for presenting Peek */ -protocol PeekActivationController { +protocol PeekActivating { func register() func unregister() init(peek: Peek, handleActivation: @escaping () -> Void) } /// Defines an controller that activates Peek via your device Volume controls -final class VolumeController: NSObject, PeekActivationController { +final class VolumeController: NSObject, PeekActivating { unowned var peek: Peek fileprivate var volumeView: MPVolumeView! From 058c59bc79b6b05aafe8f609c44e24cfcff6e4d5 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 15:38:49 +0100 Subject: [PATCH 07/37] Finished implementing .light theme and perfomed some minor refactors --- Example/Pods/Pods.xcodeproj/project.pbxproj | 35 +++++++-------- ...ctorCell.swift => PeekInspectorCell.swift} | 3 +- .../PeekInspectorViewController.swift | 20 ++++++--- ...swift => PeekPresentationController.swift} | 6 +-- .../PeekSectionedViewController.swift | 19 +++----- .../Reporting/ReportViewController.swift | 2 +- .../UIViewController+Modal.swift | 2 +- Pod/Classes/Helpers/Color.swift | 8 ++-- Pod/Classes/Images/Images+Inspectors.swift | 2 +- Pod/Classes/PeekOptions.swift | 44 ++++++++++++++----- Pod/Classes/Peekable/UIColor+Peekable.swift | 4 +- .../Transformers/UIColor+Transformer.swift | 4 +- 12 files changed, 85 insertions(+), 64 deletions(-) rename Pod/Classes/Controllers & Views/Inspectors/{InspectorCell.swift => PeekInspectorCell.swift} (95%) rename Pod/Classes/Controllers & Views/{InspectorsPresentationController.swift => PeekPresentationController.swift} (98%) diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 770e4a5..1823a7a 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -3,11 +3,11 @@ archiveVersion = 1; classes = { }; - objectVersion = 47; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ - 0052FD84768A07D49701078802309663 /* InspectorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48780DCA506E871392725BE37BD60AC3 /* InspectorCell.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 0052FD84768A07D49701078802309663 /* PeekInspectorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48780DCA506E871392725BE37BD60AC3 /* PeekInspectorCell.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 053A288B8C9FCA64817AA164F7B75834 /* Enum+Cases.swift in Sources */ = {isa = PBXBuildFile; fileRef = F834A528ADB5E3FC93835DB9893D5D4E /* Enum+Cases.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 078AF4AC18434291749BC2B3B4E0B524 /* PeekMetricView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2537A4FC5D3B66C5A7F9E028F5D9B3B0 /* PeekMetricView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 0D3EDB6A56CBDC43F9C426FEB5401D7B /* Images+Orientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 005D553572F2976AC81883634FA9E570 /* Images+Orientation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -34,7 +34,7 @@ 49359FAC41EF19443EAAC69716CA0DE8 /* Peek-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FAEC4340D1686C8B769EBDA40FE03E12 /* Peek-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 494903ADB4568FE4CCB60BB817BF7FFF /* UIViewController+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D30F199C27941FE73DC412DF38923C /* UIViewController+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 4AA2F03BB903CC5B4AC45547A63AE18F /* UIControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD04AF7E8B1A8472992D54DC5CB933BC /* UIControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 4D13C10CDD840FA326BA0112C8468855 /* InspectorsPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27EBCA6E389C9D1DC8C76A6062FCBE8C /* InspectorsPresentationController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 4D13C10CDD840FA326BA0112C8468855 /* PeekPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27EBCA6E389C9D1DC8C76A6062FCBE8C /* PeekPresentationController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 523DEC438C16834BC0F4AECF247520AC /* ReportViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5C5038F904665E2FD8BC765D062B94D /* ReportViewController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5387F3461499EC1E0FED70C50B8C0B03 /* UISlider+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E7BD2DC1A6BCC9BD0FB33906852A948 /* UISlider+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5C0C8D2CFCB684AD5CF105C12F197E0D /* Images+Inspectors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 068888927B67451ECDD0455679695142 /* Images+Inspectors.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -120,7 +120,7 @@ 06A5EECB4251AA559C568344F93BD89B /* Peek.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Peek.xcconfig; sourceTree = ""; }; 0825E30A8ABB4C0609FA66150A2DDB7A /* Pods-NotTwitter-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-NotTwitter-acknowledgements.markdown"; sourceTree = ""; }; 09719C3CC5215377C350537944A89192 /* UITextView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITextView+Peekable.swift"; sourceTree = ""; }; - 0D2BB6CBBAB87C05DA883DE9A2320BB3 /* Pods_NotTwitter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_NotTwitter.framework; path = "Pods-NotTwitter.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0D2BB6CBBAB87C05DA883DE9A2320BB3 /* Pods_NotTwitter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NotTwitter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1C749367BACA995EC5C9A27EACABD47E /* ColorAccessoryView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ColorAccessoryView.swift; sourceTree = ""; }; 1E222DD791E9539A515F8FD7A1B39EB2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1E7BD2DC1A6BCC9BD0FB33906852A948 /* UISlider+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UISlider+Peekable.swift"; sourceTree = ""; }; @@ -128,7 +128,7 @@ 2327B847CA88BC70F973ACD26BC685FE /* CollapsibleSections.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CollapsibleSections.swift; sourceTree = ""; }; 2537A4FC5D3B66C5A7F9E028F5D9B3B0 /* PeekMetricView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekMetricView.swift; sourceTree = ""; }; 25533260A129F09B7C10D4AB5D1B0D8A /* UIColor+Transformer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+Transformer.swift"; sourceTree = ""; }; - 27EBCA6E389C9D1DC8C76A6062FCBE8C /* InspectorsPresentationController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = InspectorsPresentationController.swift; sourceTree = ""; }; + 27EBCA6E389C9D1DC8C76A6062FCBE8C /* PeekPresentationController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekPresentationController.swift; sourceTree = ""; }; 2D0FE5235F61B32F5D003D5845994B7C /* UIScrollView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Peekable.swift"; sourceTree = ""; }; 2F79E3AE2B43913B577A387104D53A18 /* Images+OrientationMask.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Images+OrientationMask.swift"; sourceTree = ""; }; 312AE50F424EF6CB1F62EDCC12AECA94 /* Color.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = ""; }; @@ -138,7 +138,7 @@ 40C3B3B06351A6EF60CCD0876E633213 /* NSNumber+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSNumber+Extensions.swift"; sourceTree = ""; }; 40FB951F7B86F4C0491C5E45731927C2 /* PeekButton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekButton.swift; sourceTree = ""; }; 418E4028C8BDD96BAA31629B1DE889D1 /* LayoutManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LayoutManager.swift; sourceTree = ""; }; - 48780DCA506E871392725BE37BD60AC3 /* InspectorCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = InspectorCell.swift; sourceTree = ""; }; + 48780DCA506E871392725BE37BD60AC3 /* PeekInspectorCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekInspectorCell.swift; sourceTree = ""; }; 48FC315E16CE484A3CBC2DF2FC0107BD /* Pods-NotTwitter.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-NotTwitter.modulemap"; sourceTree = ""; }; 4E2E5E9ABB478CFDFF53F3C538BA1A85 /* PeekLayoutView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekLayoutView.swift; sourceTree = ""; }; 4E5508AC826808D6BE9A4EB649EB6637 /* Pods-NotTwitter-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-NotTwitter-resources.sh"; sourceTree = ""; }; @@ -159,7 +159,7 @@ 7AF941F49979EAB3DD937C212AD14FD9 /* Peek-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Peek-dummy.m"; sourceTree = ""; }; 7B924F90D2D173F5D2B50A02F1CF6CDA /* UIProgressView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIProgressView+Peekable.swift"; sourceTree = ""; }; 7B95BD411F5FD11493207C2C18ACCFEF /* UIButton+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIButton+Peekable.swift"; sourceTree = ""; }; - 7C515995549889FD1810CBAE6E6C423D /* Peek.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = Peek.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 7C515995549889FD1810CBAE6E6C423D /* Peek.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = Peek.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 7E80F2EC5761F71B63A07FB7DACF296A /* UINavigationBar+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UINavigationBar+Peekable.swift"; sourceTree = ""; }; 7F62E2046F7ED2BA591588F5F53A64E0 /* Pods-NotTwitter.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-NotTwitter.debug.xcconfig"; sourceTree = ""; }; 80EA8038937B34C275BBD367F7ECD3B5 /* UIDevice+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIDevice+Peekable.swift"; sourceTree = ""; }; @@ -175,7 +175,7 @@ 8C1FD5AD5BF562B968FCA37B943F74EC /* Platforms.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Platforms.swift; sourceTree = ""; }; 8DA14D50846F0449CF0E84A18EE5159D /* UITextField+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITextField+Peekable.swift"; sourceTree = ""; }; 9373FB60422A142202EE7EE29FDE2B53 /* String+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 9A6925E13D83DC5DA76DF30BD76785FA /* VolumeController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VolumeController.swift; path = Pod/Classes/VolumeController.swift; sourceTree = ""; }; 9C9F1DBDEB67F1DC5776CE937B79D9C8 /* Peek.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Peek.swift; path = Pod/Classes/Peek.swift; sourceTree = ""; }; A1A39970A5620E5119B5DE39B946CB75 /* CGSize+Resize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGSize+Resize.swift"; sourceTree = ""; }; @@ -196,8 +196,8 @@ B8CC358289A677B621A061F4BDB2C61A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; BB7EF4BE2182CBDA0BE5E9F4A02AF8B5 /* Pods-NotTwitter-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-NotTwitter-frameworks.sh"; sourceTree = ""; }; BD04AF7E8B1A8472992D54DC5CB933BC /* UIControl+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIControl+Peekable.swift"; sourceTree = ""; }; - BE684CF6846D1660BEC2A4D2D03E314F /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; - BE7F872393FDB6F1C42F00B25D0979BE /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + BE684CF6846D1660BEC2A4D2D03E314F /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + BE7F872393FDB6F1C42F00B25D0979BE /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; C0C5FE31770F06314B098EA60BD07D3A /* UIStepper+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIStepper+Peekable.swift"; sourceTree = ""; }; C23D7639072EE47EB80B8321C7D50813 /* Pods-NotTwitter-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-NotTwitter-dummy.m"; sourceTree = ""; }; C32D7141488B86BD074AD238CE71404C /* UIWindow+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIWindow+Extensions.swift"; sourceTree = ""; }; @@ -214,7 +214,7 @@ E17105EBB6756B4338B84F8866F09D94 /* Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Peekable.swift; sourceTree = ""; }; E5C5038F904665E2FD8BC765D062B94D /* ReportViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReportViewController.swift; sourceTree = ""; }; E8B53F64139B844C7F6A5153E68A503F /* UIImage+Resize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImage+Resize.swift"; sourceTree = ""; }; - E9A63F66C0EE854FC0D90EF20A80F753 /* Peek.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Peek.framework; path = Peek.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E9A63F66C0EE854FC0D90EF20A80F753 /* Peek.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Peek.framework; sourceTree = BUILT_PRODUCTS_DIR; }; ED1F9AFF816E26D21D65326D39654920 /* PeekSelectionView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekSelectionView.swift; sourceTree = ""; }; ED7CF7547DDDD7610DFDAB4FE5074EE1 /* UIApplication+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIApplication+Peekable.swift"; sourceTree = ""; }; EE576A7508E59F8C49F9EFDA1CDA22B0 /* ContextDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ContextDataSource.swift; sourceTree = ""; }; @@ -285,7 +285,6 @@ 4E2E5E9ABB478CFDFF53F3C538BA1A85 /* PeekLayoutView.swift */, 2537A4FC5D3B66C5A7F9E028F5D9B3B0 /* PeekMetricView.swift */, ); - name = Layout; path = Layout; sourceTree = ""; }; @@ -295,7 +294,6 @@ 418E4028C8BDD96BAA31629B1DE889D1 /* LayoutManager.swift */, 8522543E5E577D8ED7CF0AFCB7A7D4B0 /* PeekTextOverlayView.swift */, ); - name = Text; path = Text; sourceTree = ""; }; @@ -354,10 +352,9 @@ isa = PBXGroup; children = ( 2327B847CA88BC70F973ACD26BC685FE /* CollapsibleSections.swift */, - 48780DCA506E871392725BE37BD60AC3 /* InspectorCell.swift */, + 48780DCA506E871392725BE37BD60AC3 /* PeekInspectorCell.swift */, 8AFCF0C3E940B13CAAE52D0ACE398BA9 /* PreviewCell.swift */, ); - name = Inspectors; path = Inspectors; sourceTree = ""; }; @@ -433,7 +430,6 @@ 11CBB3D0778700ACD15A4A057D569A9D /* Layout */, 14554F36BF2048DB9A59FEBC32D33FA8 /* Text */, ); - name = Overlays; path = Overlays; sourceTree = ""; }; @@ -475,7 +471,7 @@ BFA7D6C18DEB76393BEA255FEF24A295 /* Controllers & Views */ = { isa = PBXGroup; children = ( - 27EBCA6E389C9D1DC8C76A6062FCBE8C /* InspectorsPresentationController.swift */, + 27EBCA6E389C9D1DC8C76A6062FCBE8C /* PeekPresentationController.swift */, 595B6CC47E70CA929EAAEFDA9ECC0946 /* PeekInspectorViewController.swift */, 61166003FEB5DBDFEB2A02F0993E2375 /* PeekSectionedViewController.swift */, D72BB54A478FCA1715339A761E4C8485 /* PeekViewController.swift */, @@ -545,7 +541,6 @@ A923D033F3391AF3B11228237BFE8C74 /* ReportActivity.swift */, E5C5038F904665E2FD8BC765D062B94D /* ReportViewController.swift */, ); - name = Reporting; path = Reporting; sourceTree = ""; }; @@ -670,8 +665,8 @@ 5C0C8D2CFCB684AD5CF105C12F197E0D /* Images+Inspectors.swift in Sources */, 0D3EDB6A56CBDC43F9C426FEB5401D7B /* Images+Orientation.swift in Sources */, 624BAFE0F5AA7824FDAE9BF031BF724F /* Images+OrientationMask.swift in Sources */, - 0052FD84768A07D49701078802309663 /* InspectorCell.swift in Sources */, - 4D13C10CDD840FA326BA0112C8468855 /* InspectorsPresentationController.swift in Sources */, + 0052FD84768A07D49701078802309663 /* PeekInspectorCell.swift in Sources */, + 4D13C10CDD840FA326BA0112C8468855 /* PeekPresentationController.swift in Sources */, B58E4EB99A0F703D138D552BC343F33B /* LayoutManager.swift in Sources */, E6188C2B351D70002D89B48073297EBE /* Models.swift in Sources */, 9BD496A6A0E9F3840BFFE52FD7F8A012 /* NSAttributedString+Peekable.swift in Sources */, diff --git a/Pod/Classes/Controllers & Views/Inspectors/InspectorCell.swift b/Pod/Classes/Controllers & Views/Inspectors/PeekInspectorCell.swift similarity index 95% rename from Pod/Classes/Controllers & Views/Inspectors/InspectorCell.swift rename to Pod/Classes/Controllers & Views/Inspectors/PeekInspectorCell.swift index 4474274..11d15dc 100644 --- a/Pod/Classes/Controllers & Views/Inspectors/InspectorCell.swift +++ b/Pod/Classes/Controllers & Views/Inspectors/PeekInspectorCell.swift @@ -23,7 +23,7 @@ import UIKit /// Defines an inspector's cell used to represent a Peek property -final class InspectorCell: UITableViewCell { +final class PeekInspectorCell: UITableViewCell { override var accessoryView: UIView? { didSet { setNeedsUpdateConstraints() } @@ -40,7 +40,6 @@ final class InspectorCell: UITableViewCell { contentView.clipsToBounds = true let selectedView = UIView() - selectedView.backgroundColor = UIColor(white: 1, alpha: 0.1) selectedBackgroundView = selectedView } diff --git a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift index 3bb2640..b0b390f 100644 --- a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift @@ -18,13 +18,12 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U let controller = UISearchController(searchResultsController: nil) controller.dimsBackgroundDuringPresentation = false controller.hidesNavigationBarDuringPresentation = false - controller.searchBar.barStyle = .black - controller.searchBar.searchBarStyle = .minimal + controller.searchBar.barStyle = peek.options.theme == .light ? .default : .black controller.searchBar.barTintColor = navigationController?.navigationBar.barTintColor - controller.searchBar.tintColor = navigationController?.navigationBar.tintColor + controller.searchBar.tintColor = peek.options.theme.tintColor controller.searchBar.backgroundColor = peek.options.theme.backgroundColor controller.searchBar.isTranslucent = false - controller.searchBar.keyboardAppearance = .dark + controller.searchBar.keyboardAppearance = peek.options.theme == .light ? .default : .dark controller.searchBar.autocorrectionType = .yes controller.searchBar.autocapitalizationType = .none controller.searchBar.enablesReturnKeyAutomatically = true @@ -177,7 +176,7 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U return cell } - guard let cell = super.tableView(tableView, cellForRowAt: indexPath) as? InspectorCell else { fatalError() } + guard let cell = super.tableView(tableView, cellForRowAt: indexPath) as? PeekInspectorCell else { fatalError() } cell.contentView.backgroundColor = peek.options.theme.backgroundColor cell.backgroundColor = peek.options.theme.backgroundColor @@ -321,6 +320,17 @@ extension PeekInspectorViewController { private func prepareNavigationItems(animated: Bool) { reportingIndexPaths.removeAll() + if #available(iOS 11.0, *) { + navigationController?.navigationBar.largeTitleTextAttributes = [ + .foregroundColor: peek.options.theme.titleTextColor(isEditing: tableView.isEditing) + ] + } + + navigationController?.navigationBar.titleTextAttributes = [ + .foregroundColor: peek.options.theme.titleTextColor(isEditing: tableView.isEditing), + .font: UIFont.systemFont(ofSize: 17, weight: .regular) + ] + if tableView.isEditing { if #available(iOS 11.0, *) { navigationItem.searchController = nil diff --git a/Pod/Classes/Controllers & Views/InspectorsPresentationController.swift b/Pod/Classes/Controllers & Views/PeekPresentationController.swift similarity index 98% rename from Pod/Classes/Controllers & Views/InspectorsPresentationController.swift rename to Pod/Classes/Controllers & Views/PeekPresentationController.swift index c5681cc..9e0ddfc 100644 --- a/Pod/Classes/Controllers & Views/InspectorsPresentationController.swift +++ b/Pod/Classes/Controllers & Views/PeekPresentationController.swift @@ -7,7 +7,7 @@ import UIKit -internal final class InspectorsPresentationController: UIPresentationController, UIViewControllerTransitioningDelegate, UIViewControllerAnimatedTransitioning { +internal final class PeekPresentationController: UIPresentationController, UIViewControllerTransitioningDelegate, UIViewControllerAnimatedTransitioning { override var presentationStyle: UIModalPresentationStyle { return .overFullScreen @@ -378,7 +378,7 @@ extension NSShadow { let shadow = NSShadow() shadow.shadowOffset = CGSize(width: 0, height: -2) shadow.shadowBlurRadius = 10 - shadow.shadowColor = UIColor(white: 0, alpha: 0.75) + shadow.shadowColor = UIColor(white: 0, alpha: 0.5) return shadow } } @@ -407,7 +407,7 @@ extension UIView { layer.shadowColor = (shadow.shadowColor as? UIColor)?.cgColor layer.shadowOffset = .zero let color = shadow.shadowColor as? UIColor ?? .black - layer.shadowOpacity = Color(systemColor: color)?.rgba.alpha ?? 0.5 + layer.shadowOpacity = Color(system: color)?.rgba.alpha ?? 0.5 } } diff --git a/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift b/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift index bbd9acf..48245f2 100644 --- a/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift @@ -44,7 +44,7 @@ internal class PeekSectionedViewController: UIViewController, UITableViewDelegat } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - guard let cell = tableView.dequeueReusableCell(withIdentifier: "InspectorCell", for: indexPath) as? InspectorCell else { fatalError() } + guard let cell = tableView.dequeueReusableCell(withIdentifier: "InspectorCell", for: indexPath) as? PeekInspectorCell else { fatalError() } cell.detailTextLabel?.font = UIFont.preferredFont(forTextStyle: .body) cell.detailTextLabel?.textColor = peek.options.theme.primaryTextColor @@ -56,6 +56,8 @@ internal class PeekSectionedViewController: UIViewController, UITableViewDelegat cell.editingAccessoryView = nil cell.editingAccessoryType = .none + cell.selectedBackgroundView?.backgroundColor = peek.options.theme.selectedBackgroundColor + return cell } @@ -94,16 +96,9 @@ extension PeekSectionedViewController { navigationController?.navigationBar.setBackgroundImage(UIImage(), for: .default) navigationController?.navigationBar.backgroundColor = peek.options.theme.backgroundColor navigationController?.navigationBar.tintColor = peek.options.theme.primaryTextColor - navigationController?.navigationBar.titleTextAttributes = [ - .foregroundColor: peek.options.theme.primaryTextColor, - .font: UIFont.systemFont(ofSize: 17, weight: .regular) - ] if #available(iOS 11.0, *) { navigationController?.navigationBar.prefersLargeTitles = true - navigationController?.navigationBar.largeTitleTextAttributes = [ - .foregroundColor: UIColor.white - ] guard navigationController?.viewControllers.count == 1 || self is ReportViewController else { navigationItem.largeTitleDisplayMode = .never @@ -111,9 +106,6 @@ extension PeekSectionedViewController { } navigationItem.largeTitleDisplayMode = .always - navigationController?.navigationBar.largeTitleTextAttributes = [ - .foregroundColor: peek.options.theme.primaryTextColor - ] } } @@ -128,14 +120,15 @@ extension PeekSectionedViewController { tableView.tableFooterView = UIView() tableView.backgroundColor = peek.options.theme.backgroundColor - tableView.separatorStyle = .none + tableView.separatorColor = peek.options.theme.separatorColor + tableView.separatorStyle = peek.options.theme == .light ? .singleLine : .none tableView.delegate = self tableView.dataSource = self tableView.allowsMultipleSelectionDuringEditing = true tableView.separatorInset = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 16) - tableView.register(InspectorCell.self, forCellReuseIdentifier: "InspectorCell") + tableView.register(PeekInspectorCell.self, forCellReuseIdentifier: "InspectorCell") tableView.register(PreviewCell.self, forCellReuseIdentifier: "PreviewCell") tableView.register(CollapsibleSectionHeaderView.self, forHeaderFooterViewReuseIdentifier: "CollapsibleSectionHeaderView") diff --git a/Pod/Classes/Controllers & Views/Reporting/ReportViewController.swift b/Pod/Classes/Controllers & Views/Reporting/ReportViewController.swift index a06e87d..52d2737 100644 --- a/Pod/Classes/Controllers & Views/Reporting/ReportViewController.swift +++ b/Pod/Classes/Controllers & Views/Reporting/ReportViewController.swift @@ -109,7 +109,7 @@ internal final class ReportViewController: PeekSectionedViewController { } override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - guard let cell = super.tableView(tableView, cellForRowAt: indexPath) as? InspectorCell else { fatalError() } + guard let cell = super.tableView(tableView, cellForRowAt: indexPath) as? PeekInspectorCell else { fatalError() } cell.contentView.backgroundColor = peek.options.theme.backgroundColor cell.backgroundColor = peek.options.theme.backgroundColor diff --git a/Pod/Classes/Controllers & Views/UIViewController+Modal.swift b/Pod/Classes/Controllers & Views/UIViewController+Modal.swift index 3851b5e..769e7fa 100644 --- a/Pod/Classes/Controllers & Views/UIViewController+Modal.swift +++ b/Pod/Classes/Controllers & Views/UIViewController+Modal.swift @@ -10,7 +10,7 @@ import UIKit extension UIViewController { func presentModal(_ viewControllerToPresent: UIViewController, from sourceView: UIView?, animated: Bool, completion: (() -> Void)?) { - let controller = InspectorsPresentationController(presentedViewController: viewControllerToPresent, presenting: presentingViewController) + let controller = PeekPresentationController(presentedViewController: viewControllerToPresent, presenting: presentingViewController) withExtendedLifetime(controller) { _ in viewControllerToPresent.transitioningDelegate = controller diff --git a/Pod/Classes/Helpers/Color.swift b/Pod/Classes/Helpers/Color.swift index a768de9..4eee331 100644 --- a/Pod/Classes/Helpers/Color.swift +++ b/Pod/Classes/Helpers/Color.swift @@ -288,12 +288,12 @@ extension Color: Equatable { #if os(iOS) import UIKit extension Color { - public init?(systemColor: UIColor?) { - guard let systemColor = systemColor else { return nil } - self.init(cgColor: systemColor.cgColor) + public init?(system: UIColor?) { + guard let system = system else { return nil } + self.init(cgColor: system.cgColor) } - public var systemColor: UIColor { + public var system: UIColor { return UIColor(cgColor: cgColor) } } diff --git a/Pod/Classes/Images/Images+Inspectors.swift b/Pod/Classes/Images/Images+Inspectors.swift index d64b7a7..e904e7f 100644 --- a/Pod/Classes/Images/Images+Inspectors.swift +++ b/Pod/Classes/Images/Images+Inspectors.swift @@ -37,7 +37,7 @@ final class Images { path.lineCapStyle = .round path.lineJoinStyle = .round - theme.primaryTextColor?.setStroke() + theme.disclosureColor?.setStroke() path.stroke() } } diff --git a/Pod/Classes/PeekOptions.swift b/Pod/Classes/PeekOptions.swift index 4e0b9b2..5729ef8 100644 --- a/Pod/Classes/PeekOptions.swift +++ b/Pod/Classes/PeekOptions.swift @@ -45,17 +45,25 @@ public enum PeekTheme { } internal var overlayTintColor: UIColor? { - return Color(literalRed: 135, green: 252, blue: 112).systemColor + return Color(literalRed: 135, green: 252, blue: 112).system } internal var backgroundColor: UIColor? { switch self { - case .dark: return Color(hex: "1c1c1c")!.systemColor + case .dark: return Color(hex: "1c1c1c")!.system case .black: return .black case .light: return .white } } + internal var selectedBackgroundColor: UIColor? { + switch self { + case .dark: return UIColor(white: 1, alpha: 0.1) + case .black: return UIColor(white: 1, alpha: 0.1) + case .light: return UIColor(white: 0, alpha: 0.1) + } + } + internal var separatorColor: UIColor? { switch self { case .dark: return UIColor(white: 1, alpha: 0.1) @@ -64,6 +72,14 @@ public enum PeekTheme { } } + internal func titleTextColor(isEditing: Bool) -> UIColor? { + switch self { + case .dark: return .white + case .black: return .white + case .light: return isEditing ? .white : .black + } + } + internal var primaryTextColor: UIColor? { switch self { case .dark: return .white @@ -76,28 +92,36 @@ public enum PeekTheme { switch self { case .dark: return UIColor(white: 1, alpha: 0.6) case .black: return UIColor(white: 1, alpha: 0.6) - case .light: return Color(hex: "1c1c1c")!.systemColor + case .light: return Color(hex: "1c1c1c")!.system } } internal var tintColor: UIColor? { switch self { - case .dark: return Color(literalRed: 135, green: 252, blue: 112).systemColor - case .black: return Color(literalRed: 135, green: 252, blue: 112).systemColor - case .light: return Color(hex: "4CD863")!.systemColor + case .dark: return Color(literalRed: 135, green: 252, blue: 112).system + case .black: return Color(literalRed: 135, green: 252, blue: 112).system + case .light: return Color(hex: "4CD863")!.system } } internal var editingColor: UIColor? { switch self { - case .dark: return Color(hex: "4CD863")!.systemColor - case .black: return Color(hex: "4CD863")!.systemColor - case .light: return Color(hex: "4CD863")!.systemColor + case .dark: return Color(hex: "4CD863")!.system + case .black: return Color(hex: "4CD863")!.system + case .light: return Color(hex: "4CD863")!.system } } internal var editingCounterColor: UIColor? { - return Color(hex: "3EB454")!.systemColor + return Color(hex: "3EB454")!.system + } + + internal var disclosureColor: UIColor? { + switch self { + case .dark: return UIColor(white: 1, alpha: 0.6) + case .black: return UIColor(white: 1, alpha: 0.6) + case .light: return UIColor(red: 200, green: 200, blue: 200, alpha: 1) + } } } diff --git a/Pod/Classes/Peekable/UIColor+Peekable.swift b/Pod/Classes/Peekable/UIColor+Peekable.swift index 68ee4fe..dfda102 100644 --- a/Pod/Classes/Peekable/UIColor+Peekable.swift +++ b/Pod/Classes/Peekable/UIColor+Peekable.swift @@ -25,11 +25,11 @@ import UIKit extension UIColor: Model { @objc var peek_alpha: CGFloat { - return CGFloat(Color(systemColor: self)?.rgba.alpha ?? 0) + return CGFloat(Color(system: self)?.rgba.alpha ?? 0) } @objc var peek_HEX: String { - if let hex = Color(systemColor: self)?.toHex(withAlpha: false) { + if let hex = Color(system: self)?.toHex(withAlpha: false) { return "#\(hex)" } else { return "Unknown" diff --git a/Pod/Classes/Transformers/UIColor+Transformer.swift b/Pod/Classes/Transformers/UIColor+Transformer.swift index 531dff6..9086950 100644 --- a/Pod/Classes/Transformers/UIColor+Transformer.swift +++ b/Pod/Classes/Transformers/UIColor+Transformer.swift @@ -26,7 +26,7 @@ import UIKit final class ColorTransformer: Foundation.ValueTransformer { override func transformedValue(_ value: Any?) -> Any? { - if let value = value as? UIColor, let color = Color(systemColor: value) { + if let value = value as? UIColor, let color = Color(system: value) { if color == .clear { return "Clear" } @@ -43,7 +43,7 @@ final class ColorTransformer: Foundation.ValueTransformer { if CFGetTypeID(value as CFTypeRef) == CGColor.typeID { // swiftlint:disable force_cast let color = Color(cgColor: value as! CGColor) - return color?.rgba.alpha == 0 ? "Clear" : color?.systemColor.peek_HEX + return color?.rgba.alpha == 0 ? "Clear" : color?.system.peek_HEX } return "none" From a803d36fdeae0a19b2e5b5683456600dfe9641bb Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 15:43:50 +0100 Subject: [PATCH 08/37] color correction for dislosure indicators on groups --- Example/NotTwitter/AppDelegate.swift | 2 +- Pod/Classes/PeekOptions.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Example/NotTwitter/AppDelegate.swift b/Example/NotTwitter/AppDelegate.swift index 5bba679..5d01cd2 100644 --- a/Example/NotTwitter/AppDelegate.swift +++ b/Example/NotTwitter/AppDelegate.swift @@ -18,7 +18,7 @@ final class AppDelegate: UIResponder, UIApplicationDelegate { Theme.apply() window?.peek.enableWithOptions { options in - options.theme = .light + options.theme = .dark options.activationMode = .auto options.ignoresContainerViews = false diff --git a/Pod/Classes/PeekOptions.swift b/Pod/Classes/PeekOptions.swift index 5729ef8..f699842 100644 --- a/Pod/Classes/PeekOptions.swift +++ b/Pod/Classes/PeekOptions.swift @@ -120,7 +120,7 @@ public enum PeekTheme { switch self { case .dark: return UIColor(white: 1, alpha: 0.6) case .black: return UIColor(white: 1, alpha: 0.6) - case .light: return UIColor(red: 200, green: 200, blue: 200, alpha: 1) + case .light: return UIColor(red: 200/255, green: 200/255, blue: 200/255, alpha: 1) } } } From ba782960b0fdbadaea0487920a5bdb7860a0f116 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 15:45:52 +0100 Subject: [PATCH 09/37] Removed colors from extension --- Pod/Classes/Helpers/Color+Extensions.swift | 40 ---------------------- 1 file changed, 40 deletions(-) diff --git a/Pod/Classes/Helpers/Color+Extensions.swift b/Pod/Classes/Helpers/Color+Extensions.swift index 0e7fff1..a4b2e7a 100644 --- a/Pod/Classes/Helpers/Color+Extensions.swift +++ b/Pod/Classes/Helpers/Color+Extensions.swift @@ -23,46 +23,6 @@ import UIKit extension UIColor { - -// internal static var overlay: UIColor? { -// return .black -// } -// -// internal static var separator: UIColor? { -// return UIColor(white: 1, alpha: 0.1) -// } -// -// internal static var inspectorBlack: UIColor? { -// return .black -// } -// -// internal static var inspectorDark: UIColor? { -// return Color(hex: "1c1c1c")!.systemColor -// } -// -// internal static var textDark: UIColor? { -// return Color(hex: "1c1c1c")!.systemColor -// } -// -// internal static var textLight: UIColor? { -// return UIColor.white -// } -// -// internal static var editingTint: UIColor? { -// return Color(hex: "4CD863")!.systemColor -// } -// -// internal static var counter: UIColor? { -// return Color(hex: "3EB454")!.systemColor -// } -// -// internal static var neutral: UIColor? { -// return UIColor(white: 1, alpha: 0.6) -// } -// -// internal static var primaryTint: UIColor? { -// return Color(literalRed: 135, green: 252, blue: 112).systemColor -// } internal var hslComponents:(hue: CGFloat, saturation: CGFloat, brightness: CGFloat, alpha: CGFloat) { var h: CGFloat = 0, s: CGFloat = 0, l: CGFloat = 0, a: CGFloat = 0 From 5269e604144961a3dfaf0e50ba0941e4fd351514 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 15:53:44 +0100 Subject: [PATCH 10/37] Moved colors into their own file to make PeekOptions less busy and also easier to find theming related items --- Example/Pods/Pods.xcodeproj/project.pbxproj | 1023 ++++++++++--------- Pod/Classes/PeekOptions.swift | 84 -- Pod/Classes/PeekTheme+Colors.swift | 96 ++ 3 files changed, 612 insertions(+), 591 deletions(-) create mode 100644 Pod/Classes/PeekTheme+Colors.swift diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 1823a7a..c6b768c 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -3,103 +3,104 @@ archiveVersion = 1; classes = { }; - objectVersion = 46; + objectVersion = 47; objects = { /* Begin PBXBuildFile section */ - 0052FD84768A07D49701078802309663 /* PeekInspectorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48780DCA506E871392725BE37BD60AC3 /* PeekInspectorCell.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 053A288B8C9FCA64817AA164F7B75834 /* Enum+Cases.swift in Sources */ = {isa = PBXBuildFile; fileRef = F834A528ADB5E3FC93835DB9893D5D4E /* Enum+Cases.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 078AF4AC18434291749BC2B3B4E0B524 /* PeekMetricView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2537A4FC5D3B66C5A7F9E028F5D9B3B0 /* PeekMetricView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 0D3EDB6A56CBDC43F9C426FEB5401D7B /* Images+Orientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 005D553572F2976AC81883634FA9E570 /* Images+Orientation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 0FCB7711C709C54B36956067DA923BE0 /* UILabel+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D315832C5C89E6C18EF7C4C670530A5F /* UILabel+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 035380A8BA37AD6AFAB54E467C23CD22 /* String+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25CA96DC90448B716356500F6FAB0003 /* String+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 03B4E7E79E6D12C34C243F75DD5B5032 /* Peek.swift in Sources */ = {isa = PBXBuildFile; fileRef = 97EF0163AE305299461B0D4478EAB67F /* Peek.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 03C8F79DC75DCBAB71BBDA97E7CBBD99 /* VolumeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83D8C695F9F99339C64DD67CD776BD33 /* VolumeController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 05959B60255A3EF6D34A3379E0972A64 /* Peek-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 268975FA742758A565DADF96B4C6F928 /* Peek-dummy.m */; }; + 074F2D99FDD16D7CC60E2E61A14B3667 /* PeekInspectorCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6D6FEB4BB637E7FCCE8B07BBAF6E5A /* PeekInspectorCell.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 0977C9C88D8074D06A8B8D7C343A9C8F /* Report.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AFDD8C5B78E892E3CD9B3CCCBFA28FF /* Report.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 10973589C9C91A500DFF30FD6D7793E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - 10EE472B9E31FE8DEBE74625A98BC823 /* NSNumber+Transformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B622879D927F0A1C51950A487D488654 /* NSNumber+Transformer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 157BA6E3C24EE5501D6562A852693F17 /* UIColor+Transformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25533260A129F09B7C10D4AB5D1B0D8A /* UIColor+Transformer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 161CCA106B9C13BB2660A3E8BC088592 /* UINavigationBar+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E80F2EC5761F71B63A07FB7DACF296A /* UINavigationBar+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 16DA54DF0CB6F87485220AE5CC6792E6 /* UIScrollView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D0FE5235F61B32F5D003D5845994B7C /* UIScrollView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 1772DB5016C8B1C56961C7C278ABCE0C /* PeekSelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED1F9AFF816E26D21D65326D39654920 /* PeekSelectionView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 17FF152C5F4BCEB9E55EF36847552F05 /* ColorAccessoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C749367BACA995EC5C9A27EACABD47E /* ColorAccessoryView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 1E1531B8A67B27B28CFACF48CBF8A268 /* NSString+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BEA4AC6DC6B6B82ECE721B61A1EF3DD /* NSString+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 256FAE25178A745387A4DDA481E0FF83 /* Bundle+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DC4B8D2E8BB0D51AB6819BE2CFC73565 /* Bundle+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 25F9115A8977B328DDB3A732144082EA /* UIImage+Resize.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8B53F64139B844C7F6A5153E68A503F /* UIImage+Resize.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 2635B5F2D33BFA3A12D27AE1CACFDB72 /* PeekOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FB49D2ADCC01135011E969DD98E735 /* PeekOverlayView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 26B88492E0F591A803E3B5266B5B3C97 /* Peek-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AF941F49979EAB3DD937C212AD14FD9 /* Peek-dummy.m */; }; - 31609CBD88D400A5907B63C1B29AFE8B /* Renderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 86F1AE3FAD2424823002EEF6F1549428 /* Renderer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 334A7BCC7648F2A40A8067D730A3A14C /* UIBarButtonItem+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22FD46F30957E595D961350F4937028B /* UIBarButtonItem+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 34E24949B2B2FDE7D5750B095D09DFF6 /* UIView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 505E7F0B5A89010244CF701C8B81250C /* UIView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 3556CC7C110E590597C27850EC22A0D3 /* UISegmentedControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB5EA617FA65EF4BF30BAE1CF807414A /* UISegmentedControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 361FBBC102346A48C4A95717EB55C742 /* Group.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67A91952CD826164B5495B3AC4C7BB09 /* Group.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 3671DAB3AABCDC23ACE93F4FA0621147 /* Color+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3FFC87DDB6184A5562E396C09F7D74A8 /* Color+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 39EB85D62F1C5A0F853BB62B12F6228B /* PeekButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40FB951F7B86F4C0491C5E45731927C2 /* PeekButton.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 49359FAC41EF19443EAAC69716CA0DE8 /* Peek-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FAEC4340D1686C8B769EBDA40FE03E12 /* Peek-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 494903ADB4568FE4CCB60BB817BF7FFF /* UIViewController+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 03D30F199C27941FE73DC412DF38923C /* UIViewController+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 4AA2F03BB903CC5B4AC45547A63AE18F /* UIControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD04AF7E8B1A8472992D54DC5CB933BC /* UIControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 4D13C10CDD840FA326BA0112C8468855 /* PeekPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27EBCA6E389C9D1DC8C76A6062FCBE8C /* PeekPresentationController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 523DEC438C16834BC0F4AECF247520AC /* ReportViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5C5038F904665E2FD8BC765D062B94D /* ReportViewController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 5387F3461499EC1E0FED70C50B8C0B03 /* UISlider+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1E7BD2DC1A6BCC9BD0FB33906852A948 /* UISlider+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 5C0C8D2CFCB684AD5CF105C12F197E0D /* Images+Inspectors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 068888927B67451ECDD0455679695142 /* Images+Inspectors.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 5C8B8ED9F010C2A0EB620987DD085222 /* NSNumber+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40C3B3B06351A6EF60CCD0876E633213 /* NSNumber+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 160465F8BF347A11591D4E26AE9AB1C8 /* Images+Inspectors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25A35AC996232EDA99D791704B5F40E6 /* Images+Inspectors.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 1940B803148CF5BBFC5ADB0CF3FB7206 /* PeekOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 426D37AFC74617DB3E41A0E22174D38A /* PeekOptions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 19FA22B437481E47584541AE5DE4744C /* UIScreen+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B858A0F57683506584C8D6F009542610 /* UIScreen+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 1D50BAC9636BA0C1D39A23C0A9DB4101 /* Bundle+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CE55B9AD11FCFA806540B9AEBDC7F21 /* Bundle+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 209265F03626402DEC31E42E29AAEFED /* PDFRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9ADE005450871A80FEDB9D798CAF8F4 /* PDFRenderer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 213874D3297C0CE2C9BD407CE5452FA5 /* UIActivityIndicatorView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848AD190AEA8663242F4A24ED993AFAC /* UIActivityIndicatorView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2225EF6185B99707953EADF80B553530 /* UIWindow+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61717C4EB7EC219A8D8E39C2E049B576 /* UIWindow+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 22683D81EE66DF298AE6411FA53EED78 /* Renderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DB60B0A34C4FACBCF74AFE6E37AACAA /* Renderer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 235BD1257E836FF20BB5DC870F27FA13 /* Coordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 384AEC3584DCA7A77D3A328667A1C5FF /* Coordinator.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2540FCE70AFFD5C67E8A2924ADF18F84 /* NSNumber+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89F5B60CF9E69BFD25BBAE956F84BC28 /* NSNumber+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 26C6A05919B58CB373A5E0029A39C8DA /* UIFont+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AD9325C7033118C7E6D1DBD4AF98375 /* UIFont+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2D3BA22ED9A2CBF21F2E85D30175A25E /* UIColor+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AC4E724A201BA394AC30E9498545B241 /* UIColor+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 2FAD61FD90DD6FD1F7F1485AFBB5FE90 /* PeekSelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAE3F75C912D350A1FBA3B2436DC63E3 /* PeekSelectionView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 356AFB6B3E69A864F40757BC926C7431 /* UIViewController+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4090306352B4CABF6042647FDD565E7 /* UIViewController+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 35CADDA13D82536FC8F33D4213B055EE /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E49AECF68401BE06609604056642A01 /* Color.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 437F32485CA98930F10AFED4CF091D6E /* UISlider+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 264BAC893E38FB7C15C43FFA5C2BAD31 /* UISlider+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 43C41BD930126F965208B1899D49C591 /* Group.swift in Sources */ = {isa = PBXBuildFile; fileRef = 106055E6C8C2D7795977A411D8DD8F1C /* Group.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 49BBA74EF04F0978ACD80741B4B6B6E4 /* UISegmentedControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 369BB6EA47BB4568B60C1E10F77F6C31 /* UISegmentedControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 4B1B5BD40C50FABA0E9F0B1267642D08 /* UIToolbar+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFE7F873ED2023A824B5E1EEF3B09CB8 /* UIToolbar+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 4DD48FC7EDFF7E4E65F873EE9E2E0D74 /* PeekPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D10E3F5C38A6ACC92723BFCE14A3481 /* PeekPresentationController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 54CF22A4D3EF233CB7DFA953701CC705 /* Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7728391455F1D6CDE04777AE9594C3 /* Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 5542FF14BD626A9583991667176B92ED /* UIPageControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E82C2EF0097E2C3CD3FBB1D84188D45D /* UIPageControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 570AE69F67442A6AD8508A05332C6787 /* UIDevice+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D179539BADBCE6D387E74D35404C3494 /* UIDevice+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 5E98F4A7009B88E3E7393B738E86487D /* UIButton+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF3F848DF631BA320E0F8FD6D5A20A9B /* UIButton+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5F99C51E9B93BECC5B5D7F994FBF7D61 /* Pods-NotTwitter-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DF08ED7ABA45C2470212A1D7BCEF336E /* Pods-NotTwitter-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 600AB4D3E094EF9A67310A248F2F5C5B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; - 6154B5F62A7DBFD37C07D1D51C85CB98 /* PreviewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AFCF0C3E940B13CAAE52D0ACE398BA9 /* PreviewCell.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6217A84D506646625E102774B01D7131 /* PeekInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 595B6CC47E70CA929EAAEFDA9ECC0946 /* PeekInspectorViewController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 624BAFE0F5AA7824FDAE9BF031BF724F /* Images+OrientationMask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2F79E3AE2B43913B577A387104D53A18 /* Images+OrientationMask.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 67C2D4033135B181FAECC88C69B971BD /* Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E17105EBB6756B4338B84F8866F09D94 /* Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 69CFB6C940BD8C6CF45F6D2E9020EFAC /* ContextDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE576A7508E59F8C49F9EFDA1CDA22B0 /* ContextDataSource.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6D7B6C284F34097461314164B53B329E /* Coordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = D572ABB4B30092857009FCD960EF98EA /* Coordinator.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6E8277A92F18A43BA9700EA6D1F88403 /* UIStepper+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0C5FE31770F06314B098EA60BD07D3A /* UIStepper+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6E86C32D1887D6C2A4B977DD4A062744 /* UIProgressView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B924F90D2D173F5D2B50A02F1CF6CDA /* UIProgressView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 6ED1A1799D4668CA713EFFECEC03412B /* CollapsibleSections.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2327B847CA88BC70F973ACD26BC685FE /* CollapsibleSections.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 6073D6C39DC1A4D1E6EF2C14D8169D46 /* NSValue+Transformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B47A0788BB651CAF3D000191E97F7E01 /* NSValue+Transformer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 607D33B5BAECF7120297A078176407F1 /* NSLayoutConstraint+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = B027FB8F3CC6183AB5D5A2B0BC5154AE /* NSLayoutConstraint+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 61CDF7E9CF47E0847BFFB8C8A6DC9D12 /* Color+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4B76134CF3E2AC7E0FE04B10EC3FD11 /* Color+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 6DFD20E6636ED608E85DDD653AAB5D7B /* UIViewController+Modal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07FF0156B81F6441DB76D00DC5CA2B33 /* UIViewController+Modal.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 700E7600581FA9E11E0607424723D037 /* Images+Orientation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1F0F130B6925E55C6F0867E598686F0 /* Images+Orientation.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 71875B45E90D47D927FE1B089D4BB34F /* UIView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8BAAFE4F90F9ECEF2D933C80C2292FD /* UIView+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 73F90013CA0E957AF47B3B9A4D418031 /* Pods-NotTwitter-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C23D7639072EE47EB80B8321C7D50813 /* Pods-NotTwitter-dummy.m */; }; - 7BAF9DB8DEA1DE702E03BC77D51B255F /* ReportActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = A923D033F3391AF3B11228237BFE8C74 /* ReportActivity.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 7ED22D64DC02614E3C9E04E04045D9CF /* BoolAccessoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 883EA4BB41D855B10D619CB45FA5DBFB /* BoolAccessoryView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 7F689ECD8E63DEB2D8858C76837263D6 /* UIButton+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B95BD411F5FD11493207C2C18ACCFEF /* UIButton+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 806A127AB6E0B73EFB4E15FE5BD93185 /* UIStackView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A75C6D14EC824A55740B4A4B7CE9970C /* UIStackView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 85DC8D32E7CF6E4AB6B4E5585DDAA986 /* String+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9373FB60422A142202EE7EE29FDE2B53 /* String+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 87D34266712D25AB657F0FE51335184A /* PeekLayoutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E2E5E9ABB478CFDFF53F3C538BA1A85 /* PeekLayoutView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8C1694D1AEEEFAB8A5F65277B40A37AC /* UISwitch+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607C1265DAA26C20B8A8C4FB5E603E02 /* UISwitch+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 8D31075DF8B24C6D87C50DC57FA57D66 /* NSObject+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE8FDC586B2A52D65ED003CAEBBAD3B9 /* NSObject+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9818109F7FB987154C3260EED567E1E4 /* UIImage+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A60C495F9BE238166BE1A050D8A6C01F /* UIImage+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 98412054C39947FFF83447D841A1078C /* UIToolbar+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEC8BC3EBF85324CDECF2AC9D46DE326 /* UIToolbar+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 989B3CB439C32DD0945FD8823BE5F10D /* Color.swift in Sources */ = {isa = PBXBuildFile; fileRef = 312AE50F424EF6CB1F62EDCC12AECA94 /* Color.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9AE4F30FDE5D352C9967B32CAA8AE31C /* RendererDrawable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3B9FF5FB0C0641504E6E84278B6953B /* RendererDrawable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9BD496A6A0E9F3840BFFE52FD7F8A012 /* NSAttributedString+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A457608A5C88B1F080FCABD01753CF4 /* NSAttributedString+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9E92C6707FD6A612E918AB0277EEEFAA /* UIViewController+Modal.swift in Sources */ = {isa = PBXBuildFile; fileRef = F17E823F6E266E1E1509D0B2AC20883B /* UIViewController+Modal.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9F0A5EF799E9B145203EC257A5F439A5 /* PeekTapGestureRecognizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B68FDA92C209A54D14360873C695018C /* PeekTapGestureRecognizer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - 9FBAA83AAE7227C7BB34F792DCADB28C /* NSValue+Transformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5B68F672DE2B0B76C2CDA9D4C54C1D2 /* NSValue+Transformer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A06023460AF33DD8331285BB7290C895 /* VolumeController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A6925E13D83DC5DA76DF30BD76785FA /* VolumeController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A0C3451E845F00277B85903C17A1CA44 /* UIPicker+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0652025D3A599B3EC2441EF757BF8357 /* UIPicker+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A279BB5A0DB4EA45C1F22139D3EC0B8F /* PeekViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D72BB54A478FCA1715339A761E4C8485 /* PeekViewController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A50F98EA5F83B61D154A69F9B04EA2D0 /* Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = CECCD1F1CFB155357F3F22C78CD92DD1 /* Constraints.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - A8AEA6140A0C6229D1C478DB669887F6 /* PDFRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B36E3E59BDDE0713C14498872D79BEAD /* PDFRenderer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - ACC3F69B09A3B4D3DEF3EB0EFC8F024A /* PeekOptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76E40F261535D480E0F9E6FDC86F2F8D /* PeekOptions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - AF20D27BCAD9AC41FD066419540A48AB /* UIScreen+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5659801B8483436A817D4ABC5F805E8F /* UIScreen+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B2450B0476583D8BD1ED8B5C7D65D25F /* UIColor+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = A79AF99FFCF2862E38BEF9071618F414 /* UIColor+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B47D61B4F29F21FC1620F3EDDB27CF72 /* UIImageView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA541E0D49E697800ACEEF722DA1A97F /* UIImageView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B50EED0CFDC1BC3F78053D9032A89EDD /* UIApplication+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ED7CF7547DDDD7610DFDAB4FE5074EE1 /* UIApplication+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B5183DEBD89ABAF30F8BD9CC88537BCB /* UIWindow+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C32D7141488B86BD074AD238CE71404C /* UIWindow+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B51FBD205222F1CD7B70EA085FC05496 /* CGSize+Resize.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1A39970A5620E5119B5DE39B946CB75 /* CGSize+Resize.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B58E4EB99A0F703D138D552BC343F33B /* LayoutManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 418E4028C8BDD96BAA31629B1DE889D1 /* LayoutManager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B66FA36C72C2AB00DF75AF0EF93F8EC5 /* Attribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9383A964FB771512B41D6D37BE82553 /* Attribute.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B7C76EB4913DBA86AC9EA1C69E2B913F /* Enum+Descriptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8948709C925D8DFFB480B69AFD835DC3 /* Enum+Descriptions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - B7DCEE483F2E6C096C45D6BFF3EC42CE /* PeekLayoutOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB9E9EC1AC7CAA829ACD68FDA8087F3D /* PeekLayoutOverlayView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C0693E485117AF2253A2456FD0F39371 /* UITextView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09719C3CC5215377C350537944A89192 /* UITextView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C5DA51402F84E20F14C32772E4505468 /* ImageRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 837E0FD264E93EB77FE6CCE7EA05CF66 /* ImageRenderer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C6C742DA7373345C6EF469720D38F37A /* CALayer+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7C256D8FFF99482DF131E2A529B5C8F /* CALayer+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C9D70F3B9D555374D658B41DB9E6AEF8 /* UIFont+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8762E9349865E5A6818AE7A135E3CE04 /* UIFont+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - CB4EB9D64E33FD53EC277F1444FE6810 /* UIPageControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EB8DC96C865727F69BA764998915782 /* UIPageControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - CD22CB5866F3AAD473F857AE0081513E /* PeekSectionedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61166003FEB5DBDFEB2A02F0993E2375 /* PeekSectionedViewController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D33BE61C598686061DCFF0AD71E40A5B /* UIDevice+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 80EA8038937B34C275BBD367F7ECD3B5 /* UIDevice+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - D9A96FED664498CF651D84EF253DB510 /* UIView+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B875A5AC5B3CB98DBA575556B24E95F /* UIView+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - E4B52A2A4186FFF3D4E502A17499AC2C /* Peek.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C9F1DBDEB67F1DC5776CE937B79D9C8 /* Peek.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - E6188C2B351D70002D89B48073297EBE /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2219C9C5D7F4BDA0A5DA0ECDDBBC641 /* Models.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - E775B95D7F4E6A5DB597BB5FA2916558 /* NSLayoutConstraint+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FF2122E27E9622018E3091368466957 /* NSLayoutConstraint+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - EE5A4F123A5779ECBDB1E0695A44F085 /* UIActivityIndicatorView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34C1FB04A3F50185A33ACB3E1B5AB429 /* UIActivityIndicatorView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - EEB83F970D6A05CB87DEC80635B28C40 /* PeekTextOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8522543E5E577D8ED7CF0AFCB7A7D4B0 /* PeekTextOverlayView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F261D4B51731B338EE7D3FEB58A2720A /* UIViewController+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63D8282847AA8E8EFB9818E8B6DFCE05 /* UIViewController+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - F7B4545B26C00534BB1B2ED636815399 /* UITextField+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DA14D50846F0449CF0E84A18EE5159D /* UITextField+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - FA979E87072C601BF01752B94CC94331 /* Platforms.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C1FD5AD5BF562B968FCA37B943F74EC /* Platforms.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - FB5163FA5CF6E576BC21F3E60818A714 /* Report.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A06CBFC6F9CB5C0F8EA38FD8B62D7E3 /* Report.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 75999EB218C9A0623116CB3E9C8C8323 /* UISwitch+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66D6116E25E97EB242374838669F0A10 /* UISwitch+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 78A859BA42194BBE35EB957E8327A4F7 /* CALayer+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61F405FC4E747440D83BE45B1690C0D7 /* CALayer+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7979A5AF3A42540CB6E25BCBA6B0E657 /* PeekLayoutOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5272DF70766EA743CA218AEC04A915 /* PeekLayoutOverlayView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 79845CFC863E38E3D5E82ADED428636C /* UIProgressView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2D544D7CD3A55684CB9EFD3F073748B /* UIProgressView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 7D05F6C7011497A82027A529D013425D /* UIView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A308064BA87CCD0FF5DDC3D4F45756B /* UIView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 834A1A01A9823768C8D88B368C824520 /* UITextView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = ADF403AF8DB474B8EEAE5413D72FD442 /* UITextView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 83796ED5496140231584775677BB4233 /* Enum+Descriptions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5BD2CBFE327B12B400B822F1552F90EC /* Enum+Descriptions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 843324E7871F9E791AB088130AF88932 /* PeekTheme+Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CD3C682222D2A0DEE3FBBA6A5AC3F77 /* PeekTheme+Colors.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 864297146B8679B2FF088A23E1016C5E /* PeekTextOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E09CF42E7B4512F56F0E46FA61047867 /* PeekTextOverlayView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 8817087698D0953320E96E8AD28F30D5 /* LayoutManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 100A9537D451E397D95E934896318DB2 /* LayoutManager.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 8987F4D2B3B453EC0840906DF5B44152 /* UIScrollView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0514A4D095EF6CA62FD16D237ED41020 /* UIScrollView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 8C85EDB730AF0C11E825EDDF8E6F06E7 /* PeekButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BEB72306033F22F0FC12F4FF33350AB /* PeekButton.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 8CCB2EA2AC1825DDF8ADF1BE4279093D /* UITextField+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5ED507CF6DD09982AB34F578DA0DB78 /* UITextField+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 8D2645C93F214698390D8BF52F70EA73 /* PeekMetricView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8832161A29024E137EB1595664CCB68E /* PeekMetricView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 9598DCCBAC37426EDA6F235706150993 /* UIPicker+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = DAA1A55BE6EC649DC726FEC758722E13 /* UIPicker+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 9709DB477357071AF22F9113BD5ACF66 /* PeekOverlayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8CF787022C4E4C9E7C67E5DECB8C2DE /* PeekOverlayView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + A451F794BD2AFCE81AD5C03C08D16BB4 /* ReportActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4A7697186F2D7BDDBB053F2FC9128D9 /* ReportActivity.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + A460EA4D341C9AB3EF0C4A1F427612C4 /* UILabel+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D67B7280CCD53B52C6C586DAA3D75FA0 /* UILabel+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + A7CCD6B3E718542E0154A32E6C621078 /* UIImageView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42C44CA0BE2682F9A84A87F5FE2147AB /* UIImageView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + AF5B187C9C6112419AFFCBF62110BB3F /* PeekTapGestureRecognizer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21FD1628AA98E3FE30C522AE3AA03951 /* PeekTapGestureRecognizer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + B15E927C06E6A1EC3FD57B4399B52A7F /* ReportViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E143221245D4B19707E552B01A6E2BF /* ReportViewController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + B17594DE2DBE0250F5DBFA3468964ADB /* UIStepper+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 296D6248B65EF6861AE8AF40F306E273 /* UIStepper+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + BB6923CC5A6A381F75A61B48BFA81DDB /* Peek-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 80D160E53BE812C8E27B97D66A85EAE2 /* Peek-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BC5ECD5FAA2AA8FEEB2E519034D77070 /* PeekSectionedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C5F9CA104CBC8FB9417C449CDB6F8C0 /* PeekSectionedViewController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C2BEB378BCE80A52A03A0D92167D48A3 /* NSString+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CE31DDE8C54493592AEF19D577A023E /* NSString+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C3F41950EEBE5F381B77C6E706686379 /* UIBarButtonItem+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 582F2B9B55C29DD6FA9207FA424CDA50 /* UIBarButtonItem+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C6C7BD138C95AD9FD9FD12AA63898FB8 /* UIStackView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191A858A7DB5BCCF16FDA5415F59FCD2 /* UIStackView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C8A5BFC07703259D1B97F284955163BB /* Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A40ED9F830D7F95259964D3CBC8E03F /* Constraints.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + C96F04CB008B43A36471C45C981CD5F4 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEC98A316B68F3DC4B144EC3B5C46B65 /* Models.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + CA772D98950376BFBAAE87ED8C38696B /* PeekLayoutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0C8492E78F9B75AFC7A5E2DB24D43F /* PeekLayoutView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + CD74278AA12A3CA53CFEA861F607D5C7 /* NSAttributedString+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D45E18FF9546CECD2E1ED296F80FB8D /* NSAttributedString+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + D3437A8BA9F344605E6E978F7658E553 /* Attribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3512590F3691E0BDAC73AC3ADA368BB /* Attribute.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + D36B70DE79343176D5B4DB9D5DBDC2FC /* ColorAccessoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A99C53FAF3871FA288EF835E3CC8F92 /* ColorAccessoryView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + D4831779A591844EE2F4A08E1D2D1E2B /* ImageRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CE44048944A29B524DD583BD7340F56 /* ImageRenderer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + D78956F697C89040381D30392F8C87CA /* UIColor+Transformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = B640C404DBD922FBDA872347D5F6241E /* UIColor+Transformer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + D790E7F73C5DB4689D540CD7B90F7706 /* PreviewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF3051894A1D96046F285F0BBE957B49 /* PreviewCell.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + DAEE7ACF0E9B719B2B6ED32ABB454064 /* Images+OrientationMask.swift in Sources */ = {isa = PBXBuildFile; fileRef = 723DFD29E04A3191A78C36D20EEC7D86 /* Images+OrientationMask.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + DCB1395C7CACD6A6ABA713E30D8A87FD /* BoolAccessoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 25D972449D0B39FC0569FF6FF8139E27 /* BoolAccessoryView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + DD0978F42D210EA0E373B2C04EC1B454 /* Enum+Cases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 245035D918347109D22276EEB30AF7B0 /* Enum+Cases.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + DDF596F73999C371E42C1D7A0332F75C /* Platforms.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20BE6BF7525BF3CDB1ADE7BB35B8DB9F /* Platforms.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + DF5C6438EDAFE34BCE0E3ECE603D6B1F /* NSNumber+Transformer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 179C011576BE97110C024DAAAD65BBF7 /* NSNumber+Transformer.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + E0E8B2044B464FB2EFCA29807B3EB4AE /* PeekViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EEDD692434AC94485AAF3565C0388018 /* PeekViewController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + E2A282B8B4BF9B9A3C655112D98EE6DE /* UIApplication+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99458220D95E568B53BBE40EDB83BD53 /* UIApplication+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + E3E57B06C990ED886411BDE74DE61CAA /* UIImage+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF32C4AF3E7E7D38A1EF3C365646A962 /* UIImage+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + E513CD275108896DA9ED2AE44A1D2B7C /* UIControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 724A7B0DB2995EED0AE360622A0B2FD9 /* UIControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + E65085EF37AD7D5C3CEC164FCE47AC6C /* PeekInspectorViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE482DF718732AC5D55B7ABE4914BB9 /* PeekInspectorViewController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + EA32241A6A6CECFDA826C2FA4B941AAC /* ContextDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30F7677913C9AD4E300D39B350B1E565 /* ContextDataSource.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + EA9D533EB36CB9CF30B6335674D0B8CB /* UIViewController+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 201E93A8D8AB2DB6ABCDDF69CFD108DA /* UIViewController+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + ECF31777808FB1569BFD613624CF973C /* UINavigationBar+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91874C5B66FA1A1EB8BB853993E5C0AD /* UINavigationBar+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + EFC6C7ACD26E78FFEF01FBEE3C7DC03F /* NSObject+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 606499E5D7198A1D959A8B5B4D318FC1 /* NSObject+Extensions.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F3F1DC1FB2AF89C5F0B75889515BF8C9 /* RendererDrawable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 893A5D69258F4EBA47F2B9C19AF59294 /* RendererDrawable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F645C49CD02A1A1176AE0A01C1F18CBA /* UIImage+Resize.swift in Sources */ = {isa = PBXBuildFile; fileRef = 554BA39873CF7632FAC9ADF893AD16C6 /* UIImage+Resize.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + F8DBA347066E28279F067000A0A01A07 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */; }; + FC888804DE6D01F8A136B62F8CC411DE /* CollapsibleSections.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91B94AA71B2AA3F124B5A2365B2DB9E3 /* CollapsibleSections.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + FE1E064FC34E292384B00304FDE58497 /* CGSize+Resize.swift in Sources */ = {isa = PBXBuildFile; fileRef = A842509DE6DFD857113B00C47AB89A51 /* CGSize+Resize.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -107,122 +108,123 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 546766E9C6CBF018892B988929F960A7; + remoteGlobalIDString = FC4546EC10CFC508E9A761FAC085C246; remoteInfo = Peek; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 005D553572F2976AC81883634FA9E570 /* Images+Orientation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Images+Orientation.swift"; sourceTree = ""; }; - 03D30F199C27941FE73DC412DF38923C /* UIViewController+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewController+Extensions.swift"; sourceTree = ""; }; - 0652025D3A599B3EC2441EF757BF8357 /* UIPicker+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIPicker+Peekable.swift"; sourceTree = ""; }; - 068888927B67451ECDD0455679695142 /* Images+Inspectors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Images+Inspectors.swift"; sourceTree = ""; }; - 06A5EECB4251AA559C568344F93BD89B /* Peek.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Peek.xcconfig; sourceTree = ""; }; + 0514A4D095EF6CA62FD16D237ED41020 /* UIScrollView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Peekable.swift"; sourceTree = ""; }; + 07FF0156B81F6441DB76D00DC5CA2B33 /* UIViewController+Modal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewController+Modal.swift"; sourceTree = ""; }; 0825E30A8ABB4C0609FA66150A2DDB7A /* Pods-NotTwitter-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-NotTwitter-acknowledgements.markdown"; sourceTree = ""; }; - 09719C3CC5215377C350537944A89192 /* UITextView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITextView+Peekable.swift"; sourceTree = ""; }; - 0D2BB6CBBAB87C05DA883DE9A2320BB3 /* Pods_NotTwitter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NotTwitter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1C749367BACA995EC5C9A27EACABD47E /* ColorAccessoryView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ColorAccessoryView.swift; sourceTree = ""; }; + 0C12545D5EE54C5FC92A8BE304FE823D /* Peek.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = Peek.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 0D2BB6CBBAB87C05DA883DE9A2320BB3 /* Pods_NotTwitter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_NotTwitter.framework; path = "Pods-NotTwitter.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0DB60B0A34C4FACBCF74AFE6E37AACAA /* Renderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Renderer.swift; sourceTree = ""; }; + 100A9537D451E397D95E934896318DB2 /* LayoutManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LayoutManager.swift; sourceTree = ""; }; + 106055E6C8C2D7795977A411D8DD8F1C /* Group.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Group.swift; sourceTree = ""; }; + 179C011576BE97110C024DAAAD65BBF7 /* NSNumber+Transformer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSNumber+Transformer.swift"; sourceTree = ""; }; + 191A858A7DB5BCCF16FDA5415F59FCD2 /* UIStackView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIStackView+Peekable.swift"; sourceTree = ""; }; + 1A308064BA87CCD0FF5DDC3D4F45756B /* UIView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Peekable.swift"; sourceTree = ""; }; + 1CE31DDE8C54493592AEF19D577A023E /* NSString+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSString+Peekable.swift"; sourceTree = ""; }; 1E222DD791E9539A515F8FD7A1B39EB2 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 1E7BD2DC1A6BCC9BD0FB33906852A948 /* UISlider+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UISlider+Peekable.swift"; sourceTree = ""; }; - 22FD46F30957E595D961350F4937028B /* UIBarButtonItem+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIBarButtonItem+Peekable.swift"; sourceTree = ""; }; - 2327B847CA88BC70F973ACD26BC685FE /* CollapsibleSections.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CollapsibleSections.swift; sourceTree = ""; }; - 2537A4FC5D3B66C5A7F9E028F5D9B3B0 /* PeekMetricView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekMetricView.swift; sourceTree = ""; }; - 25533260A129F09B7C10D4AB5D1B0D8A /* UIColor+Transformer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+Transformer.swift"; sourceTree = ""; }; - 27EBCA6E389C9D1DC8C76A6062FCBE8C /* PeekPresentationController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekPresentationController.swift; sourceTree = ""; }; - 2D0FE5235F61B32F5D003D5845994B7C /* UIScrollView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Peekable.swift"; sourceTree = ""; }; - 2F79E3AE2B43913B577A387104D53A18 /* Images+OrientationMask.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Images+OrientationMask.swift"; sourceTree = ""; }; - 312AE50F424EF6CB1F62EDCC12AECA94 /* Color.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = ""; }; - 34C1FB04A3F50185A33ACB3E1B5AB429 /* UIActivityIndicatorView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIActivityIndicatorView+Peekable.swift"; sourceTree = ""; }; - 3A06CBFC6F9CB5C0F8EA38FD8B62D7E3 /* Report.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Report.swift; sourceTree = ""; }; - 3FFC87DDB6184A5562E396C09F7D74A8 /* Color+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Color+Extensions.swift"; sourceTree = ""; }; - 40C3B3B06351A6EF60CCD0876E633213 /* NSNumber+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSNumber+Extensions.swift"; sourceTree = ""; }; - 40FB951F7B86F4C0491C5E45731927C2 /* PeekButton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekButton.swift; sourceTree = ""; }; - 418E4028C8BDD96BAA31629B1DE889D1 /* LayoutManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LayoutManager.swift; sourceTree = ""; }; - 48780DCA506E871392725BE37BD60AC3 /* PeekInspectorCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekInspectorCell.swift; sourceTree = ""; }; + 201E93A8D8AB2DB6ABCDDF69CFD108DA /* UIViewController+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewController+Peekable.swift"; sourceTree = ""; }; + 20BE6BF7525BF3CDB1ADE7BB35B8DB9F /* Platforms.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Platforms.swift; sourceTree = ""; }; + 21FD1628AA98E3FE30C522AE3AA03951 /* PeekTapGestureRecognizer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekTapGestureRecognizer.swift; sourceTree = ""; }; + 245035D918347109D22276EEB30AF7B0 /* Enum+Cases.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Enum+Cases.swift"; sourceTree = ""; }; + 25A35AC996232EDA99D791704B5F40E6 /* Images+Inspectors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Images+Inspectors.swift"; sourceTree = ""; }; + 25CA96DC90448B716356500F6FAB0003 /* String+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = ""; }; + 25D972449D0B39FC0569FF6FF8139E27 /* BoolAccessoryView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BoolAccessoryView.swift; sourceTree = ""; }; + 264BAC893E38FB7C15C43FFA5C2BAD31 /* UISlider+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UISlider+Peekable.swift"; sourceTree = ""; }; + 268975FA742758A565DADF96B4C6F928 /* Peek-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Peek-dummy.m"; sourceTree = ""; }; + 296D6248B65EF6861AE8AF40F306E273 /* UIStepper+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIStepper+Peekable.swift"; sourceTree = ""; }; + 2CE44048944A29B524DD583BD7340F56 /* ImageRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ImageRenderer.swift; sourceTree = ""; }; + 2CE55B9AD11FCFA806540B9AEBDC7F21 /* Bundle+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Bundle+Peekable.swift"; sourceTree = ""; }; + 2D10E3F5C38A6ACC92723BFCE14A3481 /* PeekPresentationController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekPresentationController.swift; sourceTree = ""; }; + 30F7677913C9AD4E300D39B350B1E565 /* ContextDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ContextDataSource.swift; sourceTree = ""; }; + 369BB6EA47BB4568B60C1E10F77F6C31 /* UISegmentedControl+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UISegmentedControl+Peekable.swift"; sourceTree = ""; }; + 384AEC3584DCA7A77D3A328667A1C5FF /* Coordinator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Coordinator.swift; sourceTree = ""; }; + 39A83A01FA929BCDC9A66919F3216457 /* Peek-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Peek-prefix.pch"; sourceTree = ""; }; + 426D37AFC74617DB3E41A0E22174D38A /* PeekOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PeekOptions.swift; path = Pod/Classes/PeekOptions.swift; sourceTree = ""; }; + 42C44CA0BE2682F9A84A87F5FE2147AB /* UIImageView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImageView+Peekable.swift"; sourceTree = ""; }; 48FC315E16CE484A3CBC2DF2FC0107BD /* Pods-NotTwitter.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-NotTwitter.modulemap"; sourceTree = ""; }; - 4E2E5E9ABB478CFDFF53F3C538BA1A85 /* PeekLayoutView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekLayoutView.swift; sourceTree = ""; }; + 4C0C8492E78F9B75AFC7A5E2DB24D43F /* PeekLayoutView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekLayoutView.swift; sourceTree = ""; }; 4E5508AC826808D6BE9A4EB649EB6637 /* Pods-NotTwitter-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-NotTwitter-resources.sh"; sourceTree = ""; }; - 4EB8DC96C865727F69BA764998915782 /* UIPageControl+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIPageControl+Peekable.swift"; sourceTree = ""; }; - 505E7F0B5A89010244CF701C8B81250C /* UIView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Peekable.swift"; sourceTree = ""; }; - 5659801B8483436A817D4ABC5F805E8F /* UIScreen+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIScreen+Peekable.swift"; sourceTree = ""; }; - 595B6CC47E70CA929EAAEFDA9ECC0946 /* PeekInspectorViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekInspectorViewController.swift; sourceTree = ""; }; - 5B875A5AC5B3CB98DBA575556B24E95F /* UIView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Extensions.swift"; sourceTree = ""; }; - 5BEA4AC6DC6B6B82ECE721B61A1EF3DD /* NSString+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSString+Peekable.swift"; sourceTree = ""; }; - 607C1265DAA26C20B8A8C4FB5E603E02 /* UISwitch+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UISwitch+Peekable.swift"; sourceTree = ""; }; - 61166003FEB5DBDFEB2A02F0993E2375 /* PeekSectionedViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekSectionedViewController.swift; sourceTree = ""; }; - 63D8282847AA8E8EFB9818E8B6DFCE05 /* UIViewController+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewController+Peekable.swift"; sourceTree = ""; }; + 5069C98E696E3AC31FE37081CA4FA3BD /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + 51A7C7C54059580E7C1EEB91A7D7D97D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 554BA39873CF7632FAC9ADF893AD16C6 /* UIImage+Resize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImage+Resize.swift"; sourceTree = ""; }; + 582F2B9B55C29DD6FA9207FA424CDA50 /* UIBarButtonItem+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIBarButtonItem+Peekable.swift"; sourceTree = ""; }; + 5A99C53FAF3871FA288EF835E3CC8F92 /* ColorAccessoryView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ColorAccessoryView.swift; sourceTree = ""; }; + 5AFDD8C5B78E892E3CD9B3CCCBFA28FF /* Report.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Report.swift; sourceTree = ""; }; + 5BD2CBFE327B12B400B822F1552F90EC /* Enum+Descriptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Enum+Descriptions.swift"; sourceTree = ""; }; + 5C5F9CA104CBC8FB9417C449CDB6F8C0 /* PeekSectionedViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekSectionedViewController.swift; sourceTree = ""; }; + 5D45E18FF9546CECD2E1ED296F80FB8D /* NSAttributedString+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSAttributedString+Peekable.swift"; sourceTree = ""; }; + 606499E5D7198A1D959A8B5B4D318FC1 /* NSObject+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSObject+Extensions.swift"; sourceTree = ""; }; + 61717C4EB7EC219A8D8E39C2E049B576 /* UIWindow+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIWindow+Extensions.swift"; sourceTree = ""; }; + 61F405FC4E747440D83BE45B1690C0D7 /* CALayer+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CALayer+Peekable.swift"; sourceTree = ""; }; 6604A7D69453B4569E4E4827FB9155A9 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 67A91952CD826164B5495B3AC4C7BB09 /* Group.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Group.swift; sourceTree = ""; }; - 6FF2122E27E9622018E3091368466957 /* NSLayoutConstraint+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSLayoutConstraint+Peekable.swift"; sourceTree = ""; }; - 76E40F261535D480E0F9E6FDC86F2F8D /* PeekOptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PeekOptions.swift; path = Pod/Classes/PeekOptions.swift; sourceTree = ""; }; - 7A457608A5C88B1F080FCABD01753CF4 /* NSAttributedString+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSAttributedString+Peekable.swift"; sourceTree = ""; }; - 7AF941F49979EAB3DD937C212AD14FD9 /* Peek-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Peek-dummy.m"; sourceTree = ""; }; - 7B924F90D2D173F5D2B50A02F1CF6CDA /* UIProgressView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIProgressView+Peekable.swift"; sourceTree = ""; }; - 7B95BD411F5FD11493207C2C18ACCFEF /* UIButton+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIButton+Peekable.swift"; sourceTree = ""; }; - 7C515995549889FD1810CBAE6E6C423D /* Peek.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = Peek.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 7E80F2EC5761F71B63A07FB7DACF296A /* UINavigationBar+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UINavigationBar+Peekable.swift"; sourceTree = ""; }; + 66D6116E25E97EB242374838669F0A10 /* UISwitch+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UISwitch+Peekable.swift"; sourceTree = ""; }; + 6AD9325C7033118C7E6D1DBD4AF98375 /* UIFont+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIFont+Peekable.swift"; sourceTree = ""; }; + 6CD3C682222D2A0DEE3FBBA6A5AC3F77 /* PeekTheme+Colors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "PeekTheme+Colors.swift"; path = "Pod/Classes/PeekTheme+Colors.swift"; sourceTree = ""; }; + 6E49AECF68401BE06609604056642A01 /* Color.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Color.swift; sourceTree = ""; }; + 6F7728391455F1D6CDE04777AE9594C3 /* Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Peekable.swift; sourceTree = ""; }; + 6FE482DF718732AC5D55B7ABE4914BB9 /* PeekInspectorViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekInspectorViewController.swift; sourceTree = ""; }; + 723DFD29E04A3191A78C36D20EEC7D86 /* Images+OrientationMask.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Images+OrientationMask.swift"; sourceTree = ""; }; + 724A7B0DB2995EED0AE360622A0B2FD9 /* UIControl+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIControl+Peekable.swift"; sourceTree = ""; }; + 7BEB72306033F22F0FC12F4FF33350AB /* PeekButton.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekButton.swift; sourceTree = ""; }; + 7E143221245D4B19707E552B01A6E2BF /* ReportViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReportViewController.swift; sourceTree = ""; }; 7F62E2046F7ED2BA591588F5F53A64E0 /* Pods-NotTwitter.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-NotTwitter.debug.xcconfig"; sourceTree = ""; }; - 80EA8038937B34C275BBD367F7ECD3B5 /* UIDevice+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIDevice+Peekable.swift"; sourceTree = ""; }; - 837E0FD264E93EB77FE6CCE7EA05CF66 /* ImageRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ImageRenderer.swift; sourceTree = ""; }; - 83F2DD6FA47D661F6046F96B150E8A22 /* Peek.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Peek.modulemap; sourceTree = ""; }; - 8522543E5E577D8ED7CF0AFCB7A7D4B0 /* PeekTextOverlayView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekTextOverlayView.swift; sourceTree = ""; }; - 86F1AE3FAD2424823002EEF6F1549428 /* Renderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Renderer.swift; sourceTree = ""; }; - 8762E9349865E5A6818AE7A135E3CE04 /* UIFont+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIFont+Peekable.swift"; sourceTree = ""; }; - 883EA4BB41D855B10D619CB45FA5DBFB /* BoolAccessoryView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BoolAccessoryView.swift; sourceTree = ""; }; - 8948709C925D8DFFB480B69AFD835DC3 /* Enum+Descriptions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Enum+Descriptions.swift"; sourceTree = ""; }; - 8AFCF0C3E940B13CAAE52D0ACE398BA9 /* PreviewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PreviewCell.swift; sourceTree = ""; }; + 80D160E53BE812C8E27B97D66A85EAE2 /* Peek-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Peek-umbrella.h"; sourceTree = ""; }; + 83D8C695F9F99339C64DD67CD776BD33 /* VolumeController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VolumeController.swift; path = Pod/Classes/VolumeController.swift; sourceTree = ""; }; + 848AD190AEA8663242F4A24ED993AFAC /* UIActivityIndicatorView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIActivityIndicatorView+Peekable.swift"; sourceTree = ""; }; + 8832161A29024E137EB1595664CCB68E /* PeekMetricView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekMetricView.swift; sourceTree = ""; }; + 893A5D69258F4EBA47F2B9C19AF59294 /* RendererDrawable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RendererDrawable.swift; sourceTree = ""; }; + 89F5B60CF9E69BFD25BBAE956F84BC28 /* NSNumber+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSNumber+Extensions.swift"; sourceTree = ""; }; + 8A40ED9F830D7F95259964D3CBC8E03F /* Constraints.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Constraints.swift; sourceTree = ""; }; 8B5FE09993E37A2C4E0EA4D8AF2CE98D /* Pods-NotTwitter.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-NotTwitter.release.xcconfig"; sourceTree = ""; }; - 8C1FD5AD5BF562B968FCA37B943F74EC /* Platforms.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Platforms.swift; sourceTree = ""; }; - 8DA14D50846F0449CF0E84A18EE5159D /* UITextField+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITextField+Peekable.swift"; sourceTree = ""; }; - 9373FB60422A142202EE7EE29FDE2B53 /* String+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 9A6925E13D83DC5DA76DF30BD76785FA /* VolumeController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = VolumeController.swift; path = Pod/Classes/VolumeController.swift; sourceTree = ""; }; - 9C9F1DBDEB67F1DC5776CE937B79D9C8 /* Peek.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Peek.swift; path = Pod/Classes/Peek.swift; sourceTree = ""; }; - A1A39970A5620E5119B5DE39B946CB75 /* CGSize+Resize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGSize+Resize.swift"; sourceTree = ""; }; - A3B9FF5FB0C0641504E6E84278B6953B /* RendererDrawable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = RendererDrawable.swift; sourceTree = ""; }; - A5FB49D2ADCC01135011E969DD98E735 /* PeekOverlayView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekOverlayView.swift; sourceTree = ""; }; - A60C495F9BE238166BE1A050D8A6C01F /* UIImage+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImage+Peekable.swift"; sourceTree = ""; }; - A75C6D14EC824A55740B4A4B7CE9970C /* UIStackView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIStackView+Peekable.swift"; sourceTree = ""; }; - A79AF99FFCF2862E38BEF9071618F414 /* UIColor+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+Peekable.swift"; sourceTree = ""; }; - A923D033F3391AF3B11228237BFE8C74 /* ReportActivity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReportActivity.swift; sourceTree = ""; }; - A9383A964FB771512B41D6D37BE82553 /* Attribute.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Attribute.swift; sourceTree = ""; }; - AB5EA617FA65EF4BF30BAE1CF807414A /* UISegmentedControl+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UISegmentedControl+Peekable.swift"; sourceTree = ""; }; - AB9E9EC1AC7CAA829ACD68FDA8087F3D /* PeekLayoutOverlayView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekLayoutOverlayView.swift; sourceTree = ""; }; - AEC8BC3EBF85324CDECF2AC9D46DE326 /* UIToolbar+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIToolbar+Peekable.swift"; sourceTree = ""; }; - B36E3E59BDDE0713C14498872D79BEAD /* PDFRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PDFRenderer.swift; sourceTree = ""; }; - B5B68F672DE2B0B76C2CDA9D4C54C1D2 /* NSValue+Transformer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSValue+Transformer.swift"; sourceTree = ""; }; - B622879D927F0A1C51950A487D488654 /* NSNumber+Transformer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSNumber+Transformer.swift"; sourceTree = ""; }; - B68FDA92C209A54D14360873C695018C /* PeekTapGestureRecognizer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekTapGestureRecognizer.swift; sourceTree = ""; }; - B8CC358289A677B621A061F4BDB2C61A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 8E04116546B8C648DA5E610688CC42D5 /* Peek.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Peek.modulemap; sourceTree = ""; }; + 91874C5B66FA1A1EB8BB853993E5C0AD /* UINavigationBar+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UINavigationBar+Peekable.swift"; sourceTree = ""; }; + 91B94AA71B2AA3F124B5A2365B2DB9E3 /* CollapsibleSections.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CollapsibleSections.swift; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 97EF0163AE305299461B0D4478EAB67F /* Peek.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Peek.swift; path = Pod/Classes/Peek.swift; sourceTree = ""; }; + 99458220D95E568B53BBE40EDB83BD53 /* UIApplication+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIApplication+Peekable.swift"; sourceTree = ""; }; + 9A6D6FEB4BB637E7FCCE8B07BBAF6E5A /* PeekInspectorCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekInspectorCell.swift; sourceTree = ""; }; + A842509DE6DFD857113B00C47AB89A51 /* CGSize+Resize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CGSize+Resize.swift"; sourceTree = ""; }; + A8BAAFE4F90F9ECEF2D933C80C2292FD /* UIView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Extensions.swift"; sourceTree = ""; }; + AC4E724A201BA394AC30E9498545B241 /* UIColor+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+Peekable.swift"; sourceTree = ""; }; + ADF403AF8DB474B8EEAE5413D72FD442 /* UITextView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITextView+Peekable.swift"; sourceTree = ""; }; + AEC98A316B68F3DC4B144EC3B5C46B65 /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; + AF3051894A1D96046F285F0BBE957B49 /* PreviewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PreviewCell.swift; sourceTree = ""; }; + AFE7F873ED2023A824B5E1EEF3B09CB8 /* UIToolbar+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIToolbar+Peekable.swift"; sourceTree = ""; }; + B027FB8F3CC6183AB5D5A2B0BC5154AE /* NSLayoutConstraint+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSLayoutConstraint+Peekable.swift"; sourceTree = ""; }; + B3512590F3691E0BDAC73AC3ADA368BB /* Attribute.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Attribute.swift; sourceTree = ""; }; + B47A0788BB651CAF3D000191E97F7E01 /* NSValue+Transformer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSValue+Transformer.swift"; sourceTree = ""; }; + B640C404DBD922FBDA872347D5F6241E /* UIColor+Transformer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+Transformer.swift"; sourceTree = ""; }; + B858A0F57683506584C8D6F009542610 /* UIScreen+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIScreen+Peekable.swift"; sourceTree = ""; }; + BAE3F75C912D350A1FBA3B2436DC63E3 /* PeekSelectionView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekSelectionView.swift; sourceTree = ""; }; BB7EF4BE2182CBDA0BE5E9F4A02AF8B5 /* Pods-NotTwitter-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-NotTwitter-frameworks.sh"; sourceTree = ""; }; - BD04AF7E8B1A8472992D54DC5CB933BC /* UIControl+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIControl+Peekable.swift"; sourceTree = ""; }; - BE684CF6846D1660BEC2A4D2D03E314F /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - BE7F872393FDB6F1C42F00B25D0979BE /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; - C0C5FE31770F06314B098EA60BD07D3A /* UIStepper+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIStepper+Peekable.swift"; sourceTree = ""; }; C23D7639072EE47EB80B8321C7D50813 /* Pods-NotTwitter-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-NotTwitter-dummy.m"; sourceTree = ""; }; - C32D7141488B86BD074AD238CE71404C /* UIWindow+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIWindow+Extensions.swift"; sourceTree = ""; }; - CECCD1F1CFB155357F3F22C78CD92DD1 /* Constraints.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Constraints.swift; sourceTree = ""; }; - D2219C9C5D7F4BDA0A5DA0ECDDBBC641 /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; - D315832C5C89E6C18EF7C4C670530A5F /* UILabel+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UILabel+Peekable.swift"; sourceTree = ""; }; - D572ABB4B30092857009FCD960EF98EA /* Coordinator.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Coordinator.swift; sourceTree = ""; }; - D72BB54A478FCA1715339A761E4C8485 /* PeekViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekViewController.swift; sourceTree = ""; }; - DA541E0D49E697800ACEEF722DA1A97F /* UIImageView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImageView+Peekable.swift"; sourceTree = ""; }; - DC4B8D2E8BB0D51AB6819BE2CFC73565 /* Bundle+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Bundle+Peekable.swift"; sourceTree = ""; }; - DE8FDC586B2A52D65ED003CAEBBAD3B9 /* NSObject+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSObject+Extensions.swift"; sourceTree = ""; }; + CF32C4AF3E7E7D38A1EF3C365646A962 /* UIImage+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImage+Peekable.swift"; sourceTree = ""; }; + D179539BADBCE6D387E74D35404C3494 /* UIDevice+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIDevice+Peekable.swift"; sourceTree = ""; }; + D1F0F130B6925E55C6F0867E598686F0 /* Images+Orientation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Images+Orientation.swift"; sourceTree = ""; }; + D4090306352B4CABF6042647FDD565E7 /* UIViewController+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewController+Extensions.swift"; sourceTree = ""; }; + D5ED507CF6DD09982AB34F578DA0DB78 /* UITextField+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITextField+Peekable.swift"; sourceTree = ""; }; + D67B7280CCD53B52C6C586DAA3D75FA0 /* UILabel+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UILabel+Peekable.swift"; sourceTree = ""; }; + DAA1A55BE6EC649DC726FEC758722E13 /* UIPicker+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIPicker+Peekable.swift"; sourceTree = ""; }; DF08ED7ABA45C2470212A1D7BCEF336E /* Pods-NotTwitter-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-NotTwitter-umbrella.h"; sourceTree = ""; }; + DF3F848DF631BA320E0F8FD6D5A20A9B /* UIButton+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIButton+Peekable.swift"; sourceTree = ""; }; E0825A2C28EC536C2D6A5E0704195E0D /* Pods-NotTwitter-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-NotTwitter-acknowledgements.plist"; sourceTree = ""; }; - E17105EBB6756B4338B84F8866F09D94 /* Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Peekable.swift; sourceTree = ""; }; - E5C5038F904665E2FD8BC765D062B94D /* ReportViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReportViewController.swift; sourceTree = ""; }; - E8B53F64139B844C7F6A5153E68A503F /* UIImage+Resize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImage+Resize.swift"; sourceTree = ""; }; - E9A63F66C0EE854FC0D90EF20A80F753 /* Peek.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Peek.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - ED1F9AFF816E26D21D65326D39654920 /* PeekSelectionView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekSelectionView.swift; sourceTree = ""; }; - ED7CF7547DDDD7610DFDAB4FE5074EE1 /* UIApplication+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIApplication+Peekable.swift"; sourceTree = ""; }; - EE576A7508E59F8C49F9EFDA1CDA22B0 /* ContextDataSource.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ContextDataSource.swift; sourceTree = ""; }; - F17E823F6E266E1E1509D0B2AC20883B /* UIViewController+Modal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewController+Modal.swift"; sourceTree = ""; }; - F7C256D8FFF99482DF131E2A529B5C8F /* CALayer+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "CALayer+Peekable.swift"; sourceTree = ""; }; - F834A528ADB5E3FC93835DB9893D5D4E /* Enum+Cases.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Enum+Cases.swift"; sourceTree = ""; }; - FAEC4340D1686C8B769EBDA40FE03E12 /* Peek-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Peek-umbrella.h"; sourceTree = ""; }; - FB443C6AA8B3DDDAC7ECB6B621E6B7B7 /* Peek-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Peek-prefix.pch"; sourceTree = ""; }; + E09CF42E7B4512F56F0E46FA61047867 /* PeekTextOverlayView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekTextOverlayView.swift; sourceTree = ""; }; + E2D544D7CD3A55684CB9EFD3F073748B /* UIProgressView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIProgressView+Peekable.swift"; sourceTree = ""; }; + E82C2EF0097E2C3CD3FBB1D84188D45D /* UIPageControl+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIPageControl+Peekable.swift"; sourceTree = ""; }; + E9A63F66C0EE854FC0D90EF20A80F753 /* Peek.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Peek.framework; path = Peek.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E9C5A89C80DB1E20D03E29C9BABE817D /* Peek.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Peek.xcconfig; sourceTree = ""; }; + EEDD692434AC94485AAF3565C0388018 /* PeekViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekViewController.swift; sourceTree = ""; }; + F4A7697186F2D7BDDBB053F2FC9128D9 /* ReportActivity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReportActivity.swift; sourceTree = ""; }; + F4B76134CF3E2AC7E0FE04B10EC3FD11 /* Color+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Color+Extensions.swift"; sourceTree = ""; }; + F8A78419F7C4CC8D64B8F160890B9D23 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + F8CF787022C4E4C9E7C67E5DECB8C2DE /* PeekOverlayView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekOverlayView.swift; sourceTree = ""; }; + F9ADE005450871A80FEDB9D798CAF8F4 /* PDFRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PDFRenderer.swift; sourceTree = ""; }; + FA5272DF70766EA743CA218AEC04A915 /* PeekLayoutOverlayView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekLayoutOverlayView.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -234,203 +236,230 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - A361F77B6C46F763AEE9463BB642ABB2 /* Frameworks */ = { + B55C34C445E83F671CAD2F3B06C28E32 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 600AB4D3E094EF9A67310A248F2F5C5B /* Foundation.framework in Frameworks */, + F8DBA347066E28279F067000A0A01A07 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 012FF7049A0D9821DBEF8FA6341BABC9 /* Images */ = { + 026E0FACD57415294985B18474794F1E /* Inspectors */ = { isa = PBXGroup; children = ( - 068888927B67451ECDD0455679695142 /* Images+Inspectors.swift */, - 005D553572F2976AC81883634FA9E570 /* Images+Orientation.swift */, - 2F79E3AE2B43913B577A387104D53A18 /* Images+OrientationMask.swift */, + 91B94AA71B2AA3F124B5A2365B2DB9E3 /* CollapsibleSections.swift */, + 9A6D6FEB4BB637E7FCCE8B07BBAF6E5A /* PeekInspectorCell.swift */, + AF3051894A1D96046F285F0BBE957B49 /* PreviewCell.swift */, ); - name = Images; - path = Pod/Classes/Images; + name = Inspectors; + path = Inspectors; sourceTree = ""; }; - 056E9DDB0A29DBCC731084EB1EBB9B3B /* Peek */ = { + 028115C47EB5D50DA33E74F6E35C849E /* Text */ = { isa = PBXGroup; children = ( - 9C9F1DBDEB67F1DC5776CE937B79D9C8 /* Peek.swift */, - 76E40F261535D480E0F9E6FDC86F2F8D /* PeekOptions.swift */, - 9A6925E13D83DC5DA76DF30BD76785FA /* VolumeController.swift */, - D82D3D1EB40745BAADDFE2C9BA89950C /* Accessory Views */, - BFA7D6C18DEB76393BEA255FEF24A295 /* Controllers & Views */, - 5C0A5AEFA48B070AB6BBD3AFDCABE9F8 /* Coordinator */, - FCBA5C7BA28183A0A7153E7EE9C76C87 /* GraphicsRenderer */, - 54F9CD8998A305EB1D324E5BD5AFE1DF /* Helpers */, - 012FF7049A0D9821DBEF8FA6341BABC9 /* Images */, - 509ECAE090CCCFF5A5852749ADCF7D09 /* Model */, - 257DD1C1F5C9A8A2EEA23F0B1C1B52DC /* Peekable */, - 9A95D8003659848BE4906DAB45535ACF /* Pod */, - D117B4F93E402599BC0C2E7E31DDC74F /* Support Files */, - 96FC08F6D92ED64A158A7D3FD7E83545 /* Transformers */, + 100A9537D451E397D95E934896318DB2 /* LayoutManager.swift */, + E09CF42E7B4512F56F0E46FA61047867 /* PeekTextOverlayView.swift */, ); - name = Peek; - path = ../..; + name = Text; + path = Text; sourceTree = ""; }; - 11CBB3D0778700ACD15A4A057D569A9D /* Layout */ = { + 1CF6331EFF1EDFC9DB8689BC74912E0B /* Pod */ = { isa = PBXGroup; children = ( - AB9E9EC1AC7CAA829ACD68FDA8087F3D /* PeekLayoutOverlayView.swift */, - 4E2E5E9ABB478CFDFF53F3C538BA1A85 /* PeekLayoutView.swift */, - 2537A4FC5D3B66C5A7F9E028F5D9B3B0 /* PeekMetricView.swift */, + 5069C98E696E3AC31FE37081CA4FA3BD /* LICENSE */, + 0C12545D5EE54C5FC92A8BE304FE823D /* Peek.podspec */, + F8A78419F7C4CC8D64B8F160890B9D23 /* README.md */, ); - path = Layout; + name = Pod; sourceTree = ""; }; - 14554F36BF2048DB9A59FEBC32D33FA8 /* Text */ = { + 24C1631D415135B041806CB0CB275333 /* Coordinator */ = { isa = PBXGroup; children = ( - 418E4028C8BDD96BAA31629B1DE889D1 /* LayoutManager.swift */, - 8522543E5E577D8ED7CF0AFCB7A7D4B0 /* PeekTextOverlayView.swift */, + B3512590F3691E0BDAC73AC3ADA368BB /* Attribute.swift */, + 384AEC3584DCA7A77D3A328667A1C5FF /* Coordinator.swift */, + 106055E6C8C2D7795977A411D8DD8F1C /* Group.swift */, ); - path = Text; + name = Coordinator; + path = Pod/Classes/Coordinator; sourceTree = ""; }; - 257DD1C1F5C9A8A2EEA23F0B1C1B52DC /* Peekable */ = { + 25EA7E5D2C51F8D3B9E841D3B7758BAD /* Overlays */ = { isa = PBXGroup; children = ( - DC4B8D2E8BB0D51AB6819BE2CFC73565 /* Bundle+Peekable.swift */, - F7C256D8FFF99482DF131E2A529B5C8F /* CALayer+Peekable.swift */, - 7A457608A5C88B1F080FCABD01753CF4 /* NSAttributedString+Peekable.swift */, - 6FF2122E27E9622018E3091368466957 /* NSLayoutConstraint+Peekable.swift */, - 5BEA4AC6DC6B6B82ECE721B61A1EF3DD /* NSString+Peekable.swift */, - 34C1FB04A3F50185A33ACB3E1B5AB429 /* UIActivityIndicatorView+Peekable.swift */, - ED7CF7547DDDD7610DFDAB4FE5074EE1 /* UIApplication+Peekable.swift */, - 22FD46F30957E595D961350F4937028B /* UIBarButtonItem+Peekable.swift */, - 7B95BD411F5FD11493207C2C18ACCFEF /* UIButton+Peekable.swift */, - A79AF99FFCF2862E38BEF9071618F414 /* UIColor+Peekable.swift */, - BD04AF7E8B1A8472992D54DC5CB933BC /* UIControl+Peekable.swift */, - 80EA8038937B34C275BBD367F7ECD3B5 /* UIDevice+Peekable.swift */, - 8762E9349865E5A6818AE7A135E3CE04 /* UIFont+Peekable.swift */, - A60C495F9BE238166BE1A050D8A6C01F /* UIImage+Peekable.swift */, - DA541E0D49E697800ACEEF722DA1A97F /* UIImageView+Peekable.swift */, - D315832C5C89E6C18EF7C4C670530A5F /* UILabel+Peekable.swift */, - 7E80F2EC5761F71B63A07FB7DACF296A /* UINavigationBar+Peekable.swift */, - 4EB8DC96C865727F69BA764998915782 /* UIPageControl+Peekable.swift */, - 0652025D3A599B3EC2441EF757BF8357 /* UIPicker+Peekable.swift */, - 7B924F90D2D173F5D2B50A02F1CF6CDA /* UIProgressView+Peekable.swift */, - 5659801B8483436A817D4ABC5F805E8F /* UIScreen+Peekable.swift */, - 2D0FE5235F61B32F5D003D5845994B7C /* UIScrollView+Peekable.swift */, - AB5EA617FA65EF4BF30BAE1CF807414A /* UISegmentedControl+Peekable.swift */, - 1E7BD2DC1A6BCC9BD0FB33906852A948 /* UISlider+Peekable.swift */, - A75C6D14EC824A55740B4A4B7CE9970C /* UIStackView+Peekable.swift */, - C0C5FE31770F06314B098EA60BD07D3A /* UIStepper+Peekable.swift */, - 607C1265DAA26C20B8A8C4FB5E603E02 /* UISwitch+Peekable.swift */, - 8DA14D50846F0449CF0E84A18EE5159D /* UITextField+Peekable.swift */, - 09719C3CC5215377C350537944A89192 /* UITextView+Peekable.swift */, - AEC8BC3EBF85324CDECF2AC9D46DE326 /* UIToolbar+Peekable.swift */, - 505E7F0B5A89010244CF701C8B81250C /* UIView+Peekable.swift */, - 63D8282847AA8E8EFB9818E8B6DFCE05 /* UIViewController+Peekable.swift */, + 7BEB72306033F22F0FC12F4FF33350AB /* PeekButton.swift */, + F8CF787022C4E4C9E7C67E5DECB8C2DE /* PeekOverlayView.swift */, + BAE3F75C912D350A1FBA3B2436DC63E3 /* PeekSelectionView.swift */, + 6EDB6392E84FA5CCA63C75C90F9788B3 /* Layout */, + 028115C47EB5D50DA33E74F6E35C849E /* Text */, ); - name = Peekable; - path = Pod/Classes/Peekable; + name = Overlays; + path = Overlays; sourceTree = ""; }; - 509ECAE090CCCFF5A5852749ADCF7D09 /* Model */ = { + 2D21275270432221808AE7BF0151839E /* Accessory Views */ = { isa = PBXGroup; children = ( - EE576A7508E59F8C49F9EFDA1CDA22B0 /* ContextDataSource.swift */, - D2219C9C5D7F4BDA0A5DA0ECDDBBC641 /* Models.swift */, - E17105EBB6756B4338B84F8866F09D94 /* Peekable.swift */, + 25D972449D0B39FC0569FF6FF8139E27 /* BoolAccessoryView.swift */, + 5A99C53FAF3871FA288EF835E3CC8F92 /* ColorAccessoryView.swift */, ); - name = Model; - path = Pod/Classes/Model; + name = "Accessory Views"; + path = "Pod/Classes/Accessory Views"; sourceTree = ""; }; - 51987B5A841E44AB628915C927A81D8A /* Inspectors */ = { + 3413E3E0E055637BE6E5212E890CEE95 /* Support Files */ = { isa = PBXGroup; children = ( - 2327B847CA88BC70F973ACD26BC685FE /* CollapsibleSections.swift */, - 48780DCA506E871392725BE37BD60AC3 /* PeekInspectorCell.swift */, - 8AFCF0C3E940B13CAAE52D0ACE398BA9 /* PreviewCell.swift */, + 51A7C7C54059580E7C1EEB91A7D7D97D /* Info.plist */, + 8E04116546B8C648DA5E610688CC42D5 /* Peek.modulemap */, + E9C5A89C80DB1E20D03E29C9BABE817D /* Peek.xcconfig */, + 268975FA742758A565DADF96B4C6F928 /* Peek-dummy.m */, + 39A83A01FA929BCDC9A66919F3216457 /* Peek-prefix.pch */, + 80D160E53BE812C8E27B97D66A85EAE2 /* Peek-umbrella.h */, ); - path = Inspectors; + name = "Support Files"; + path = "Example/Pods/Target Support Files/Peek"; sourceTree = ""; }; - 54F9CD8998A305EB1D324E5BD5AFE1DF /* Helpers */ = { + 3A4FD2893EC893FB59956DC500E1F506 /* Peek */ = { isa = PBXGroup; children = ( - A1A39970A5620E5119B5DE39B946CB75 /* CGSize+Resize.swift */, - 312AE50F424EF6CB1F62EDCC12AECA94 /* Color.swift */, - 3FFC87DDB6184A5562E396C09F7D74A8 /* Color+Extensions.swift */, - CECCD1F1CFB155357F3F22C78CD92DD1 /* Constraints.swift */, - F834A528ADB5E3FC93835DB9893D5D4E /* Enum+Cases.swift */, - 8948709C925D8DFFB480B69AFD835DC3 /* Enum+Descriptions.swift */, - 40C3B3B06351A6EF60CCD0876E633213 /* NSNumber+Extensions.swift */, - DE8FDC586B2A52D65ED003CAEBBAD3B9 /* NSObject+Extensions.swift */, - B68FDA92C209A54D14360873C695018C /* PeekTapGestureRecognizer.swift */, - 9373FB60422A142202EE7EE29FDE2B53 /* String+Extensions.swift */, - E8B53F64139B844C7F6A5153E68A503F /* UIImage+Resize.swift */, - 5B875A5AC5B3CB98DBA575556B24E95F /* UIView+Extensions.swift */, - 03D30F199C27941FE73DC412DF38923C /* UIViewController+Extensions.swift */, - C32D7141488B86BD074AD238CE71404C /* UIWindow+Extensions.swift */, + 97EF0163AE305299461B0D4478EAB67F /* Peek.swift */, + 426D37AFC74617DB3E41A0E22174D38A /* PeekOptions.swift */, + 6CD3C682222D2A0DEE3FBBA6A5AC3F77 /* PeekTheme+Colors.swift */, + 83D8C695F9F99339C64DD67CD776BD33 /* VolumeController.swift */, + 2D21275270432221808AE7BF0151839E /* Accessory Views */, + 61ED7A1C873D11B7290F87EE270D11E4 /* Controllers & Views */, + 24C1631D415135B041806CB0CB275333 /* Coordinator */, + 889B3E645E5C2874AC8D0A61E2A2CBCD /* GraphicsRenderer */, + C43CDF008D98CB533EE9EF0676DD991E /* Helpers */, + A7598B71C52AEE6C843FFDE41D10FD51 /* Images */, + 903538677589150D6CAF5E0701BD53A4 /* Model */, + 552C9EB17E649B3CD1A5AF8A310AA9E8 /* Peekable */, + 1CF6331EFF1EDFC9DB8689BC74912E0B /* Pod */, + 3413E3E0E055637BE6E5212E890CEE95 /* Support Files */, + 8938F11E3F24C2BC50D478B63686038D /* Transformers */, ); - name = Helpers; - path = Pod/Classes/Helpers; + name = Peek; + path = ../..; sourceTree = ""; }; - 56186C7C6E8524C414A03EA06A959E55 /* Development Pods */ = { + 552C9EB17E649B3CD1A5AF8A310AA9E8 /* Peekable */ = { isa = PBXGroup; children = ( - 056E9DDB0A29DBCC731084EB1EBB9B3B /* Peek */, + 2CE55B9AD11FCFA806540B9AEBDC7F21 /* Bundle+Peekable.swift */, + 61F405FC4E747440D83BE45B1690C0D7 /* CALayer+Peekable.swift */, + 5D45E18FF9546CECD2E1ED296F80FB8D /* NSAttributedString+Peekable.swift */, + B027FB8F3CC6183AB5D5A2B0BC5154AE /* NSLayoutConstraint+Peekable.swift */, + 1CE31DDE8C54493592AEF19D577A023E /* NSString+Peekable.swift */, + 848AD190AEA8663242F4A24ED993AFAC /* UIActivityIndicatorView+Peekable.swift */, + 99458220D95E568B53BBE40EDB83BD53 /* UIApplication+Peekable.swift */, + 582F2B9B55C29DD6FA9207FA424CDA50 /* UIBarButtonItem+Peekable.swift */, + DF3F848DF631BA320E0F8FD6D5A20A9B /* UIButton+Peekable.swift */, + AC4E724A201BA394AC30E9498545B241 /* UIColor+Peekable.swift */, + 724A7B0DB2995EED0AE360622A0B2FD9 /* UIControl+Peekable.swift */, + D179539BADBCE6D387E74D35404C3494 /* UIDevice+Peekable.swift */, + 6AD9325C7033118C7E6D1DBD4AF98375 /* UIFont+Peekable.swift */, + CF32C4AF3E7E7D38A1EF3C365646A962 /* UIImage+Peekable.swift */, + 42C44CA0BE2682F9A84A87F5FE2147AB /* UIImageView+Peekable.swift */, + D67B7280CCD53B52C6C586DAA3D75FA0 /* UILabel+Peekable.swift */, + 91874C5B66FA1A1EB8BB853993E5C0AD /* UINavigationBar+Peekable.swift */, + E82C2EF0097E2C3CD3FBB1D84188D45D /* UIPageControl+Peekable.swift */, + DAA1A55BE6EC649DC726FEC758722E13 /* UIPicker+Peekable.swift */, + E2D544D7CD3A55684CB9EFD3F073748B /* UIProgressView+Peekable.swift */, + B858A0F57683506584C8D6F009542610 /* UIScreen+Peekable.swift */, + 0514A4D095EF6CA62FD16D237ED41020 /* UIScrollView+Peekable.swift */, + 369BB6EA47BB4568B60C1E10F77F6C31 /* UISegmentedControl+Peekable.swift */, + 264BAC893E38FB7C15C43FFA5C2BAD31 /* UISlider+Peekable.swift */, + 191A858A7DB5BCCF16FDA5415F59FCD2 /* UIStackView+Peekable.swift */, + 296D6248B65EF6861AE8AF40F306E273 /* UIStepper+Peekable.swift */, + 66D6116E25E97EB242374838669F0A10 /* UISwitch+Peekable.swift */, + D5ED507CF6DD09982AB34F578DA0DB78 /* UITextField+Peekable.swift */, + ADF403AF8DB474B8EEAE5413D72FD442 /* UITextView+Peekable.swift */, + AFE7F873ED2023A824B5E1EEF3B09CB8 /* UIToolbar+Peekable.swift */, + 1A308064BA87CCD0FF5DDC3D4F45756B /* UIView+Peekable.swift */, + 201E93A8D8AB2DB6ABCDDF69CFD108DA /* UIViewController+Peekable.swift */, ); - name = "Development Pods"; + name = Peekable; + path = Pod/Classes/Peekable; sourceTree = ""; }; - 5C0A5AEFA48B070AB6BBD3AFDCABE9F8 /* Coordinator */ = { + 61ED7A1C873D11B7290F87EE270D11E4 /* Controllers & Views */ = { isa = PBXGroup; children = ( - A9383A964FB771512B41D6D37BE82553 /* Attribute.swift */, - D572ABB4B30092857009FCD960EF98EA /* Coordinator.swift */, - 67A91952CD826164B5495B3AC4C7BB09 /* Group.swift */, + 6FE482DF718732AC5D55B7ABE4914BB9 /* PeekInspectorViewController.swift */, + 2D10E3F5C38A6ACC92723BFCE14A3481 /* PeekPresentationController.swift */, + 5C5F9CA104CBC8FB9417C449CDB6F8C0 /* PeekSectionedViewController.swift */, + EEDD692434AC94485AAF3565C0388018 /* PeekViewController.swift */, + 07FF0156B81F6441DB76D00DC5CA2B33 /* UIViewController+Modal.swift */, + 026E0FACD57415294985B18474794F1E /* Inspectors */, + 25EA7E5D2C51F8D3B9E841D3B7758BAD /* Overlays */, + D196C1329D66B9590232E42E47CE96C7 /* Reporting */, ); - name = Coordinator; - path = Pod/Classes/Coordinator; + name = "Controllers & Views"; + path = "Pod/Classes/Controllers & Views"; + sourceTree = ""; + }; + 6EDB6392E84FA5CCA63C75C90F9788B3 /* Layout */ = { + isa = PBXGroup; + children = ( + FA5272DF70766EA743CA218AEC04A915 /* PeekLayoutOverlayView.swift */, + 4C0C8492E78F9B75AFC7A5E2DB24D43F /* PeekLayoutView.swift */, + 8832161A29024E137EB1595664CCB68E /* PeekMetricView.swift */, + ); + name = Layout; + path = Layout; sourceTree = ""; }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 56186C7C6E8524C414A03EA06A959E55 /* Development Pods */, + A5DE8B9E58D4F2E52A4A60F1AC5A735B /* Development Pods */, BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, 977DE389B0EB36943BA689BAFDFE31A8 /* Products */, AC589FC9EEA199D0ED494180EA58BFD6 /* Targets Support Files */, ); sourceTree = ""; }; - 96FC08F6D92ED64A158A7D3FD7E83545 /* Transformers */ = { + 889B3E645E5C2874AC8D0A61E2A2CBCD /* GraphicsRenderer */ = { isa = PBXGroup; children = ( - B622879D927F0A1C51950A487D488654 /* NSNumber+Transformer.swift */, - B5B68F672DE2B0B76C2CDA9D4C54C1D2 /* NSValue+Transformer.swift */, - 25533260A129F09B7C10D4AB5D1B0D8A /* UIColor+Transformer.swift */, + 2CE44048944A29B524DD583BD7340F56 /* ImageRenderer.swift */, + F9ADE005450871A80FEDB9D798CAF8F4 /* PDFRenderer.swift */, + 20BE6BF7525BF3CDB1ADE7BB35B8DB9F /* Platforms.swift */, + 0DB60B0A34C4FACBCF74AFE6E37AACAA /* Renderer.swift */, + 893A5D69258F4EBA47F2B9C19AF59294 /* RendererDrawable.swift */, + ); + name = GraphicsRenderer; + path = Pod/Classes/GraphicsRenderer; + sourceTree = ""; + }; + 8938F11E3F24C2BC50D478B63686038D /* Transformers */ = { + isa = PBXGroup; + children = ( + 179C011576BE97110C024DAAAD65BBF7 /* NSNumber+Transformer.swift */, + B47A0788BB651CAF3D000191E97F7E01 /* NSValue+Transformer.swift */, + B640C404DBD922FBDA872347D5F6241E /* UIColor+Transformer.swift */, ); name = Transformers; path = Pod/Classes/Transformers; sourceTree = ""; }; - 97716DC56DC8CC613497BC00C38F8B41 /* Overlays */ = { + 903538677589150D6CAF5E0701BD53A4 /* Model */ = { isa = PBXGroup; children = ( - 40FB951F7B86F4C0491C5E45731927C2 /* PeekButton.swift */, - A5FB49D2ADCC01135011E969DD98E735 /* PeekOverlayView.swift */, - ED1F9AFF816E26D21D65326D39654920 /* PeekSelectionView.swift */, - 11CBB3D0778700ACD15A4A057D569A9D /* Layout */, - 14554F36BF2048DB9A59FEBC32D33FA8 /* Text */, + 30F7677913C9AD4E300D39B350B1E565 /* ContextDataSource.swift */, + AEC98A316B68F3DC4B144EC3B5C46B65 /* Models.swift */, + 6F7728391455F1D6CDE04777AE9594C3 /* Peekable.swift */, ); - path = Overlays; + name = Model; + path = Pod/Classes/Model; sourceTree = ""; }; 977DE389B0EB36943BA689BAFDFE31A8 /* Products */ = { @@ -442,14 +471,23 @@ name = Products; sourceTree = ""; }; - 9A95D8003659848BE4906DAB45535ACF /* Pod */ = { + A5DE8B9E58D4F2E52A4A60F1AC5A735B /* Development Pods */ = { isa = PBXGroup; children = ( - BE684CF6846D1660BEC2A4D2D03E314F /* LICENSE */, - 7C515995549889FD1810CBAE6E6C423D /* Peek.podspec */, - BE7F872393FDB6F1C42F00B25D0979BE /* README.md */, + 3A4FD2893EC893FB59956DC500E1F506 /* Peek */, ); - name = Pod; + name = "Development Pods"; + sourceTree = ""; + }; + A7598B71C52AEE6C843FFDE41D10FD51 /* Images */ = { + isa = PBXGroup; + children = ( + 25A35AC996232EDA99D791704B5F40E6 /* Images+Inspectors.swift */, + D1F0F130B6925E55C6F0867E598686F0 /* Images+Orientation.swift */, + 723DFD29E04A3191A78C36D20EEC7D86 /* Images+OrientationMask.swift */, + ); + name = Images; + path = Pod/Classes/Images; sourceTree = ""; }; AC589FC9EEA199D0ED494180EA58BFD6 /* Targets Support Files */ = { @@ -468,34 +506,37 @@ name = Frameworks; sourceTree = ""; }; - BFA7D6C18DEB76393BEA255FEF24A295 /* Controllers & Views */ = { + C43CDF008D98CB533EE9EF0676DD991E /* Helpers */ = { isa = PBXGroup; children = ( - 27EBCA6E389C9D1DC8C76A6062FCBE8C /* PeekPresentationController.swift */, - 595B6CC47E70CA929EAAEFDA9ECC0946 /* PeekInspectorViewController.swift */, - 61166003FEB5DBDFEB2A02F0993E2375 /* PeekSectionedViewController.swift */, - D72BB54A478FCA1715339A761E4C8485 /* PeekViewController.swift */, - F17E823F6E266E1E1509D0B2AC20883B /* UIViewController+Modal.swift */, - 51987B5A841E44AB628915C927A81D8A /* Inspectors */, - 97716DC56DC8CC613497BC00C38F8B41 /* Overlays */, - E854C771FC3F09E21CCBCD2B69D6ACE7 /* Reporting */, + A842509DE6DFD857113B00C47AB89A51 /* CGSize+Resize.swift */, + 6E49AECF68401BE06609604056642A01 /* Color.swift */, + F4B76134CF3E2AC7E0FE04B10EC3FD11 /* Color+Extensions.swift */, + 8A40ED9F830D7F95259964D3CBC8E03F /* Constraints.swift */, + 245035D918347109D22276EEB30AF7B0 /* Enum+Cases.swift */, + 5BD2CBFE327B12B400B822F1552F90EC /* Enum+Descriptions.swift */, + 89F5B60CF9E69BFD25BBAE956F84BC28 /* NSNumber+Extensions.swift */, + 606499E5D7198A1D959A8B5B4D318FC1 /* NSObject+Extensions.swift */, + 21FD1628AA98E3FE30C522AE3AA03951 /* PeekTapGestureRecognizer.swift */, + 25CA96DC90448B716356500F6FAB0003 /* String+Extensions.swift */, + 554BA39873CF7632FAC9ADF893AD16C6 /* UIImage+Resize.swift */, + A8BAAFE4F90F9ECEF2D933C80C2292FD /* UIView+Extensions.swift */, + D4090306352B4CABF6042647FDD565E7 /* UIViewController+Extensions.swift */, + 61717C4EB7EC219A8D8E39C2E049B576 /* UIWindow+Extensions.swift */, ); - name = "Controllers & Views"; - path = "Pod/Classes/Controllers & Views"; + name = Helpers; + path = Pod/Classes/Helpers; sourceTree = ""; }; - D117B4F93E402599BC0C2E7E31DDC74F /* Support Files */ = { + D196C1329D66B9590232E42E47CE96C7 /* Reporting */ = { isa = PBXGroup; children = ( - B8CC358289A677B621A061F4BDB2C61A /* Info.plist */, - 83F2DD6FA47D661F6046F96B150E8A22 /* Peek.modulemap */, - 06A5EECB4251AA559C568344F93BD89B /* Peek.xcconfig */, - 7AF941F49979EAB3DD937C212AD14FD9 /* Peek-dummy.m */, - FB443C6AA8B3DDDAC7ECB6B621E6B7B7 /* Peek-prefix.pch */, - FAEC4340D1686C8B769EBDA40FE03E12 /* Peek-umbrella.h */, + 5AFDD8C5B78E892E3CD9B3CCCBFA28FF /* Report.swift */, + F4A7697186F2D7BDDBB053F2FC9128D9 /* ReportActivity.swift */, + 7E143221245D4B19707E552B01A6E2BF /* ReportViewController.swift */, ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/Peek"; + name = Reporting; + path = Reporting; sourceTree = ""; }; D2C0BF45A9FD736CBAD926819B134183 /* Pods-NotTwitter */ = { @@ -524,47 +565,14 @@ name = iOS; sourceTree = ""; }; - D82D3D1EB40745BAADDFE2C9BA89950C /* Accessory Views */ = { - isa = PBXGroup; - children = ( - 883EA4BB41D855B10D619CB45FA5DBFB /* BoolAccessoryView.swift */, - 1C749367BACA995EC5C9A27EACABD47E /* ColorAccessoryView.swift */, - ); - name = "Accessory Views"; - path = "Pod/Classes/Accessory Views"; - sourceTree = ""; - }; - E854C771FC3F09E21CCBCD2B69D6ACE7 /* Reporting */ = { - isa = PBXGroup; - children = ( - 3A06CBFC6F9CB5C0F8EA38FD8B62D7E3 /* Report.swift */, - A923D033F3391AF3B11228237BFE8C74 /* ReportActivity.swift */, - E5C5038F904665E2FD8BC765D062B94D /* ReportViewController.swift */, - ); - path = Reporting; - sourceTree = ""; - }; - FCBA5C7BA28183A0A7153E7EE9C76C87 /* GraphicsRenderer */ = { - isa = PBXGroup; - children = ( - 837E0FD264E93EB77FE6CCE7EA05CF66 /* ImageRenderer.swift */, - B36E3E59BDDE0713C14498872D79BEAD /* PDFRenderer.swift */, - 8C1FD5AD5BF562B968FCA37B943F74EC /* Platforms.swift */, - 86F1AE3FAD2424823002EEF6F1549428 /* Renderer.swift */, - A3B9FF5FB0C0641504E6E84278B6953B /* RendererDrawable.swift */, - ); - name = GraphicsRenderer; - path = Pod/Classes/GraphicsRenderer; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - A7E87713EF0198C972FBD2EC386C26DD /* Headers */ = { + A3DA4DB00158C8F32C492FF5F2EE6B79 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 49359FAC41EF19443EAAC69716CA0DE8 /* Peek-umbrella.h in Headers */, + BB6923CC5A6A381F75A61B48BFA81DDB /* Peek-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -597,13 +605,13 @@ productReference = 0D2BB6CBBAB87C05DA883DE9A2320BB3 /* Pods_NotTwitter.framework */; productType = "com.apple.product-type.framework"; }; - 546766E9C6CBF018892B988929F960A7 /* Peek */ = { + FC4546EC10CFC508E9A761FAC085C246 /* Peek */ = { isa = PBXNativeTarget; - buildConfigurationList = 0FF44FDCF170A7EDA3342A57C68C19BE /* Build configuration list for PBXNativeTarget "Peek" */; + buildConfigurationList = CE6B6E7A33FC76F4DAA4B946A928948A /* Build configuration list for PBXNativeTarget "Peek" */; buildPhases = ( - 8091CC03AEFE66D0A88DCE948E42F2A4 /* Sources */, - A361F77B6C46F763AEE9463BB642ABB2 /* Frameworks */, - A7E87713EF0198C972FBD2EC386C26DD /* Headers */, + F9B34955CF1D4D66E042A7A4FA1AC126 /* Sources */, + B55C34C445E83F671CAD2F3B06C28E32 /* Frameworks */, + A3DA4DB00158C8F32C492FF5F2EE6B79 /* Headers */, ); buildRules = ( ); @@ -635,113 +643,114 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 546766E9C6CBF018892B988929F960A7 /* Peek */, + FC4546EC10CFC508E9A761FAC085C246 /* Peek */, 3E313D7750B04FE2E4F09990955865E5 /* Pods-NotTwitter */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ - 8091CC03AEFE66D0A88DCE948E42F2A4 /* Sources */ = { + BA816ADEC512F552403EDE374C077E26 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - B66FA36C72C2AB00DF75AF0EF93F8EC5 /* Attribute.swift in Sources */, - 7ED22D64DC02614E3C9E04E04045D9CF /* BoolAccessoryView.swift in Sources */, - 256FAE25178A745387A4DDA481E0FF83 /* Bundle+Peekable.swift in Sources */, - C6C742DA7373345C6EF469720D38F37A /* CALayer+Peekable.swift in Sources */, - B51FBD205222F1CD7B70EA085FC05496 /* CGSize+Resize.swift in Sources */, - 6ED1A1799D4668CA713EFFECEC03412B /* CollapsibleSections.swift in Sources */, - 3671DAB3AABCDC23ACE93F4FA0621147 /* Color+Extensions.swift in Sources */, - 989B3CB439C32DD0945FD8823BE5F10D /* Color.swift in Sources */, - 17FF152C5F4BCEB9E55EF36847552F05 /* ColorAccessoryView.swift in Sources */, - A50F98EA5F83B61D154A69F9B04EA2D0 /* Constraints.swift in Sources */, - 69CFB6C940BD8C6CF45F6D2E9020EFAC /* ContextDataSource.swift in Sources */, - 6D7B6C284F34097461314164B53B329E /* Coordinator.swift in Sources */, - 053A288B8C9FCA64817AA164F7B75834 /* Enum+Cases.swift in Sources */, - B7C76EB4913DBA86AC9EA1C69E2B913F /* Enum+Descriptions.swift in Sources */, - 361FBBC102346A48C4A95717EB55C742 /* Group.swift in Sources */, - C5DA51402F84E20F14C32772E4505468 /* ImageRenderer.swift in Sources */, - 5C0C8D2CFCB684AD5CF105C12F197E0D /* Images+Inspectors.swift in Sources */, - 0D3EDB6A56CBDC43F9C426FEB5401D7B /* Images+Orientation.swift in Sources */, - 624BAFE0F5AA7824FDAE9BF031BF724F /* Images+OrientationMask.swift in Sources */, - 0052FD84768A07D49701078802309663 /* PeekInspectorCell.swift in Sources */, - 4D13C10CDD840FA326BA0112C8468855 /* PeekPresentationController.swift in Sources */, - B58E4EB99A0F703D138D552BC343F33B /* LayoutManager.swift in Sources */, - E6188C2B351D70002D89B48073297EBE /* Models.swift in Sources */, - 9BD496A6A0E9F3840BFFE52FD7F8A012 /* NSAttributedString+Peekable.swift in Sources */, - E775B95D7F4E6A5DB597BB5FA2916558 /* NSLayoutConstraint+Peekable.swift in Sources */, - 5C8B8ED9F010C2A0EB620987DD085222 /* NSNumber+Extensions.swift in Sources */, - 10EE472B9E31FE8DEBE74625A98BC823 /* NSNumber+Transformer.swift in Sources */, - 8D31075DF8B24C6D87C50DC57FA57D66 /* NSObject+Extensions.swift in Sources */, - 1E1531B8A67B27B28CFACF48CBF8A268 /* NSString+Peekable.swift in Sources */, - 9FBAA83AAE7227C7BB34F792DCADB28C /* NSValue+Transformer.swift in Sources */, - A8AEA6140A0C6229D1C478DB669887F6 /* PDFRenderer.swift in Sources */, - 26B88492E0F591A803E3B5266B5B3C97 /* Peek-dummy.m in Sources */, - E4B52A2A4186FFF3D4E502A17499AC2C /* Peek.swift in Sources */, - 67C2D4033135B181FAECC88C69B971BD /* Peekable.swift in Sources */, - 39EB85D62F1C5A0F853BB62B12F6228B /* PeekButton.swift in Sources */, - 6217A84D506646625E102774B01D7131 /* PeekInspectorViewController.swift in Sources */, - B7DCEE483F2E6C096C45D6BFF3EC42CE /* PeekLayoutOverlayView.swift in Sources */, - 87D34266712D25AB657F0FE51335184A /* PeekLayoutView.swift in Sources */, - 078AF4AC18434291749BC2B3B4E0B524 /* PeekMetricView.swift in Sources */, - ACC3F69B09A3B4D3DEF3EB0EFC8F024A /* PeekOptions.swift in Sources */, - 2635B5F2D33BFA3A12D27AE1CACFDB72 /* PeekOverlayView.swift in Sources */, - CD22CB5866F3AAD473F857AE0081513E /* PeekSectionedViewController.swift in Sources */, - 1772DB5016C8B1C56961C7C278ABCE0C /* PeekSelectionView.swift in Sources */, - 9F0A5EF799E9B145203EC257A5F439A5 /* PeekTapGestureRecognizer.swift in Sources */, - EEB83F970D6A05CB87DEC80635B28C40 /* PeekTextOverlayView.swift in Sources */, - A279BB5A0DB4EA45C1F22139D3EC0B8F /* PeekViewController.swift in Sources */, - FA979E87072C601BF01752B94CC94331 /* Platforms.swift in Sources */, - 6154B5F62A7DBFD37C07D1D51C85CB98 /* PreviewCell.swift in Sources */, - 31609CBD88D400A5907B63C1B29AFE8B /* Renderer.swift in Sources */, - 9AE4F30FDE5D352C9967B32CAA8AE31C /* RendererDrawable.swift in Sources */, - FB5163FA5CF6E576BC21F3E60818A714 /* Report.swift in Sources */, - 7BAF9DB8DEA1DE702E03BC77D51B255F /* ReportActivity.swift in Sources */, - 523DEC438C16834BC0F4AECF247520AC /* ReportViewController.swift in Sources */, - 85DC8D32E7CF6E4AB6B4E5585DDAA986 /* String+Extensions.swift in Sources */, - EE5A4F123A5779ECBDB1E0695A44F085 /* UIActivityIndicatorView+Peekable.swift in Sources */, - B50EED0CFDC1BC3F78053D9032A89EDD /* UIApplication+Peekable.swift in Sources */, - 334A7BCC7648F2A40A8067D730A3A14C /* UIBarButtonItem+Peekable.swift in Sources */, - 7F689ECD8E63DEB2D8858C76837263D6 /* UIButton+Peekable.swift in Sources */, - B2450B0476583D8BD1ED8B5C7D65D25F /* UIColor+Peekable.swift in Sources */, - 157BA6E3C24EE5501D6562A852693F17 /* UIColor+Transformer.swift in Sources */, - 4AA2F03BB903CC5B4AC45547A63AE18F /* UIControl+Peekable.swift in Sources */, - D33BE61C598686061DCFF0AD71E40A5B /* UIDevice+Peekable.swift in Sources */, - C9D70F3B9D555374D658B41DB9E6AEF8 /* UIFont+Peekable.swift in Sources */, - 9818109F7FB987154C3260EED567E1E4 /* UIImage+Peekable.swift in Sources */, - 25F9115A8977B328DDB3A732144082EA /* UIImage+Resize.swift in Sources */, - B47D61B4F29F21FC1620F3EDDB27CF72 /* UIImageView+Peekable.swift in Sources */, - 0FCB7711C709C54B36956067DA923BE0 /* UILabel+Peekable.swift in Sources */, - 161CCA106B9C13BB2660A3E8BC088592 /* UINavigationBar+Peekable.swift in Sources */, - CB4EB9D64E33FD53EC277F1444FE6810 /* UIPageControl+Peekable.swift in Sources */, - A0C3451E845F00277B85903C17A1CA44 /* UIPicker+Peekable.swift in Sources */, - 6E86C32D1887D6C2A4B977DD4A062744 /* UIProgressView+Peekable.swift in Sources */, - AF20D27BCAD9AC41FD066419540A48AB /* UIScreen+Peekable.swift in Sources */, - 16DA54DF0CB6F87485220AE5CC6792E6 /* UIScrollView+Peekable.swift in Sources */, - 3556CC7C110E590597C27850EC22A0D3 /* UISegmentedControl+Peekable.swift in Sources */, - 5387F3461499EC1E0FED70C50B8C0B03 /* UISlider+Peekable.swift in Sources */, - 806A127AB6E0B73EFB4E15FE5BD93185 /* UIStackView+Peekable.swift in Sources */, - 6E8277A92F18A43BA9700EA6D1F88403 /* UIStepper+Peekable.swift in Sources */, - 8C1694D1AEEEFAB8A5F65277B40A37AC /* UISwitch+Peekable.swift in Sources */, - F7B4545B26C00534BB1B2ED636815399 /* UITextField+Peekable.swift in Sources */, - C0693E485117AF2253A2456FD0F39371 /* UITextView+Peekable.swift in Sources */, - 98412054C39947FFF83447D841A1078C /* UIToolbar+Peekable.swift in Sources */, - D9A96FED664498CF651D84EF253DB510 /* UIView+Extensions.swift in Sources */, - 34E24949B2B2FDE7D5750B095D09DFF6 /* UIView+Peekable.swift in Sources */, - 494903ADB4568FE4CCB60BB817BF7FFF /* UIViewController+Extensions.swift in Sources */, - 9E92C6707FD6A612E918AB0277EEEFAA /* UIViewController+Modal.swift in Sources */, - F261D4B51731B338EE7D3FEB58A2720A /* UIViewController+Peekable.swift in Sources */, - B5183DEBD89ABAF30F8BD9CC88537BCB /* UIWindow+Extensions.swift in Sources */, - A06023460AF33DD8331285BB7290C895 /* VolumeController.swift in Sources */, + 73F90013CA0E957AF47B3B9A4D418031 /* Pods-NotTwitter-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - BA816ADEC512F552403EDE374C077E26 /* Sources */ = { + F9B34955CF1D4D66E042A7A4FA1AC126 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 73F90013CA0E957AF47B3B9A4D418031 /* Pods-NotTwitter-dummy.m in Sources */, + D3437A8BA9F344605E6E978F7658E553 /* Attribute.swift in Sources */, + DCB1395C7CACD6A6ABA713E30D8A87FD /* BoolAccessoryView.swift in Sources */, + 1D50BAC9636BA0C1D39A23C0A9DB4101 /* Bundle+Peekable.swift in Sources */, + 78A859BA42194BBE35EB957E8327A4F7 /* CALayer+Peekable.swift in Sources */, + FE1E064FC34E292384B00304FDE58497 /* CGSize+Resize.swift in Sources */, + FC888804DE6D01F8A136B62F8CC411DE /* CollapsibleSections.swift in Sources */, + 61CDF7E9CF47E0847BFFB8C8A6DC9D12 /* Color+Extensions.swift in Sources */, + 35CADDA13D82536FC8F33D4213B055EE /* Color.swift in Sources */, + D36B70DE79343176D5B4DB9D5DBDC2FC /* ColorAccessoryView.swift in Sources */, + C8A5BFC07703259D1B97F284955163BB /* Constraints.swift in Sources */, + EA32241A6A6CECFDA826C2FA4B941AAC /* ContextDataSource.swift in Sources */, + 235BD1257E836FF20BB5DC870F27FA13 /* Coordinator.swift in Sources */, + DD0978F42D210EA0E373B2C04EC1B454 /* Enum+Cases.swift in Sources */, + 83796ED5496140231584775677BB4233 /* Enum+Descriptions.swift in Sources */, + 43C41BD930126F965208B1899D49C591 /* Group.swift in Sources */, + D4831779A591844EE2F4A08E1D2D1E2B /* ImageRenderer.swift in Sources */, + 160465F8BF347A11591D4E26AE9AB1C8 /* Images+Inspectors.swift in Sources */, + 700E7600581FA9E11E0607424723D037 /* Images+Orientation.swift in Sources */, + DAEE7ACF0E9B719B2B6ED32ABB454064 /* Images+OrientationMask.swift in Sources */, + 8817087698D0953320E96E8AD28F30D5 /* LayoutManager.swift in Sources */, + C96F04CB008B43A36471C45C981CD5F4 /* Models.swift in Sources */, + CD74278AA12A3CA53CFEA861F607D5C7 /* NSAttributedString+Peekable.swift in Sources */, + 607D33B5BAECF7120297A078176407F1 /* NSLayoutConstraint+Peekable.swift in Sources */, + 2540FCE70AFFD5C67E8A2924ADF18F84 /* NSNumber+Extensions.swift in Sources */, + DF5C6438EDAFE34BCE0E3ECE603D6B1F /* NSNumber+Transformer.swift in Sources */, + EFC6C7ACD26E78FFEF01FBEE3C7DC03F /* NSObject+Extensions.swift in Sources */, + C2BEB378BCE80A52A03A0D92167D48A3 /* NSString+Peekable.swift in Sources */, + 6073D6C39DC1A4D1E6EF2C14D8169D46 /* NSValue+Transformer.swift in Sources */, + 209265F03626402DEC31E42E29AAEFED /* PDFRenderer.swift in Sources */, + 05959B60255A3EF6D34A3379E0972A64 /* Peek-dummy.m in Sources */, + 03B4E7E79E6D12C34C243F75DD5B5032 /* Peek.swift in Sources */, + 54CF22A4D3EF233CB7DFA953701CC705 /* Peekable.swift in Sources */, + 8C85EDB730AF0C11E825EDDF8E6F06E7 /* PeekButton.swift in Sources */, + 074F2D99FDD16D7CC60E2E61A14B3667 /* PeekInspectorCell.swift in Sources */, + E65085EF37AD7D5C3CEC164FCE47AC6C /* PeekInspectorViewController.swift in Sources */, + 7979A5AF3A42540CB6E25BCBA6B0E657 /* PeekLayoutOverlayView.swift in Sources */, + CA772D98950376BFBAAE87ED8C38696B /* PeekLayoutView.swift in Sources */, + 8D2645C93F214698390D8BF52F70EA73 /* PeekMetricView.swift in Sources */, + 1940B803148CF5BBFC5ADB0CF3FB7206 /* PeekOptions.swift in Sources */, + 9709DB477357071AF22F9113BD5ACF66 /* PeekOverlayView.swift in Sources */, + 4DD48FC7EDFF7E4E65F873EE9E2E0D74 /* PeekPresentationController.swift in Sources */, + BC5ECD5FAA2AA8FEEB2E519034D77070 /* PeekSectionedViewController.swift in Sources */, + 2FAD61FD90DD6FD1F7F1485AFBB5FE90 /* PeekSelectionView.swift in Sources */, + AF5B187C9C6112419AFFCBF62110BB3F /* PeekTapGestureRecognizer.swift in Sources */, + 864297146B8679B2FF088A23E1016C5E /* PeekTextOverlayView.swift in Sources */, + 843324E7871F9E791AB088130AF88932 /* PeekTheme+Colors.swift in Sources */, + E0E8B2044B464FB2EFCA29807B3EB4AE /* PeekViewController.swift in Sources */, + DDF596F73999C371E42C1D7A0332F75C /* Platforms.swift in Sources */, + D790E7F73C5DB4689D540CD7B90F7706 /* PreviewCell.swift in Sources */, + 22683D81EE66DF298AE6411FA53EED78 /* Renderer.swift in Sources */, + F3F1DC1FB2AF89C5F0B75889515BF8C9 /* RendererDrawable.swift in Sources */, + 0977C9C88D8074D06A8B8D7C343A9C8F /* Report.swift in Sources */, + A451F794BD2AFCE81AD5C03C08D16BB4 /* ReportActivity.swift in Sources */, + B15E927C06E6A1EC3FD57B4399B52A7F /* ReportViewController.swift in Sources */, + 035380A8BA37AD6AFAB54E467C23CD22 /* String+Extensions.swift in Sources */, + 213874D3297C0CE2C9BD407CE5452FA5 /* UIActivityIndicatorView+Peekable.swift in Sources */, + E2A282B8B4BF9B9A3C655112D98EE6DE /* UIApplication+Peekable.swift in Sources */, + C3F41950EEBE5F381B77C6E706686379 /* UIBarButtonItem+Peekable.swift in Sources */, + 5E98F4A7009B88E3E7393B738E86487D /* UIButton+Peekable.swift in Sources */, + 2D3BA22ED9A2CBF21F2E85D30175A25E /* UIColor+Peekable.swift in Sources */, + D78956F697C89040381D30392F8C87CA /* UIColor+Transformer.swift in Sources */, + E513CD275108896DA9ED2AE44A1D2B7C /* UIControl+Peekable.swift in Sources */, + 570AE69F67442A6AD8508A05332C6787 /* UIDevice+Peekable.swift in Sources */, + 26C6A05919B58CB373A5E0029A39C8DA /* UIFont+Peekable.swift in Sources */, + E3E57B06C990ED886411BDE74DE61CAA /* UIImage+Peekable.swift in Sources */, + F645C49CD02A1A1176AE0A01C1F18CBA /* UIImage+Resize.swift in Sources */, + A7CCD6B3E718542E0154A32E6C621078 /* UIImageView+Peekable.swift in Sources */, + A460EA4D341C9AB3EF0C4A1F427612C4 /* UILabel+Peekable.swift in Sources */, + ECF31777808FB1569BFD613624CF973C /* UINavigationBar+Peekable.swift in Sources */, + 5542FF14BD626A9583991667176B92ED /* UIPageControl+Peekable.swift in Sources */, + 9598DCCBAC37426EDA6F235706150993 /* UIPicker+Peekable.swift in Sources */, + 79845CFC863E38E3D5E82ADED428636C /* UIProgressView+Peekable.swift in Sources */, + 19FA22B437481E47584541AE5DE4744C /* UIScreen+Peekable.swift in Sources */, + 8987F4D2B3B453EC0840906DF5B44152 /* UIScrollView+Peekable.swift in Sources */, + 49BBA74EF04F0978ACD80741B4B6B6E4 /* UISegmentedControl+Peekable.swift in Sources */, + 437F32485CA98930F10AFED4CF091D6E /* UISlider+Peekable.swift in Sources */, + C6C7BD138C95AD9FD9FD12AA63898FB8 /* UIStackView+Peekable.swift in Sources */, + B17594DE2DBE0250F5DBFA3468964ADB /* UIStepper+Peekable.swift in Sources */, + 75999EB218C9A0623116CB3E9C8C8323 /* UISwitch+Peekable.swift in Sources */, + 8CCB2EA2AC1825DDF8ADF1BE4279093D /* UITextField+Peekable.swift in Sources */, + 834A1A01A9823768C8D88B368C824520 /* UITextView+Peekable.swift in Sources */, + 4B1B5BD40C50FABA0E9F0B1267642D08 /* UIToolbar+Peekable.swift in Sources */, + 71875B45E90D47D927FE1B089D4BB34F /* UIView+Extensions.swift in Sources */, + 7D05F6C7011497A82027A529D013425D /* UIView+Peekable.swift in Sources */, + 356AFB6B3E69A864F40757BC926C7431 /* UIViewController+Extensions.swift in Sources */, + 6DFD20E6636ED608E85DDD653AAB5D7B /* UIViewController+Modal.swift in Sources */, + EA9D533EB36CB9CF30B6335674D0B8CB /* UIViewController+Peekable.swift in Sources */, + 2225EF6185B99707953EADF80B553530 /* UIWindow+Extensions.swift in Sources */, + 03C8F79DC75DCBAB71BBDA97E7CBBD99 /* VolumeController.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -751,7 +760,7 @@ 010ED594C602CF104817C1AA5D6733A0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Peek; - target = 546766E9C6CBF018892B988929F960A7 /* Peek */; + target = FC4546EC10CFC508E9A761FAC085C246 /* Peek */; targetProxy = 9D16B0D3322694569BF0D6A5DAEB2D76 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -883,41 +892,9 @@ }; name = Release; }; - B5DB8352074A3DF4E9B442C59B2BA805 /* Release */ = { + E073C553E78BA8E360CF901800256875 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 06A5EECB4251AA559C568344F93BD89B /* Peek.xcconfig */; - buildSettings = { - CODE_SIGN_IDENTITY = ""; - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Peek/Peek-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Peek/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Peek/Peek.modulemap"; - PRODUCT_NAME = Peek; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 4.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - B726BBFA2EA901C721E3D5DD34FA98AA /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 06A5EECB4251AA559C568344F93BD89B /* Peek.xcconfig */; + baseConfigurationReference = E9C5A89C80DB1E20D03E29C9BABE817D /* Peek.xcconfig */; buildSettings = { CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; @@ -1009,23 +986,55 @@ }; name = Debug; }; + EB5479B091DFA2EB37951F58A057D542 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = E9C5A89C80DB1E20D03E29C9BABE817D /* Peek.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Peek/Peek-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Peek/Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MODULEMAP_FILE = "Target Support Files/Peek/Peek.modulemap"; + PRODUCT_NAME = Peek; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 0FF44FDCF170A7EDA3342A57C68C19BE /* Build configuration list for PBXNativeTarget "Peek" */ = { + 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - B726BBFA2EA901C721E3D5DD34FA98AA /* Debug */, - B5DB8352074A3DF4E9B442C59B2BA805 /* Release */, + E2BF6D6731C31DE69900B7B24E6F0445 /* Debug */, + 26F954BA177A9A46FFFD4E23ED11D67A /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + CE6B6E7A33FC76F4DAA4B946A928948A /* Build configuration list for PBXNativeTarget "Peek" */ = { isa = XCConfigurationList; buildConfigurations = ( - E2BF6D6731C31DE69900B7B24E6F0445 /* Debug */, - 26F954BA177A9A46FFFD4E23ED11D67A /* Release */, + E073C553E78BA8E360CF901800256875 /* Debug */, + EB5479B091DFA2EB37951F58A057D542 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pod/Classes/PeekOptions.swift b/Pod/Classes/PeekOptions.swift index f699842..80c68de 100644 --- a/Pod/Classes/PeekOptions.swift +++ b/Pod/Classes/PeekOptions.swift @@ -39,90 +39,6 @@ public enum PeekTheme { case dark case black case light - - internal var overlayBackgroundColor: UIColor? { - return .black - } - - internal var overlayTintColor: UIColor? { - return Color(literalRed: 135, green: 252, blue: 112).system - } - - internal var backgroundColor: UIColor? { - switch self { - case .dark: return Color(hex: "1c1c1c")!.system - case .black: return .black - case .light: return .white - } - } - - internal var selectedBackgroundColor: UIColor? { - switch self { - case .dark: return UIColor(white: 1, alpha: 0.1) - case .black: return UIColor(white: 1, alpha: 0.1) - case .light: return UIColor(white: 0, alpha: 0.1) - } - } - - internal var separatorColor: UIColor? { - switch self { - case .dark: return UIColor(white: 1, alpha: 0.1) - case .black: return UIColor(white: 1, alpha: 0.1) - case .light: return UIColor(white: 0, alpha: 0.1) - } - } - - internal func titleTextColor(isEditing: Bool) -> UIColor? { - switch self { - case .dark: return .white - case .black: return .white - case .light: return isEditing ? .white : .black - } - } - - internal var primaryTextColor: UIColor? { - switch self { - case .dark: return .white - case .black: return .white - case .light: return .black - } - } - - internal var secondaryTextColor: UIColor? { - switch self { - case .dark: return UIColor(white: 1, alpha: 0.6) - case .black: return UIColor(white: 1, alpha: 0.6) - case .light: return Color(hex: "1c1c1c")!.system - } - } - - internal var tintColor: UIColor? { - switch self { - case .dark: return Color(literalRed: 135, green: 252, blue: 112).system - case .black: return Color(literalRed: 135, green: 252, blue: 112).system - case .light: return Color(hex: "4CD863")!.system - } - } - - internal var editingColor: UIColor? { - switch self { - case .dark: return Color(hex: "4CD863")!.system - case .black: return Color(hex: "4CD863")!.system - case .light: return Color(hex: "4CD863")!.system - } - } - - internal var editingCounterColor: UIColor? { - return Color(hex: "3EB454")!.system - } - - internal var disclosureColor: UIColor? { - switch self { - case .dark: return UIColor(white: 1, alpha: 0.6) - case .black: return UIColor(white: 1, alpha: 0.6) - case .light: return UIColor(red: 200/255, green: 200/255, blue: 200/255, alpha: 1) - } - } } /// Defines various options to use when enabling Peek diff --git a/Pod/Classes/PeekTheme+Colors.swift b/Pod/Classes/PeekTheme+Colors.swift new file mode 100644 index 0000000..7f8dd97 --- /dev/null +++ b/Pod/Classes/PeekTheme+Colors.swift @@ -0,0 +1,96 @@ +// +// PeekTheme+Colors.swift +// Peek +// +// Created by Shaps Benkau on 26/03/2018. +// + +import Foundation + +extension PeekTheme { + + internal var overlayBackgroundColor: UIColor? { + return .black + } + + internal var overlayTintColor: UIColor? { + return Color(literalRed: 135, green: 252, blue: 112).system + } + + internal var backgroundColor: UIColor? { + switch self { + case .dark: return Color(hex: "1c1c1c")!.system + case .black: return .black + case .light: return .white + } + } + + internal var selectedBackgroundColor: UIColor? { + switch self { + case .dark: return UIColor(white: 1, alpha: 0.1) + case .black: return UIColor(white: 1, alpha: 0.1) + case .light: return UIColor(white: 0, alpha: 0.1) + } + } + + internal var separatorColor: UIColor? { + switch self { + case .dark: return UIColor(white: 1, alpha: 0.1) + case .black: return UIColor(white: 1, alpha: 0.1) + case .light: return UIColor(white: 0, alpha: 0.1) + } + } + + internal func titleTextColor(isEditing: Bool) -> UIColor? { + switch self { + case .dark: return .white + case .black: return .white + case .light: return isEditing ? .white : .black + } + } + + internal var primaryTextColor: UIColor? { + switch self { + case .dark: return .white + case .black: return .white + case .light: return .black + } + } + + internal var secondaryTextColor: UIColor? { + switch self { + case .dark: return UIColor(white: 1, alpha: 0.6) + case .black: return UIColor(white: 1, alpha: 0.6) + case .light: return Color(hex: "1c1c1c")!.system + } + } + + internal var tintColor: UIColor? { + switch self { + case .dark: return Color(literalRed: 135, green: 252, blue: 112).system + case .black: return Color(literalRed: 135, green: 252, blue: 112).system + case .light: return Color(hex: "4CD863")!.system + } + } + + internal var editingColor: UIColor? { + switch self { + case .dark: return Color(hex: "4CD863")!.system + case .black: return Color(hex: "4CD863")!.system + case .light: return Color(hex: "4CD863")!.system + } + } + + internal var editingCounterColor: UIColor? { + return Color(hex: "3EB454")!.system + } + + internal var disclosureColor: UIColor? { + switch self { + case .dark: return UIColor(white: 1, alpha: 0.6) + case .black: return UIColor(white: 1, alpha: 0.6) + case .light: return UIColor(red: 200/255, green: 200/255, blue: 200/255, alpha: 1) + } + } + +} From 067311a25ce153d8e23b701a1f6cae2d361740bc Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 16:02:30 +0100 Subject: [PATCH 11/37] Added UIDevice helper to factor out isSimulator checks in multiple places --- Example/Pods/Pods.xcodeproj/project.pbxproj | 23 +++++++++---------- Pod/Classes/Helpers/UIDevice+Extensions.swift | 20 ++++++++++++++++ Pod/Classes/Peek.swift | 15 +++--------- 3 files changed, 34 insertions(+), 24 deletions(-) create mode 100644 Pod/Classes/Helpers/UIDevice+Extensions.swift diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index c6b768c..2b5559e 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 47; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -34,6 +34,7 @@ 49BBA74EF04F0978ACD80741B4B6B6E4 /* UISegmentedControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 369BB6EA47BB4568B60C1E10F77F6C31 /* UISegmentedControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 4B1B5BD40C50FABA0E9F0B1267642D08 /* UIToolbar+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFE7F873ED2023A824B5E1EEF3B09CB8 /* UIToolbar+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 4DD48FC7EDFF7E4E65F873EE9E2E0D74 /* PeekPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D10E3F5C38A6ACC92723BFCE14A3481 /* PeekPresentationController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 54BA18A32069429A002B9C5B /* UIDevice+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54BA18A22069429A002B9C5B /* UIDevice+Extensions.swift */; }; 54CF22A4D3EF233CB7DFA953701CC705 /* Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7728391455F1D6CDE04777AE9594C3 /* Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5542FF14BD626A9583991667176B92ED /* UIPageControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E82C2EF0097E2C3CD3FBB1D84188D45D /* UIPageControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 570AE69F67442A6AD8508A05332C6787 /* UIDevice+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D179539BADBCE6D387E74D35404C3494 /* UIDevice+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -117,8 +118,8 @@ 0514A4D095EF6CA62FD16D237ED41020 /* UIScrollView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Peekable.swift"; sourceTree = ""; }; 07FF0156B81F6441DB76D00DC5CA2B33 /* UIViewController+Modal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIViewController+Modal.swift"; sourceTree = ""; }; 0825E30A8ABB4C0609FA66150A2DDB7A /* Pods-NotTwitter-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-NotTwitter-acknowledgements.markdown"; sourceTree = ""; }; - 0C12545D5EE54C5FC92A8BE304FE823D /* Peek.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; path = Peek.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 0D2BB6CBBAB87C05DA883DE9A2320BB3 /* Pods_NotTwitter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_NotTwitter.framework; path = "Pods-NotTwitter.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; + 0C12545D5EE54C5FC92A8BE304FE823D /* Peek.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; path = Peek.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 0D2BB6CBBAB87C05DA883DE9A2320BB3 /* Pods_NotTwitter.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_NotTwitter.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 0DB60B0A34C4FACBCF74AFE6E37AACAA /* Renderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Renderer.swift; sourceTree = ""; }; 100A9537D451E397D95E934896318DB2 /* LayoutManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = LayoutManager.swift; sourceTree = ""; }; 106055E6C8C2D7795977A411D8DD8F1C /* Group.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Group.swift; sourceTree = ""; }; @@ -149,8 +150,9 @@ 48FC315E16CE484A3CBC2DF2FC0107BD /* Pods-NotTwitter.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-NotTwitter.modulemap"; sourceTree = ""; }; 4C0C8492E78F9B75AFC7A5E2DB24D43F /* PeekLayoutView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekLayoutView.swift; sourceTree = ""; }; 4E5508AC826808D6BE9A4EB649EB6637 /* Pods-NotTwitter-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-NotTwitter-resources.sh"; sourceTree = ""; }; - 5069C98E696E3AC31FE37081CA4FA3BD /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; }; + 5069C98E696E3AC31FE37081CA4FA3BD /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 51A7C7C54059580E7C1EEB91A7D7D97D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 54BA18A22069429A002B9C5B /* UIDevice+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+Extensions.swift"; sourceTree = ""; }; 554BA39873CF7632FAC9ADF893AD16C6 /* UIImage+Resize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImage+Resize.swift"; sourceTree = ""; }; 582F2B9B55C29DD6FA9207FA424CDA50 /* UIBarButtonItem+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIBarButtonItem+Peekable.swift"; sourceTree = ""; }; 5A99C53FAF3871FA288EF835E3CC8F92 /* ColorAccessoryView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ColorAccessoryView.swift; sourceTree = ""; }; @@ -184,7 +186,7 @@ 8E04116546B8C648DA5E610688CC42D5 /* Peek.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Peek.modulemap; sourceTree = ""; }; 91874C5B66FA1A1EB8BB853993E5C0AD /* UINavigationBar+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UINavigationBar+Peekable.swift"; sourceTree = ""; }; 91B94AA71B2AA3F124B5A2365B2DB9E3 /* CollapsibleSections.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = CollapsibleSections.swift; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 97EF0163AE305299461B0D4478EAB67F /* Peek.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Peek.swift; path = Pod/Classes/Peek.swift; sourceTree = ""; }; 99458220D95E568B53BBE40EDB83BD53 /* UIApplication+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIApplication+Peekable.swift"; sourceTree = ""; }; 9A6D6FEB4BB637E7FCCE8B07BBAF6E5A /* PeekInspectorCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekInspectorCell.swift; sourceTree = ""; }; @@ -216,12 +218,12 @@ E09CF42E7B4512F56F0E46FA61047867 /* PeekTextOverlayView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekTextOverlayView.swift; sourceTree = ""; }; E2D544D7CD3A55684CB9EFD3F073748B /* UIProgressView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIProgressView+Peekable.swift"; sourceTree = ""; }; E82C2EF0097E2C3CD3FBB1D84188D45D /* UIPageControl+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIPageControl+Peekable.swift"; sourceTree = ""; }; - E9A63F66C0EE854FC0D90EF20A80F753 /* Peek.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Peek.framework; path = Peek.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E9A63F66C0EE854FC0D90EF20A80F753 /* Peek.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Peek.framework; sourceTree = BUILT_PRODUCTS_DIR; }; E9C5A89C80DB1E20D03E29C9BABE817D /* Peek.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Peek.xcconfig; sourceTree = ""; }; EEDD692434AC94485AAF3565C0388018 /* PeekViewController.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekViewController.swift; sourceTree = ""; }; F4A7697186F2D7BDDBB053F2FC9128D9 /* ReportActivity.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ReportActivity.swift; sourceTree = ""; }; F4B76134CF3E2AC7E0FE04B10EC3FD11 /* Color+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "Color+Extensions.swift"; sourceTree = ""; }; - F8A78419F7C4CC8D64B8F160890B9D23 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; }; + F8A78419F7C4CC8D64B8F160890B9D23 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; F8CF787022C4E4C9E7C67E5DECB8C2DE /* PeekOverlayView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekOverlayView.swift; sourceTree = ""; }; F9ADE005450871A80FEDB9D798CAF8F4 /* PDFRenderer.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PDFRenderer.swift; sourceTree = ""; }; FA5272DF70766EA743CA218AEC04A915 /* PeekLayoutOverlayView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PeekLayoutOverlayView.swift; sourceTree = ""; }; @@ -254,7 +256,6 @@ 9A6D6FEB4BB637E7FCCE8B07BBAF6E5A /* PeekInspectorCell.swift */, AF3051894A1D96046F285F0BBE957B49 /* PreviewCell.swift */, ); - name = Inspectors; path = Inspectors; sourceTree = ""; }; @@ -264,7 +265,6 @@ 100A9537D451E397D95E934896318DB2 /* LayoutManager.swift */, E09CF42E7B4512F56F0E46FA61047867 /* PeekTextOverlayView.swift */, ); - name = Text; path = Text; sourceTree = ""; }; @@ -298,7 +298,6 @@ 6EDB6392E84FA5CCA63C75C90F9788B3 /* Layout */, 028115C47EB5D50DA33E74F6E35C849E /* Text */, ); - name = Overlays; path = Overlays; sourceTree = ""; }; @@ -412,7 +411,6 @@ 4C0C8492E78F9B75AFC7A5E2DB24D43F /* PeekLayoutView.swift */, 8832161A29024E137EB1595664CCB68E /* PeekMetricView.swift */, ); - name = Layout; path = Layout; sourceTree = ""; }; @@ -523,6 +521,7 @@ A8BAAFE4F90F9ECEF2D933C80C2292FD /* UIView+Extensions.swift */, D4090306352B4CABF6042647FDD565E7 /* UIViewController+Extensions.swift */, 61717C4EB7EC219A8D8E39C2E049B576 /* UIWindow+Extensions.swift */, + 54BA18A22069429A002B9C5B /* UIDevice+Extensions.swift */, ); name = Helpers; path = Pod/Classes/Helpers; @@ -535,7 +534,6 @@ F4A7697186F2D7BDDBB053F2FC9128D9 /* ReportActivity.swift */, 7E143221245D4B19707E552B01A6E2BF /* ReportViewController.swift */, ); - name = Reporting; path = Reporting; sourceTree = ""; }; @@ -685,6 +683,7 @@ C96F04CB008B43A36471C45C981CD5F4 /* Models.swift in Sources */, CD74278AA12A3CA53CFEA861F607D5C7 /* NSAttributedString+Peekable.swift in Sources */, 607D33B5BAECF7120297A078176407F1 /* NSLayoutConstraint+Peekable.swift in Sources */, + 54BA18A32069429A002B9C5B /* UIDevice+Extensions.swift in Sources */, 2540FCE70AFFD5C67E8A2924ADF18F84 /* NSNumber+Extensions.swift in Sources */, DF5C6438EDAFE34BCE0E3ECE603D6B1F /* NSNumber+Transformer.swift in Sources */, EFC6C7ACD26E78FFEF01FBEE3C7DC03F /* NSObject+Extensions.swift in Sources */, diff --git a/Pod/Classes/Helpers/UIDevice+Extensions.swift b/Pod/Classes/Helpers/UIDevice+Extensions.swift new file mode 100644 index 0000000..b372003 --- /dev/null +++ b/Pod/Classes/Helpers/UIDevice+Extensions.swift @@ -0,0 +1,20 @@ +// +// UIDevice+Extensions.swift +// Peek +// +// Created by Shaps Benkau on 26/03/2018. +// + +import Foundation + +extension UIDevice { + + internal var isSimulator: Bool { + var isSimulator = false + #if (arch(i386) || arch(x86_64)) + isSimulator = true + #endif + return isSimulator + } + +} diff --git a/Pod/Classes/Peek.swift b/Pod/Classes/Peek.swift index 68b9215..753b5b3 100644 --- a/Pod/Classes/Peek.swift +++ b/Pod/Classes/Peek.swift @@ -127,12 +127,8 @@ public final class Peek: NSObject { return } - var isSimulator = false - #if (arch(i386) || arch(x86_64)) - isSimulator = true - #endif - - if (options.activationMode == .auto && isSimulator) || options.activationMode == .shake { + if (options.activationMode == .auto && UIDevice.current.isSimulator) + || options.activationMode == .shake { handleActivation() } } @@ -170,12 +166,7 @@ public final class Peek: NSObject { fileprivate func configureWithOptions(_ options: PeekOptions) { self.options = options - var isSimulator = false - #if (arch(i386) || arch(x86_64)) - isSimulator = true - #endif - - if options.activationMode == .auto && !isSimulator { + if options.activationMode == .auto && !UIDevice.current.isSimulator { activationController = VolumeController(peek: self, handleActivation: handleActivation) } } From 961aa4b6b5bfc174fa9e81b0787c3a78ba3d403d Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 17:01:20 +0100 Subject: [PATCH 12/37] Consolidated Peekable, PeekContainer, PeekNestable and PeekIgnoresSubviews into 2 types, a public and internal PeekInspectable/InternalPeekInspectable. Updated the project to use these new types. Updated all scope references to ensure nothing is public that shouldn't be --- Example/Pods/Pods.xcodeproj/project.pbxproj | 10 +- .../Overlays/PeekOverlayView.swift | 2 +- .../PeekInspectorViewController.swift | 14 +- .../PeekPresentationController.swift | 6 +- .../PeekViewController.swift | 2 +- Pod/Classes/Coordinator/Attribute.swift | 4 +- Pod/Classes/Coordinator/Coordinator.swift | 20 +-- .../GraphicsRenderer/ImageRenderer.swift | 40 ++--- .../GraphicsRenderer/PDFRenderer.swift | 44 +++--- Pod/Classes/GraphicsRenderer/Platforms.swift | 12 +- Pod/Classes/GraphicsRenderer/Renderer.swift | 16 +- .../GraphicsRenderer/RendererDrawable.swift | 12 +- Pod/Classes/Helpers/Color.swift | 82 +++++----- Pod/Classes/Helpers/Constraints.swift | 12 +- Pod/Classes/Helpers/Enum+Cases.swift | 4 +- Pod/Classes/Model/Models.swift | 42 ------ Pod/Classes/Model/Peekable.swift | 142 +++++------------- Pod/Classes/Model/UIView+Ignore.swift | 67 +++++++++ Pod/Classes/Peekable/UIColor+Peekable.swift | 2 +- .../UISegmentedControl+Peekable.swift | 4 +- Pod/Classes/Peekable/UIView+Peekable.swift | 4 +- 21 files changed, 255 insertions(+), 286 deletions(-) delete mode 100644 Pod/Classes/Model/Models.swift create mode 100644 Pod/Classes/Model/UIView+Ignore.swift diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 2b5559e..cac4035 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -35,6 +35,7 @@ 4B1B5BD40C50FABA0E9F0B1267642D08 /* UIToolbar+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFE7F873ED2023A824B5E1EEF3B09CB8 /* UIToolbar+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 4DD48FC7EDFF7E4E65F873EE9E2E0D74 /* PeekPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D10E3F5C38A6ACC92723BFCE14A3481 /* PeekPresentationController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 54BA18A32069429A002B9C5B /* UIDevice+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54BA18A22069429A002B9C5B /* UIDevice+Extensions.swift */; }; + 54C7DFF020694CA3001E383D /* UIView+Ignore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54C7DFEF20694CA3001E383D /* UIView+Ignore.swift */; }; 54CF22A4D3EF233CB7DFA953701CC705 /* Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7728391455F1D6CDE04777AE9594C3 /* Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5542FF14BD626A9583991667176B92ED /* UIPageControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E82C2EF0097E2C3CD3FBB1D84188D45D /* UIPageControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 570AE69F67442A6AD8508A05332C6787 /* UIDevice+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D179539BADBCE6D387E74D35404C3494 /* UIDevice+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -75,7 +76,6 @@ C3F41950EEBE5F381B77C6E706686379 /* UIBarButtonItem+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 582F2B9B55C29DD6FA9207FA424CDA50 /* UIBarButtonItem+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; C6C7BD138C95AD9FD9FD12AA63898FB8 /* UIStackView+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 191A858A7DB5BCCF16FDA5415F59FCD2 /* UIStackView+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; C8A5BFC07703259D1B97F284955163BB /* Constraints.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A40ED9F830D7F95259964D3CBC8E03F /* Constraints.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; - C96F04CB008B43A36471C45C981CD5F4 /* Models.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEC98A316B68F3DC4B144EC3B5C46B65 /* Models.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; CA772D98950376BFBAAE87ED8C38696B /* PeekLayoutView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C0C8492E78F9B75AFC7A5E2DB24D43F /* PeekLayoutView.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; CD74278AA12A3CA53CFEA861F607D5C7 /* NSAttributedString+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5D45E18FF9546CECD2E1ED296F80FB8D /* NSAttributedString+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; D3437A8BA9F344605E6E978F7658E553 /* Attribute.swift in Sources */ = {isa = PBXBuildFile; fileRef = B3512590F3691E0BDAC73AC3ADA368BB /* Attribute.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -153,6 +153,7 @@ 5069C98E696E3AC31FE37081CA4FA3BD /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 51A7C7C54059580E7C1EEB91A7D7D97D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54BA18A22069429A002B9C5B /* UIDevice+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+Extensions.swift"; sourceTree = ""; }; + 54C7DFEF20694CA3001E383D /* UIView+Ignore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Ignore.swift"; sourceTree = ""; }; 554BA39873CF7632FAC9ADF893AD16C6 /* UIImage+Resize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImage+Resize.swift"; sourceTree = ""; }; 582F2B9B55C29DD6FA9207FA424CDA50 /* UIBarButtonItem+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIBarButtonItem+Peekable.swift"; sourceTree = ""; }; 5A99C53FAF3871FA288EF835E3CC8F92 /* ColorAccessoryView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ColorAccessoryView.swift; sourceTree = ""; }; @@ -194,7 +195,6 @@ A8BAAFE4F90F9ECEF2D933C80C2292FD /* UIView+Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIView+Extensions.swift"; sourceTree = ""; }; AC4E724A201BA394AC30E9498545B241 /* UIColor+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIColor+Peekable.swift"; sourceTree = ""; }; ADF403AF8DB474B8EEAE5413D72FD442 /* UITextView+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UITextView+Peekable.swift"; sourceTree = ""; }; - AEC98A316B68F3DC4B144EC3B5C46B65 /* Models.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Models.swift; sourceTree = ""; }; AF3051894A1D96046F285F0BBE957B49 /* PreviewCell.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PreviewCell.swift; sourceTree = ""; }; AFE7F873ED2023A824B5E1EEF3B09CB8 /* UIToolbar+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIToolbar+Peekable.swift"; sourceTree = ""; }; B027FB8F3CC6183AB5D5A2B0BC5154AE /* NSLayoutConstraint+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "NSLayoutConstraint+Peekable.swift"; sourceTree = ""; }; @@ -452,9 +452,9 @@ 903538677589150D6CAF5E0701BD53A4 /* Model */ = { isa = PBXGroup; children = ( - 30F7677913C9AD4E300D39B350B1E565 /* ContextDataSource.swift */, - AEC98A316B68F3DC4B144EC3B5C46B65 /* Models.swift */, 6F7728391455F1D6CDE04777AE9594C3 /* Peekable.swift */, + 54C7DFEF20694CA3001E383D /* UIView+Ignore.swift */, + 30F7677913C9AD4E300D39B350B1E565 /* ContextDataSource.swift */, ); name = Model; path = Pod/Classes/Model; @@ -680,7 +680,6 @@ 700E7600581FA9E11E0607424723D037 /* Images+Orientation.swift in Sources */, DAEE7ACF0E9B719B2B6ED32ABB454064 /* Images+OrientationMask.swift in Sources */, 8817087698D0953320E96E8AD28F30D5 /* LayoutManager.swift in Sources */, - C96F04CB008B43A36471C45C981CD5F4 /* Models.swift in Sources */, CD74278AA12A3CA53CFEA861F607D5C7 /* NSAttributedString+Peekable.swift in Sources */, 607D33B5BAECF7120297A078176407F1 /* NSLayoutConstraint+Peekable.swift in Sources */, 54BA18A32069429A002B9C5B /* UIDevice+Extensions.swift in Sources */, @@ -729,6 +728,7 @@ F645C49CD02A1A1176AE0A01C1F18CBA /* UIImage+Resize.swift in Sources */, A7CCD6B3E718542E0154A32E6C621078 /* UIImageView+Peekable.swift in Sources */, A460EA4D341C9AB3EF0C4A1F427612C4 /* UILabel+Peekable.swift in Sources */, + 54C7DFF020694CA3001E383D /* UIView+Ignore.swift in Sources */, ECF31777808FB1569BFD613624CF973C /* UINavigationBar+Peekable.swift in Sources */, 5542FF14BD626A9583991667176B92ED /* UIPageControl+Peekable.swift in Sources */, 9598DCCBAC37426EDA6F235706150993 /* UIPicker+Peekable.swift in Sources */, diff --git a/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift b/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift index e4dc9a2..d8cdb1b 100644 --- a/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift +++ b/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift @@ -7,7 +7,7 @@ import UIKit -internal protocol ViewModel: Peekable, Model { +internal protocol ViewModel: Peekable { func frameInPeek(_ view: UIView) -> CGRect } diff --git a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift index b0b390f..06a3c03 100644 --- a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift @@ -51,7 +51,7 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U return button }() - private let model: Model & Peekable + private let model: InternalPeekable private let coordinator: PeekCoordinator private var dataSource: ContextDataSource { didSet { tableView.reloadData() } @@ -81,7 +81,7 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U return feedbackGenerator as? UISelectionFeedbackGenerator } - internal init(peek: Peek, model: Model & Peekable) { + internal init(peek: Peek, model: InternalPeekable) { self.model = model self.coordinator = PeekCoordinator(model: model) model.preparePeek(with: coordinator) @@ -262,8 +262,8 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U accessoryView = ColorAccessoryView(color: UIColor(cgColor: value as! CGColor)) } - if let value = value as? PeekInspectorNestable { - cell.accessoryType = tableView.isEditing ? .none : .disclosureIndicator + if let value = value as? InternalPeekable { + cell.accessoryType = tableView.isEditing ? .none : !value.isLeaf ? .disclosureIndicator : .none } if value === model { @@ -303,7 +303,7 @@ extension PeekInspectorViewController: UIViewControllerPreviewingDelegate { let attribute = activeDataSource.attribute(at: indexPath) - if !(attribute is PreviewAttribute), let value = attribute.value as? PeekInspectorNestable { + if !(attribute is PreviewAttribute), let value = attribute.value as? InternalPeekable, !value.isLeaf { let controller = PeekInspectorViewController(peek: peek, model: value) controller.title = attribute.title return controller @@ -415,7 +415,7 @@ extension PeekInspectorViewController { return Report.Section(title: title, items: items) } - let report = Report(title: model.titleForPeekReport(), sections: sections, metadata: peek.options.metadata, snapshot: peek.screenshot) + let report = Report(title: model.reportTitle, sections: sections, metadata: peek.options.metadata, snapshot: peek.screenshot) let controller = ReportViewController(peek: peek, report: report) controller.delegate = self @@ -515,7 +515,7 @@ extension PeekInspectorViewController { let attribute = self.activeDataSource.attribute(at: indexPath) let cell = tableView.cellForRow(at: indexPath) - if !tableView.isEditing, let value = attribute.value as? PeekInspectorNestable, value !== model { + if !tableView.isEditing, let value = attribute.value as? InternalPeekable, !value.isLeaf, value !== model { let controller = PeekInspectorViewController(peek: peek, model: value) controller.title = attribute.title navigationController?.pushViewController(controller, animated: true) diff --git a/Pod/Classes/Controllers & Views/PeekPresentationController.swift b/Pod/Classes/Controllers & Views/PeekPresentationController.swift index 9e0ddfc..d4c5b89 100644 --- a/Pod/Classes/Controllers & Views/PeekPresentationController.swift +++ b/Pod/Classes/Controllers & Views/PeekPresentationController.swift @@ -374,18 +374,20 @@ internal final class PeekPresentationController: UIPresentationController, UIVie } extension NSShadow { - public static var modal: NSShadow { + + fileprivate static var modal: NSShadow { let shadow = NSShadow() shadow.shadowOffset = CGSize(width: 0, height: -2) shadow.shadowBlurRadius = 10 shadow.shadowColor = UIColor(white: 0, alpha: 0.5) return shadow } + } extension UIView { - public var shadow: NSShadow? { + fileprivate var shadow: NSShadow? { get { let shadow = NSShadow() shadow.shadowOffset = layer.shadowOffset diff --git a/Pod/Classes/Controllers & Views/PeekViewController.swift b/Pod/Classes/Controllers & Views/PeekViewController.swift index 2746651..1d1295b 100644 --- a/Pod/Classes/Controllers & Views/PeekViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekViewController.swift @@ -129,7 +129,7 @@ final class PeekViewController: UIViewController, UIViewControllerTransitioningD presentInspectorsForModel(model) } - fileprivate func presentInspectorsForModel(_ model: Model) { + fileprivate func presentInspectorsForModel(_ model: Peekable) { let rect = peek.peekingWindow.bounds var defaults: [String: Bool] = [:] diff --git a/Pod/Classes/Coordinator/Attribute.swift b/Pod/Classes/Coordinator/Attribute.swift index 3e77c55..f099ab7 100644 --- a/Pod/Classes/Coordinator/Attribute.swift +++ b/Pod/Classes/Coordinator/Attribute.swift @@ -44,7 +44,7 @@ internal final class DynamicAttribute: Attribute, CustomStringConvertible, Equat internal let title: String internal let detail: String? internal var previewImage: UIImage? = nil - internal private(set) weak var model: Model? + internal private(set) weak var model: Peekable? internal let valueTransformer: AttributeValueTransformer? @@ -52,7 +52,7 @@ internal final class DynamicAttribute: Attribute, CustomStringConvertible, Equat return model?.value(forKeyPath: keyPath) } - internal init(title: String?, detail: String? = nil, keyPath: String, model: Model, valueTransformer: AttributeValueTransformer? = nil) { + internal init(title: String?, detail: String? = nil, keyPath: String, model: Peekable, valueTransformer: AttributeValueTransformer? = nil) { self.title = title ?? String.capitalized(keyPath) self.detail = detail self.keyPath = keyPath diff --git a/Pod/Classes/Coordinator/Coordinator.swift b/Pod/Classes/Coordinator/Coordinator.swift index 8586c20..bb8f7c0 100644 --- a/Pod/Classes/Coordinator/Coordinator.swift +++ b/Pod/Classes/Coordinator/Coordinator.swift @@ -8,23 +8,23 @@ import Foundation @objc public protocol Coordinator: class { - func appendDynamic(keyPaths: [String], forModel model: Model, in group: Group) - func appendDynamic(keyPathToName mapping: [[String: String]], forModel model: Model, in group: Group) - func appendTransformed(keyPaths: [String], valueTransformer: AttributeValueTransformer?, forModel model: Model, in group: Group) + func appendDynamic(keyPaths: [String], forModel model: Peekable, in group: Group) + func appendDynamic(keyPathToName mapping: [[String: String]], forModel model: Peekable, in group: Group) + func appendTransformed(keyPaths: [String], valueTransformer: AttributeValueTransformer?, forModel model: Peekable, in group: Group) func appendStatic(keyPath: String, title: String, detail: String?, value: Any?, in group: Group) - func appendPreview(image: UIImage, forModel model: Model) + func appendPreview(image: UIImage, forModel model: Peekable) } internal final class PeekCoordinator: Coordinator, CustomStringConvertible { - internal unowned let model: Model + internal unowned let model: Peekable internal private(set) var groupsMapping: [Group: PeekGroup] = [:] - internal init(model: Model) { + internal init(model: Peekable) { self.model = model } - internal func appendPreview(image: UIImage, forModel model: Model) { + internal func appendPreview(image: UIImage, forModel model: Peekable) { guard image.size.width > 0 && image.size.height > 0 else { return } let peekGroup = groupsMapping[.preview] ?? Group.preview.peekGroup() @@ -32,7 +32,7 @@ internal final class PeekCoordinator: Coordinator, CustomStringConvertible { peekGroup.attributes.insert(PreviewAttribute(image: image), at: 0) } - func appendTransformed(keyPaths: [String], valueTransformer: AttributeValueTransformer?, forModel model: Model, in group: Group) { + func appendTransformed(keyPaths: [String], valueTransformer: AttributeValueTransformer?, forModel model: Peekable, in group: Group) { let peekGroup = groupsMapping[group] ?? group.peekGroup() groupsMapping[group] = peekGroup @@ -41,11 +41,11 @@ internal final class PeekCoordinator: Coordinator, CustomStringConvertible { }, at: peekGroup.attributes.count) } - internal func appendDynamic(keyPaths: [String], forModel model: Model, in group: Group) { + internal func appendDynamic(keyPaths: [String], forModel model: Peekable, in group: Group) { appendTransformed(keyPaths: keyPaths, valueTransformer: nil, forModel: model, in: group) } - internal func appendDynamic(keyPathToName mapping: [[String : String]], forModel model: Model, in group: Group) { + internal func appendDynamic(keyPathToName mapping: [[String : String]], forModel model: Peekable, in group: Group) { let peekGroup = groupsMapping[group] ?? group.peekGroup() groupsMapping[group] = peekGroup diff --git a/Pod/Classes/GraphicsRenderer/ImageRenderer.swift b/Pod/Classes/GraphicsRenderer/ImageRenderer.swift index 3f30f31..8a65eef 100644 --- a/Pod/Classes/GraphicsRenderer/ImageRenderer.swift +++ b/Pod/Classes/GraphicsRenderer/ImageRenderer.swift @@ -25,14 +25,14 @@ import Foundation /** * Represents an image renderer format */ -public final class ImageRendererFormat: RendererFormat { +internal final class ImageRendererFormat: RendererFormat { /** Returns a default format, configured for this device. On OSX, this will flip the context to match iOS drawing. - returns: A new format */ - public static func `default`() -> ImageRendererFormat { + internal static func `default`() -> ImageRendererFormat { #if os(OSX) return ImageRendererFormat(flipped: true) #else @@ -41,16 +41,16 @@ public final class ImageRendererFormat: RendererFormat { } /// Returns the bounds for this format - public var bounds: CGRect + internal var bounds: CGRect /// Get/set whether or not the resulting image should be opaque - public var opaque: Bool + internal var opaque: Bool /// Get/set the scale of the resulting image - public var scale: CGFloat + internal var scale: CGFloat /// Get/set whether or not the context should be flipped while drawing - public var isFlipped: Bool + internal var isFlipped: Bool /** Creates a new format with the specified bounds @@ -68,7 +68,7 @@ public final class ImageRendererFormat: RendererFormat { self.isFlipped = flipped } - public init(opaque: Bool = false, scale: CGFloat = Screen.main.scale, flipped: Bool) { + internal init(opaque: Bool = false, scale: CGFloat = Screen.main.scale, flipped: Bool) { self.bounds = .zero self.scale = scale self.isFlipped = flipped @@ -79,16 +79,16 @@ public final class ImageRendererFormat: RendererFormat { /** * Represents a new renderer context */ -public final class ImageRendererContext: RendererContext { +internal final class ImageRendererContext: RendererContext { /// The associated format - public let format: ImageRendererFormat + internal let format: ImageRendererFormat /// The associated CGContext - public let cgContext: CGContext + internal let cgContext: CGContext /// Returns a UIImage representing the current state of the renderer's CGContext - public var currentImage: Image { + internal var currentImage: Image { #if os(OSX) let cgImage = CGContext.current!.makeImage()! return NSImage(cgImage: cgImage, size: format.bounds.size) @@ -113,7 +113,7 @@ public final class ImageRendererContext: RendererContext { } extension ImageRenderer { - public convenience init(bounds: CGRect) { + internal convenience init(bounds: CGRect) { self.init(size: bounds.size, format: nil) } } @@ -121,16 +121,16 @@ extension ImageRenderer { /** * Represents an image renderer used for drawing into a UIImage */ -public final class ImageRenderer: Renderer { +internal final class ImageRenderer: Renderer { /// The associated context type - public typealias Context = ImageRendererContext + internal typealias Context = ImageRendererContext /// Returns true - public let allowsImageOutput: Bool = true + internal let allowsImageOutput: Bool = true /// Returns the format for this renderer - public let format: ImageRendererFormat + internal let format: ImageRendererFormat /** Creates a new renderer with the specified size and format @@ -140,7 +140,7 @@ public final class ImageRenderer: Renderer { - returns: A new image renderer */ - public init(size: CGSize, format: ImageRendererFormat? = nil) { + internal init(size: CGSize, format: ImageRendererFormat? = nil) { guard size != .zero else { fatalError("size cannot be zero") } let bounds = CGRect(origin: .zero, size: size) @@ -157,7 +157,7 @@ public final class ImageRenderer: Renderer { - returns: A new image */ - public func image(actions: (Context) -> Void) -> Image { + internal func image(actions: (Context) -> Void) -> Image { var image: Image? try? runDrawingActions(actions) { context in @@ -174,7 +174,7 @@ public final class ImageRenderer: Renderer { - returns: A PNG data representation */ - public func pngData(actions: (Context) -> Void) -> Data { + internal func pngData(actions: (Context) -> Void) -> Data { let image = self.image(actions: actions) return image.pngRepresentation()! } @@ -186,7 +186,7 @@ public final class ImageRenderer: Renderer { - returns: A JPEG data representation */ - public func jpegData(withCompressionQuality compressionQuality: CGFloat, actions: (Context) -> Void) -> Data { + internal func jpegData(withCompressionQuality compressionQuality: CGFloat, actions: (Context) -> Void) -> Data { let image = self.image(actions: actions) return image.jpgRepresentation(quality: compressionQuality)! } diff --git a/Pod/Classes/GraphicsRenderer/PDFRenderer.swift b/Pod/Classes/GraphicsRenderer/PDFRenderer.swift index 1a73b6c..273bb1e 100644 --- a/Pod/Classes/GraphicsRenderer/PDFRenderer.swift +++ b/Pod/Classes/GraphicsRenderer/PDFRenderer.swift @@ -25,25 +25,25 @@ import Foundation /** * Represents a PDF renderer format */ -public final class PDFRendererFormat: RendererFormat { +internal final class PDFRendererFormat: RendererFormat { /** Returns a default format, configured for this device - returns: A new format */ - public static func `default`() -> PDFRendererFormat { + internal static func `default`() -> PDFRendererFormat { let bounds = CGRect(x: 0, y: 0, width: 612, height: 792) return PDFRendererFormat(bounds: bounds, documentInfo: [:], flipped: false) } /// Returns the bounds for this format - public let bounds: CGRect + internal let bounds: CGRect /// Returns the associated document info - public var documentInfo: [String: Any] + internal var documentInfo: [String: Any] - public var isFlipped: Bool + internal var isFlipped: Bool /** Creates a new format with the specified bounds and pageInfo @@ -64,7 +64,7 @@ public final class PDFRendererFormat: RendererFormat { /// - Parameters: /// - documentInfo: The associated PSD document info /// - flipped: If true, the context drawing will be flipped - public init(documentInfo: [String: Any], flipped: Bool) { + internal init(documentInfo: [String: Any], flipped: Bool) { self.bounds = .zero self.documentInfo = documentInfo self.isFlipped = flipped @@ -74,16 +74,16 @@ public final class PDFRendererFormat: RendererFormat { /// Represents a PDF renderer context -public final class PDFRendererContext: RendererContext { +internal final class PDFRendererContext: RendererContext { /// The underlying CGContext - public let cgContext: CGContext + internal let cgContext: CGContext /// The format for this context - public let format: PDFRendererFormat + internal let format: PDFRendererFormat /// The PDF context bounds - public let pdfContextBounds: CGRect + internal let pdfContextBounds: CGRect // Internal variable for auto-closing pages private var hasOpenPage: Bool = false @@ -101,7 +101,7 @@ public final class PDFRendererContext: RendererContext { } /// Creates a new PDF page. The bounds will be the same as specified by the document - public func beginPage() { + internal func beginPage() { beginPage(withBounds: format.bounds, pageInfo: [:]) } @@ -110,7 +110,7 @@ public final class PDFRendererContext: RendererContext { /// - Parameters: /// - bounds: The bounds to use for this page /// - pageInfo: The pageInfo associated to be associated with this page - public func beginPage(withBounds bounds: CGRect, pageInfo: [String : Any]) { + internal func beginPage(withBounds bounds: CGRect, pageInfo: [String : Any]) { var info = pageInfo info[kCGPDFContextMediaBox as String] = bounds @@ -131,7 +131,7 @@ public final class PDFRendererContext: RendererContext { /// - Parameters: /// - url: The url to link to /// - rect: The rect representing the link - public func setURL(_ url: URL, for rect: CGRect) { + internal func setURL(_ url: URL, for rect: CGRect) { let url = url as CFURL cgContext.setURL(url, for: rect) } @@ -141,7 +141,7 @@ public final class PDFRendererContext: RendererContext { /// - Parameters: /// - name: A destination name /// - point: A location in the current page - public func addDestination(withName name: String, at point: CGPoint) { + internal func addDestination(withName name: String, at point: CGPoint) { let name = name as CFString cgContext.addDestination(name, at: point) } @@ -151,7 +151,7 @@ public final class PDFRendererContext: RendererContext { /// - Parameters: /// - name: A destination name /// - rect: A rect in the current page - public func setDestinationWithName(_ name: String, for rect: CGRect) { + internal func setDestinationWithName(_ name: String, for rect: CGRect) { let name = name as CFString cgContext.setDestination(name, for: rect) } @@ -164,26 +164,26 @@ public final class PDFRendererContext: RendererContext { } extension PDFRenderer { - public convenience init(bounds: CGRect) { + internal convenience init(bounds: CGRect) { self.init(bounds: bounds, format: nil) } } /// Represents a PDF renderer -public final class PDFRenderer: Renderer { +internal final class PDFRenderer: Renderer { /// The associated context type - public typealias Context = PDFRendererContext + internal typealias Context = PDFRendererContext /// Returns the format for this renderer - public let format: PDFRendererFormat + internal let format: PDFRendererFormat /// Creates a new PDF renderer with the specified bounds /// /// - Parameters: /// - bounds: The bounds of the PDF /// - format: The format to use for this PDF - public init(bounds: CGRect, format: PDFRendererFormat? = nil) { + internal init(bounds: CGRect, format: PDFRendererFormat? = nil) { guard bounds.size != .zero else { fatalError("size cannot be zero") } let info = format?.documentInfo ?? [:] @@ -196,7 +196,7 @@ public final class PDFRenderer: Renderer { /// - url: The url to write tp /// - actions: The drawing actions to perform /// - Throws: May throw - public func writePDF(to url: URL, withActions actions: (PDFRendererContext) -> Void) throws { + internal func writePDF(to url: URL, withActions actions: (PDFRendererContext) -> Void) throws { var rect = format.bounds let consumer = CGDataConsumer(url: url as CFURL)! let context = CGContext(consumer: consumer, mediaBox: &rect, format.documentInfo as CFDictionary?)! @@ -207,7 +207,7 @@ public final class PDFRenderer: Renderer { /// /// - Parameter actions: The drawing actions to perform /// - Returns: The PDF data - public func pdfData(actions: (PDFRendererContext) -> Void) -> Data { + internal func pdfData(actions: (PDFRendererContext) -> Void) -> Data { var rect = format.bounds let data = NSMutableData() let consumer = CGDataConsumer(data: data)! diff --git a/Pod/Classes/GraphicsRenderer/Platforms.swift b/Pod/Classes/GraphicsRenderer/Platforms.swift index 9f12e09..b2327a7 100644 --- a/Pod/Classes/GraphicsRenderer/Platforms.swift +++ b/Pod/Classes/GraphicsRenderer/Platforms.swift @@ -22,15 +22,15 @@ #if os(OSX) import AppKit - public typealias Image = NSImage - public typealias Screen = NSScreen + internal typealias Image = NSImage + internal typealias Screen = NSScreen extension NSScreen { - public static var main: NSScreen { + internal static var main: NSScreen { return self.main } - public var scale: CGFloat { + internal var scale: CGFloat { return backingScaleFactor } } @@ -46,8 +46,8 @@ } #else import UIKit - public typealias Image = UIImage - public typealias Screen = UIScreen + internal typealias Image = UIImage + internal typealias Screen = UIScreen extension UIImage { internal func pngRepresentation() -> Data? { diff --git a/Pod/Classes/GraphicsRenderer/Renderer.swift b/Pod/Classes/GraphicsRenderer/Renderer.swift index ff74b10..08165ad 100644 --- a/Pod/Classes/GraphicsRenderer/Renderer.swift +++ b/Pod/Classes/GraphicsRenderer/Renderer.swift @@ -27,7 +27,7 @@ import Foundation - missingContext: The context could not be found or created */ -public enum RendererError: Error { +internal enum RendererError: Error { case missingContext case invalidURL } @@ -35,7 +35,7 @@ public enum RendererError: Error { /** * Defines a renderer format */ -public protocol RendererFormat: class { +internal protocol RendererFormat: class { /** Returns a default instance, configured for the current device @@ -53,7 +53,7 @@ public protocol RendererFormat: class { /** * Represents a drawable -- used to add drawing support to CGContext, RendererContext and UIGraphicsImageRendererContext */ -public protocol RendererDrawable { +internal protocol RendererDrawable { var cgContext: CGContext { get } func fill(_ rect: CGRect) @@ -67,13 +67,13 @@ public protocol RendererDrawable { /** * Represents a renderer context, which provides additional drawing methods as well as access to the underlying CGContext */ -public protocol RendererContext: class, RendererDrawable { +internal protocol RendererContext: class, RendererDrawable { associatedtype Format: RendererFormat var format: Format { get } } extension CGContext: RendererDrawable { - public var cgContext: CGContext { + internal var cgContext: CGContext { return self } } @@ -87,7 +87,7 @@ extension UIGraphicsImageRendererContext: RendererDrawable { } /** * Represents a renderer */ -public protocol Renderer: class { +internal protocol Renderer: class { /// The associated context type this renderer will use associatedtype Context: RendererContext @@ -104,14 +104,14 @@ public protocol Renderer: class { extension Renderer { /// Default implementation returns false - public var allowsImageOutput: Bool { + internal var allowsImageOutput: Bool { return false } /** Default implementation returns false */ - public static func context(with format: RendererFormat) -> CGContext? { + internal static func context(with format: RendererFormat) -> CGContext? { return nil } diff --git a/Pod/Classes/GraphicsRenderer/RendererDrawable.swift b/Pod/Classes/GraphicsRenderer/RendererDrawable.swift index b86e193..d36170b 100644 --- a/Pod/Classes/GraphicsRenderer/RendererDrawable.swift +++ b/Pod/Classes/GraphicsRenderer/RendererDrawable.swift @@ -27,7 +27,7 @@ extension RendererDrawable { /// Fills the specified rect /// /// - Parameter rect: The rect to fill - public func fill(_ rect: CGRect) { + internal func fill(_ rect: CGRect) { fill(rect, blendMode: .normal) } @@ -36,7 +36,7 @@ extension RendererDrawable { /// - Parameters: /// - rect: The rect to fill /// - blendMode: The blend mode to apply to this fill - public func fill(_ rect: CGRect, blendMode: CGBlendMode) { + internal func fill(_ rect: CGRect, blendMode: CGBlendMode) { cgContext.saveGState() cgContext.setBlendMode(blendMode) cgContext.fill(rect) @@ -46,7 +46,7 @@ extension RendererDrawable { /// Strokes the specified rect /// /// - Parameter rect: The rect to stroke - public func stroke(_ rect: CGRect) { + internal func stroke(_ rect: CGRect) { stroke(rect, blendMode: .normal) } @@ -55,7 +55,7 @@ extension RendererDrawable { /// - Parameters: /// - rect: The rect to stroke /// - blendMode: The blend more to apply to this stroke - public func stroke(_ rect: CGRect, blendMode: CGBlendMode) { + internal func stroke(_ rect: CGRect, blendMode: CGBlendMode) { cgContext.saveGState() cgContext.setBlendMode(blendMode) cgContext.stroke(rect.insetBy(dx: 0.5, dy: 0.5)) @@ -65,9 +65,9 @@ extension RendererDrawable { /// Clips the context to the specified rect /// /// - Parameter rect: The rect to clip to - public func clip(to rect: CGRect) { + internal func clip(to rect: CGRect) { cgContext.saveGState() cgContext.clip(to: rect) cgContext.restoreGState() } -} \ No newline at end of file +} diff --git a/Pod/Classes/Helpers/Color.swift b/Pod/Classes/Helpers/Color.swift index 4eee331..81a6798 100644 --- a/Pod/Classes/Helpers/Color.swift +++ b/Pod/Classes/Helpers/Color.swift @@ -25,12 +25,12 @@ import CoreGraphics /** * Represents a color value type */ -public struct Color { +internal struct Color { /// Represents the underlying RGBA values - public var rgba: RGBA + internal var rgba: RGBA - public typealias RGBA = (red: Float, green: Float, blue: Float, alpha: Float) + internal typealias RGBA = (red: Float, green: Float, blue: Float, alpha: Float) /** Initializes this color value with relative component values. e.g. (0.5, 0.2, 0.1, 1.0) @@ -42,7 +42,7 @@ public struct Color { - returns: A new color value */ - public init(red: Float, green: Float, blue: Float, alpha: Float = 1) { + internal init(red: Float, green: Float, blue: Float, alpha: Float = 1) { func clamp(_ value: Float) -> Float { return min(1, max(0, value)) } @@ -57,7 +57,7 @@ public struct Color { - returns: A new color value */ - public func with(alpha: Float) -> Color { + internal func with(alpha: Float) -> Color { return Color(red: rgba.red, green: rgba.green, blue: rgba.blue, alpha: alpha) } } @@ -74,7 +74,7 @@ extension Color { - returns: A new color value */ - public init(literalRed red: Int, green: Int, blue: Int, alpha: Float = 1) { + internal init(literalRed red: Int, green: Int, blue: Int, alpha: Float = 1) { self.init(red: Float(red)/255, green: Float(green)/255, blue: Float(blue)/255, alpha: alpha) } @@ -83,7 +83,7 @@ extension Color { - returns: The RGBA literal component values */ - public func literalRGBA() -> RGBA { + internal func literalRGBA() -> RGBA { return RGBA(red: rgba.red * 255, green: rgba.green * 255, blue: rgba.blue * 255, alpha: rgba.alpha) } @@ -97,7 +97,7 @@ extension Color { - parameter hex: The hex value representing this color - parameter alpha: An optional alpha value. Defaults to 1.0 */ - public init?(hex: Int, alpha: Float? = nil) { + internal init?(hex: Int, alpha: Float? = nil) { self.init(hex: String(format: "%2X", hex), alpha: alpha) } @@ -107,7 +107,7 @@ extension Color { - parameter hex: The hex value representing this color - parameter alpha: An optional alpha value. Defaults to 1.0 */ - public init?(hex: String, alpha: Float? = nil) { + internal init?(hex: String, alpha: Float? = nil) { var hexValue = hex.hasPrefix("#") ? String(hex.dropFirst()) : hex guard [3, 4, 6].contains(hexValue.count) else { return nil } @@ -134,7 +134,7 @@ extension Color { - returns: A hex string representation */ - public func toHex(withAlpha: Bool = true) -> String { + internal func toHex(withAlpha: Bool = true) -> String { let alpha = withAlpha ? String(format: "%02X", Int(rgba.alpha * 255)) : "" return String(format: "%02X%02X%02X\(alpha)", Int(rgba.red * 255), Int(rgba.green * 255), Int(rgba.blue * 255)) } @@ -151,7 +151,7 @@ extension Color { - returns: A new color value */ - public init(white: Float, alpha: Float = 1) { + internal init(white: Float, alpha: Float = 1) { self.init(red: white, green: white, blue: white, alpha: alpha) } @@ -162,7 +162,7 @@ extension Color { - returns: A new color value */ - public init?(cgColor: CGColor) { + internal init?(cgColor: CGColor) { guard let components = cgColor.components else { return nil } let red, green, blue, alpha: Float @@ -182,7 +182,7 @@ extension Color { } /// Returns the CGColor representation of this color - public var cgColor: CGColor { + internal var cgColor: CGColor { return CGColor(colorSpace: CGColorSpaceCreateDeviceRGB(), components: [CGFloat(rgba.red), CGFloat(rgba.green), CGFloat(rgba.blue), CGFloat(rgba.alpha)])! } @@ -192,7 +192,7 @@ extension Color { extension Color { /// Returns true if the color is considered visually dark. False otherwise - public var isDark: Bool { + internal var isDark: Bool { return (0.2126 * rgba.red + 0.7152 * rgba.green + 0.0722 * rgba.blue) < 0.5 } @@ -201,7 +201,7 @@ extension Color { - returns: A color that is the inverse of this color. e.g. white -> black */ - public func inverted() -> Color { + internal func inverted() -> Color { return Color(red: 1 - rgba.red, green: 1 - rgba.green, blue: 1 - rgba.blue, alpha: rgba.alpha) } @@ -209,28 +209,28 @@ extension Color { extension Color { - public static var black: Color { return Color(white: 0) } - public static var darkGray: Color { return Color(white: 0.333) } - public static var lightGray: Color { return Color(white: 0.667) } - public static var white: Color { return Color(white: 1) } - public static var gray: Color { return Color(white: 0.5) } - public static var red: Color { return Color(red: 1, green: 0, blue: 0) } - public static var green: Color { return Color(red: 0, green: 1, blue: 0) } - public static var blue: Color { return Color(red: 0, green: 0, blue: 1) } - public static var cyan: Color { return Color(red: 0, green: 1, blue: 1) } - public static var yellow: Color { return Color(red: 1, green: 1, blue: 0) } - public static var magenta: Color { return Color(red: 1, green: 0, blue: 1) } - public static var orange: Color { return Color(red: 1, green: 0.5, blue: 0) } - public static var purple: Color { return Color(red: 0.5, green: 0, blue: 0.5) } - public static var brown: Color { return Color(red: 0.6, green: 0.4, blue: 0.2) } - public static var clear: Color { return Color(white: 0, alpha: 0) } + internal static var black: Color { return Color(white: 0) } + internal static var darkGray: Color { return Color(white: 0.333) } + internal static var lightGray: Color { return Color(white: 0.667) } + internal static var white: Color { return Color(white: 1) } + internal static var gray: Color { return Color(white: 0.5) } + internal static var red: Color { return Color(red: 1, green: 0, blue: 0) } + internal static var green: Color { return Color(red: 0, green: 1, blue: 0) } + internal static var blue: Color { return Color(red: 0, green: 0, blue: 1) } + internal static var cyan: Color { return Color(red: 0, green: 1, blue: 1) } + internal static var yellow: Color { return Color(red: 1, green: 1, blue: 0) } + internal static var magenta: Color { return Color(red: 1, green: 0, blue: 1) } + internal static var orange: Color { return Color(red: 1, green: 0.5, blue: 0) } + internal static var purple: Color { return Color(red: 0.5, green: 0, blue: 0.5) } + internal static var brown: Color { return Color(red: 0.6, green: 0.4, blue: 0.2) } + internal static var clear: Color { return Color(white: 0, alpha: 0) } } extension Color: CustomStringConvertible { /// Returns a debug friendly description of this color. The string contains both a relative and literal representation as well as the associated hexValue - public var description: String { + internal var description: String { let color = literalRGBA() return "(\(color.red), \(color.green), \(color.blue), \(rgba.alpha)) \(toHex(withAlpha: true))" } @@ -239,15 +239,15 @@ extension Color: CustomStringConvertible { extension Color: ExpressibleByStringLiteral { - public init(extendedGraphemeClusterLiteral value: String) { + internal init(extendedGraphemeClusterLiteral value: String) { self.init(hex: value)! } - public init(unicodeScalarLiteral value: String) { + internal init(unicodeScalarLiteral value: String) { self.init(hex: value)! } - public init(stringLiteral value: String) { + internal init(stringLiteral value: String) { self.init(hex: value)! } @@ -255,7 +255,7 @@ extension Color: ExpressibleByStringLiteral { extension Color: Codable { - public init(from decoder: Decoder) throws { + internal init(from decoder: Decoder) throws { var container = try decoder.unkeyedContainer() let red = try container.decode(Float.self) let green = try container.decode(Float.self) @@ -264,7 +264,7 @@ extension Color: Codable { rgba = RGBA(red: red, green: green, blue: blue, alpha: alpha) } - public func encode(to encoder: Encoder) throws { + internal func encode(to encoder: Encoder) throws { var container = encoder.unkeyedContainer() try container.encode(rgba.red) try container.encode(rgba.green) @@ -276,7 +276,7 @@ extension Color: Codable { extension Color: Equatable { - public static func ==(lhs: Color, rhs: Color) -> Bool { + internal static func ==(lhs: Color, rhs: Color) -> Bool { return lhs.rgba.red == rhs.rgba.red && lhs.rgba.green == rhs.rgba.green && lhs.rgba.blue == rhs.rgba.blue @@ -288,12 +288,12 @@ extension Color: Equatable { #if os(iOS) import UIKit extension Color { - public init?(system: UIColor?) { + internal init?(system: UIColor?) { guard let system = system else { return nil } self.init(cgColor: system.cgColor) } - public var system: UIColor { + internal var system: UIColor { return UIColor(cgColor: cgColor) } } @@ -302,12 +302,12 @@ extension Color: Equatable { #if os(OSX) import AppKit extension Color { - public init?(systemColor: NSColor?) { + internal init?(systemColor: NSColor?) { guard let systemColor = systemColor else { return nil } self.init(cgColor: color.cgColor) } - public var systemColor: NSColor { + internal var systemColor: NSColor { return NSColor(cgColor: cgColor)! } } diff --git a/Pod/Classes/Helpers/Constraints.swift b/Pod/Classes/Helpers/Constraints.swift index 7a8ede9..c4d01bc 100644 --- a/Pod/Classes/Helpers/Constraints.swift +++ b/Pod/Classes/Helpers/Constraints.swift @@ -23,7 +23,7 @@ import UIKit /// Defines a tuple of views that returns a constraint -public typealias Constraint = (UIView, UIView) -> NSLayoutConstraint +internal typealias Constraint = (UIView, UIView) -> NSLayoutConstraint extension NSLayoutConstraint { @@ -45,7 +45,7 @@ extension NSLayoutConstraint { /// - constant: The constant to apply to this constraint /// - priority: The priority to apply to this constraint /// - Returns: A newly configured constraint -public func equal(_ keyPath: KeyPath, constant: CGFloat = 0, priority: UILayoutPriority = .defaultHigh) -> Constraint where Anchor: NSLayoutAnchor { +internal func equal(_ keyPath: KeyPath, constant: CGFloat = 0, priority: UILayoutPriority = .defaultHigh) -> Constraint where Anchor: NSLayoutAnchor { return equal(keyPath, keyPath, constant: constant, priority: priority) } @@ -57,13 +57,13 @@ public func equal(_ keyPath: KeyPath, constant: CG /// - constant: The constant to apply to this constraint /// - priority: The priority to apply to this constraint /// - Returns: A newly configured constraint -public func equal(_ keyPath: KeyPath, _ to: KeyPath, constant: CGFloat = 0, priority: UILayoutPriority = .defaultHigh) -> Constraint where Anchor: NSLayoutAnchor { +internal func equal(_ keyPath: KeyPath, _ to: KeyPath, constant: CGFloat = 0, priority: UILayoutPriority = .defaultHigh) -> Constraint where Anchor: NSLayoutAnchor { return { view, parent in view[keyPath: keyPath].constraint(equalTo: parent[keyPath: to], constant: constant).with(priority: priority) } } -public func sized(_ keyPath: KeyPath, constant: CGFloat, priority: UILayoutPriority = .defaultHigh) -> Constraint where Anchor: NSLayoutDimension { +internal func sized(_ keyPath: KeyPath, constant: CGFloat, priority: UILayoutPriority = .defaultHigh) -> Constraint where Anchor: NSLayoutDimension { return { _, parent in parent[keyPath: keyPath].constraint(equalToConstant: constant).with(priority: priority) } @@ -76,7 +76,7 @@ extension UIView { /// - Parameters: /// - other: The other view this view will be added to /// - constraints: The constraints to apply - public func addSubview(_ other: UIView, below view: UIView? = nil, constraints: [Constraint]) { + internal func addSubview(_ other: UIView, below view: UIView? = nil, constraints: [Constraint]) { if let view = view { insertSubview(other, belowSubview: view) } else { @@ -87,7 +87,7 @@ extension UIView { pin(to: other, constraints: constraints) } - public func pin(to other: UIView, constraints: [Constraint]) { + internal func pin(to other: UIView, constraints: [Constraint]) { NSLayoutConstraint.activate(constraints.map { $0(self, other) }) } diff --git a/Pod/Classes/Helpers/Enum+Cases.swift b/Pod/Classes/Helpers/Enum+Cases.swift index 128ad3f..e6d3739 100644 --- a/Pod/Classes/Helpers/Enum+Cases.swift +++ b/Pod/Classes/Helpers/Enum+Cases.swift @@ -7,11 +7,11 @@ import Foundation -public protocol EnumCollection: Hashable { +internal protocol EnumCollection: Hashable { static var all: [Self] { get } } -public extension EnumCollection { +internal extension EnumCollection { private static func cases() -> AnySequence { return AnySequence { () -> AnyIterator in diff --git a/Pod/Classes/Model/Models.swift b/Pod/Classes/Model/Models.swift deleted file mode 100644 index 76f83a6..0000000 --- a/Pod/Classes/Model/Models.swift +++ /dev/null @@ -1,42 +0,0 @@ -/* - Copyright © 23/04/2016 Shaps - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ - -import Foundation - -/** - * Defines a model that represents a Peekable type - */ -@objc public protocol Model: NSObjectProtocol { - - /** - Allows Peek to use valueForKeyPath to determine values at runtime - - - parameter key: The keyPath to use - - - returns: The underlying runtime value - */ - // func valueForKeyPath(_ key: String) -> AnyObject? - func value(forKeyPath: String) -> Any? - -} - -extension NSObject: Model { } diff --git a/Pod/Classes/Model/Peekable.swift b/Pod/Classes/Model/Peekable.swift index 88fa1d9..65bb8e4 100644 --- a/Pod/Classes/Model/Peekable.swift +++ b/Pod/Classes/Model/Peekable.swift @@ -26,42 +26,54 @@ import UIKit * Defines a view or object that Peek can provide inspectors for */ @objc public protocol Peekable: NSObjectProtocol { - var classForCoder: AnyClass { get } - func shouldIgnore(options: PeekOptions) -> Bool func preparePeek(with coordinator: Coordinator) - func titleForPeekReport() -> String + + var classForCoder: AnyClass { get } + func value(forKeyPath: String) -> Any? +} + +@objc internal protocol InternalPeekable: Peekable { + var isLeaf: Bool { get } + var isComponent: Bool { get } + var reportTitle: String { get } } -@objc public protocol PeekInspectorNestable: Peekable, Model { } +extension UISwitch { override var isComponent: Bool { return true } } +extension UISlider { override var isComponent: Bool { return true } } +extension UIButton { override var isComponent: Bool { return true } } +extension UIStepper { override var isComponent: Bool { return true } } +extension UITextField { override var isComponent: Bool { return true } } +extension UITextView { override var isComponent: Bool { return true } } +extension UIPageControl { override var isComponent: Bool { return true } } +extension UIProgressView { override var isComponent: Bool { return true } } +extension UIActivityIndicatorView { override var isComponent: Bool { return true } } +extension UISegmentedControl { override var isComponent: Bool { return true } } +extension UIDatePicker { override var isComponent: Bool { return true } } -extension CALayer: PeekInspectorNestable { } -extension UIView: PeekInspectorNestable { } -extension UIColor: PeekInspectorNestable { } -extension UIImage: PeekInspectorNestable { } -extension UIFont: PeekInspectorNestable { } -extension UIFontDescriptor: PeekInspectorNestable { } -extension UIBarButtonItem: PeekInspectorNestable { } -extension NSLayoutConstraint: PeekInspectorNestable { } -extension NSAttributedString: PeekInspectorNestable { } -extension UIViewController: PeekInspectorNestable { } -extension UIScreen: PeekInspectorNestable { } -extension UIDevice: PeekInspectorNestable { } -extension UIApplication: PeekInspectorNestable { } -extension Bundle: PeekInspectorNestable { } -extension NSShadow: PeekInspectorNestable { } -extension NSString: PeekIgnoresSubViews { } +extension CALayer { override var isLeaf: Bool { return false } } +extension UIView { override var isLeaf: Bool { return false } } +extension UIColor { override var isLeaf: Bool { return false } } +extension UIImage { override var isLeaf: Bool { return false } } +extension UIFont { override var isLeaf: Bool { return false } } +extension UIFontDescriptor { override var isLeaf: Bool { return false } } +extension UIBarButtonItem { override var isLeaf: Bool { return false } } +extension NSLayoutConstraint { override var isLeaf: Bool { return false } } +extension NSAttributedString { override var isLeaf: Bool { return false } } +extension UIViewController { override var isLeaf: Bool { return false } } +extension UIScreen { override var isLeaf: Bool { return false } } +extension UIDevice { override var isLeaf: Bool { return false } } +extension UIApplication { override var isLeaf: Bool { return false } } +extension Bundle { override var isLeaf: Bool { return false } } +extension NSShadow { override var isLeaf: Bool { return false } } -extension NSObject: Peekable { +extension NSObject: InternalPeekable { - /** - Gives the caller an opportunity to configure Peek with additional attributes - - - parameter coordinator: The coordinator to prepare - */ + @objc internal var isLeaf: Bool { return true } + @objc internal var isComponent: Bool { return false } @objc open func preparePeek(with coordinator: Coordinator) { } - @objc public func titleForPeekReport() -> String { + @objc internal var reportTitle: String { if let view = self as? UIView { return "\(String(describing: view.owningViewController()!.classForCoder)) ▹ \(String(describing: classForCoder))" } else { @@ -76,81 +88,7 @@ extension NSObject: Peekable { - returns: Returns true if Peek should ignore this type, false otherwise */ - public func shouldIgnore(options: PeekOptions) -> Bool { - return false - } -} - -extension UIView { - - /** - Determines if Peek should ignore this view when parsing it into a model - - - parameter peek: The Peek instance - - - returns: Returns true if Peek should ignore this view, false otherwise - */ - public override func shouldIgnore(options: PeekOptions) -> Bool { - let isContainer = isMember(of: UIView.self) && subviews.count > 0 - if isContainer && options.ignoresContainerViews { return true } - - let isInvisible = isHidden || alpha == 0 || frame.equalTo(CGRect.zero) - if isInvisible { return true } - - let isTableViewOrCell = isMember(of: UITableViewCell.self) || isMember(of: UITableView.self) - if isTableViewOrCell { return true } - - let isCollectionView = isMember(of: UICollectionView.self) - if isCollectionView { return true } - - let isFullScreen = frame.equalTo(window?.bounds ?? UIScreen.main.bounds) - if isFullScreen { return true } - - if String(describing: classForCoder).hasPrefix("_UIModern") { return false } - - let blacklist = [ "UIPickerTableView", "UIPickerColumnView", "UITableViewCellContentView" ] - let className = String(describing: classForCoder) - - if className.hasPrefix("_") || blacklist.contains(className) { - return true - } - - let invalidContainerClassNames = [ "UINavigationButton" ] - var superview = self.superview - - while superview != nil { - if superview is PeekIgnoresSubViews { - return true - } - - // also need to check private internal classes - for className in invalidContainerClassNames { - if let klass = NSClassFromString(className) { - if superview?.isMember(of: klass) ?? false { - return true - } - } - } - - superview = superview?.superview - } - + @objc open func shouldIgnore(options: PeekOptions) -> Bool { return false } - } - -// This is a BAD name. What we really want to articulate here is that the scanner should stop at these views and not recurse deeper. Effectively treating these views as a leaf -public protocol PeekIgnoresSubViews { } - -extension UISwitch: PeekIgnoresSubViews { } -extension UISlider: PeekIgnoresSubViews { } -extension UIButton: PeekIgnoresSubViews { } -extension UIStepper: PeekIgnoresSubViews { } -extension UITextField: PeekIgnoresSubViews { } -extension UITextView: PeekIgnoresSubViews { } -extension UIPageControl: PeekIgnoresSubViews { } -extension UIProgressView: PeekIgnoresSubViews { } -extension UIActivityIndicatorView: PeekIgnoresSubViews { } -extension UISegmentedControl: PeekIgnoresSubViews { } -extension UIDatePicker: PeekIgnoresSubViews { } diff --git a/Pod/Classes/Model/UIView+Ignore.swift b/Pod/Classes/Model/UIView+Ignore.swift new file mode 100644 index 0000000..9dae66a --- /dev/null +++ b/Pod/Classes/Model/UIView+Ignore.swift @@ -0,0 +1,67 @@ +// +// UIView+Ignore.swift +// Peek +// +// Created by Shaps Benkau on 26/03/2018. +// + +import UIKit + +extension UIView { + + /** + Determines if Peek should ignore this view when parsing it into a model + + - parameter peek: The Peek instance + + - returns: Returns true if Peek should ignore this view, false otherwise + */ + open override func shouldIgnore(options: PeekOptions) -> Bool { + let isContainer = isMember(of: UIView.self) && subviews.count > 0 + if isContainer && options.ignoresContainerViews { return true } + + let isInvisible = isHidden || alpha == 0 || frame.equalTo(CGRect.zero) + if isInvisible { return true } + + let isTableViewOrCell = isMember(of: UITableViewCell.self) || isMember(of: UITableView.self) + if isTableViewOrCell { return true } + + let isCollectionView = isMember(of: UICollectionView.self) + if isCollectionView { return true } + + let isFullScreen = frame.equalTo(window?.bounds ?? UIScreen.main.bounds) + if isFullScreen { return true } + + if String(describing: classForCoder).hasPrefix("_UIModern") { return false } + + let blacklist = [ "UIPickerTableView", "UIPickerColumnView", "UITableViewCellContentView" ] + let className = String(describing: classForCoder) + + if className.hasPrefix("_") || blacklist.contains(className) { + return true + } + + let invalidContainerClassNames = [ "UINavigationButton" ] + var superview = self.superview + + while superview != nil { + if superview?.isComponent == true { + return true + } + + // also need to check private internal classes + for className in invalidContainerClassNames { + if let klass = NSClassFromString(className) { + if superview?.isMember(of: klass) ?? false { + return true + } + } + } + + superview = superview?.superview + } + + return false + } + +} diff --git a/Pod/Classes/Peekable/UIColor+Peekable.swift b/Pod/Classes/Peekable/UIColor+Peekable.swift index dfda102..83e20c2 100644 --- a/Pod/Classes/Peekable/UIColor+Peekable.swift +++ b/Pod/Classes/Peekable/UIColor+Peekable.swift @@ -22,7 +22,7 @@ import UIKit -extension UIColor: Model { +extension UIColor: Peekable { @objc var peek_alpha: CGFloat { return CGFloat(Color(system: self)?.rgba.alpha ?? 0) diff --git a/Pod/Classes/Peekable/UISegmentedControl+Peekable.swift b/Pod/Classes/Peekable/UISegmentedControl+Peekable.swift index 44fad8c..6d3bb38 100644 --- a/Pod/Classes/Peekable/UISegmentedControl+Peekable.swift +++ b/Pod/Classes/Peekable/UISegmentedControl+Peekable.swift @@ -22,7 +22,7 @@ import UIKit -internal final class Segment: NSObject, PeekInspectorNestable { +internal final class Segment: NSObject { override var description: String { return title ?? "" @@ -34,6 +34,8 @@ internal final class Segment: NSObject, PeekInspectorNestable { @objc var image: UIImage? @objc var contentOffset: CGSize = CGSize.zero + internal override var isLeaf: Bool { return false } + override func preparePeek(with coordinator: Coordinator) { if let image = image { coordinator.appendPreview(image: image, forModel: self) diff --git a/Pod/Classes/Peekable/UIView+Peekable.swift b/Pod/Classes/Peekable/UIView+Peekable.swift index e71aa2e..ff2966c 100644 --- a/Pod/Classes/Peekable/UIView+Peekable.swift +++ b/Pod/Classes/Peekable/UIView+Peekable.swift @@ -193,7 +193,9 @@ extension UIView { } -@objc internal final class Constraints: NSObject, PeekInspectorNestable { +@objc internal final class Constraints: NSObject { + + internal override var isLeaf: Bool { return false } internal weak var view: UIView? From b7b9c5a7737156642edbb91947ef10ab7f343535 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 17:56:02 +0100 Subject: [PATCH 13/37] Added a static library variant for Peek --- Example/Peek.xcodeproj/project.pbxproj | 2 ++ Peek-Static.podspec | 15 +++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 Peek-Static.podspec diff --git a/Example/Peek.xcodeproj/project.pbxproj b/Example/Peek.xcodeproj/project.pbxproj index a7fc746..da8022b 100644 --- a/Example/Peek.xcodeproj/project.pbxproj +++ b/Example/Peek.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ 542668D92054064500F6B016 /* TextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = ""; }; 54533DEB1C66D1DB00527626 /* PhotosUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhotosUI.framework; path = System/Library/Frameworks/PhotosUI.framework; sourceTree = SDKROOT; }; 54533DED1C66D1DB00527626 /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; }; + 5472753920695D9100F1A975 /* Peek-Static.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = "Peek-Static.podspec"; path = "../Peek-Static.podspec"; sourceTree = ""; }; 54A1D79A206859920088079D /* Peek.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Peek.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 54E8B9A32054085000CEEFA3 /* Theming.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Theming.swift; sourceTree = ""; }; 54E8B9A520540A0C00CEEFA3 /* Cell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cell.swift; sourceTree = ""; }; @@ -96,6 +97,7 @@ isa = PBXGroup; children = ( 2294D63777F3A53CCD6C4977 /* Peek.podspec */, + 5472753920695D9100F1A975 /* Peek-Static.podspec */, 25235662A734B5CC098E5A5F /* README.md */, 97CF41E9D825DEAA39984224 /* LICENSE */, ); diff --git a/Peek-Static.podspec b/Peek-Static.podspec new file mode 100644 index 0000000..f46a988 --- /dev/null +++ b/Peek-Static.podspec @@ -0,0 +1,15 @@ +Pod::Spec.new do |s| + s.name = "Peek-Static" + s.version = "5.0.0" + s.summary = "All new design. Inspect your iOS application at runtime." + s.homepage = "https://shaps.me/peek" + s.screenshots = "https://github.com/shaps80/Peek/raw/master/shot.jpg" + s.license = 'MIT' + s.author = { "Shaps Mohsenin" => "shapsuk@me.com" } + s.source = { :git => "https://github.com/shaps80/Peek.git", :tag => s.version.to_s } + s.social_media_url = 'https://twitter.com/shaps' + s.platform = :ios, '9.0' + s.requires_arc = true + s.source_files = 'Pod/Classes/**/*.{swift,h,m}' + s.static_framework = true +end From 4d8f5b3371720b5ffe2f186c121c6645bed623a4 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 17:59:15 +0100 Subject: [PATCH 14/37] Updated specs to point to future 5.1.0 release --- Peek-Static.podspec | 2 +- Peek.podspec | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Peek-Static.podspec b/Peek-Static.podspec index f46a988..f42dff2 100644 --- a/Peek-Static.podspec +++ b/Peek-Static.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Peek-Static" - s.version = "5.0.0" + s.version = "5.1.0" s.summary = "All new design. Inspect your iOS application at runtime." s.homepage = "https://shaps.me/peek" s.screenshots = "https://github.com/shaps80/Peek/raw/master/shot.jpg" diff --git a/Peek.podspec b/Peek.podspec index 809afd8..746ec19 100644 --- a/Peek.podspec +++ b/Peek.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Peek" - s.version = "5.0.0" + s.version = "5.1.0" s.summary = "All new design. Inspect your iOS application at runtime." s.homepage = "https://shaps.me/peek" s.screenshots = "https://github.com/shaps80/Peek/raw/master/shot.jpg" From fc5ce4d07f604612cafb473b473d6054c08f8221 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Mon, 26 Mar 2018 18:00:18 +0100 Subject: [PATCH 15/37] Updated Xcode project to include metadata from the directory --- Example/Peek.xcodeproj/project.pbxproj | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Example/Peek.xcodeproj/project.pbxproj b/Example/Peek.xcodeproj/project.pbxproj index da8022b..93fba2c 100644 --- a/Example/Peek.xcodeproj/project.pbxproj +++ b/Example/Peek.xcodeproj/project.pbxproj @@ -33,6 +33,10 @@ 54533DEB1C66D1DB00527626 /* PhotosUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhotosUI.framework; path = System/Library/Frameworks/PhotosUI.framework; sourceTree = SDKROOT; }; 54533DED1C66D1DB00527626 /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; }; 5472753920695D9100F1A975 /* Peek-Static.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = "Peek-Static.podspec"; path = "../Peek-Static.podspec"; sourceTree = ""; }; + 5472753A20695E7300F1A975 /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CONTRIBUTING.md; path = ../CONTRIBUTING.md; sourceTree = ""; }; + 5472753B20695E7300F1A975 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CHANGELOG.md; path = ../CHANGELOG.md; sourceTree = ""; }; + 5472753C20695E7300F1A975 /* CODE_OF_CONDUCT.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CODE_OF_CONDUCT.md; path = ../CODE_OF_CONDUCT.md; sourceTree = ""; }; + 5472753D20695E7B00F1A975 /* pull_request_template.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = pull_request_template.md; path = ../pull_request_template.md; sourceTree = ""; }; 54A1D79A206859920088079D /* Peek.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Peek.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 54E8B9A32054085000CEEFA3 /* Theming.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Theming.swift; sourceTree = ""; }; 54E8B9A520540A0C00CEEFA3 /* Cell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Cell.swift; sourceTree = ""; }; @@ -76,7 +80,7 @@ isa = PBXGroup; children = ( 540B99E02053FCAF0086FF61 /* NotTwitter */, - 607FACF51AFB993E008FA782 /* Podspec Metadata */, + 607FACF51AFB993E008FA782 /* Metadata */, 607FACD11AFB9204008FA782 /* Products */, E2E8F8A85E45DCC5960CA27A /* Frameworks */, D4D18AA6335E7D0726702C3B /* Pods */, @@ -93,15 +97,19 @@ name = Products; sourceTree = ""; }; - 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { + 607FACF51AFB993E008FA782 /* Metadata */ = { isa = PBXGroup; children = ( 2294D63777F3A53CCD6C4977 /* Peek.podspec */, 5472753920695D9100F1A975 /* Peek-Static.podspec */, - 25235662A734B5CC098E5A5F /* README.md */, 97CF41E9D825DEAA39984224 /* LICENSE */, + 25235662A734B5CC098E5A5F /* README.md */, + 5472753B20695E7300F1A975 /* CHANGELOG.md */, + 5472753C20695E7300F1A975 /* CODE_OF_CONDUCT.md */, + 5472753A20695E7300F1A975 /* CONTRIBUTING.md */, + 5472753D20695E7B00F1A975 /* pull_request_template.md */, ); - name = "Podspec Metadata"; + name = Metadata; sourceTree = ""; }; D4D18AA6335E7D0726702C3B /* Pods */ = { From 105f0d150b64d60385aec943158595f76b8751c4 Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Tue, 27 Mar 2018 00:01:59 +0200 Subject: [PATCH 16/37] Update README.md Fixes type of quotation marks in example line for including framework with Carthage --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e8c7c1..51ff5c2 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ The simplest way to integrate Peek into your project is to use `Cocoapods` or `C pod 'Peek', :configurations => ['Debug'] # Carthage -github `shaps80/Peek` ~> 5.0.1 +github "shaps80/Peek" ~> 5.0.1 ``` You only need 1 line of code to enable Peek in your application: @@ -218,4 +218,4 @@ Artwork by [Vitaliy Gorbachev][7] [gif]: https://github.com/shaps80/Peek/raw/master/preview.gif [contrib-guide]: https://github.com/shaps80/Peek/blob/master/CONTRIBUTING.md [contrib-list]: https://github.com/shaps80/Peek/graphs/contributors -[code-of-conduct]: https://github.com/shaps80/Peek/blob/master/CODE_OF_CONDUCT.md \ No newline at end of file +[code-of-conduct]: https://github.com/shaps80/Peek/blob/master/CODE_OF_CONDUCT.md From 987c74203af85490228e88f1630bc13637783803 Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Tue, 27 Mar 2018 00:46:37 +0200 Subject: [PATCH 17/37] Update README.md Fixes enum --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1e8c7c1..bb78cef 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ Peek allows many options to be configured, allowing you more control over how Pe ```swift window?.peek.enableWithOptions { options in options.theme = .black - options.activationMode = .Auto + options.activationMode = .auto options.shouldIgnoreContainers = true /* @@ -218,4 +218,4 @@ Artwork by [Vitaliy Gorbachev][7] [gif]: https://github.com/shaps80/Peek/raw/master/preview.gif [contrib-guide]: https://github.com/shaps80/Peek/blob/master/CONTRIBUTING.md [contrib-list]: https://github.com/shaps80/Peek/graphs/contributors -[code-of-conduct]: https://github.com/shaps80/Peek/blob/master/CODE_OF_CONDUCT.md \ No newline at end of file +[code-of-conduct]: https://github.com/shaps80/Peek/blob/master/CODE_OF_CONDUCT.md From 7cb13b97961e84d0b28f4787e88cd8f51974a645 Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Mon, 26 Mar 2018 23:32:25 +0200 Subject: [PATCH 18/37] Fixes comment indentation --- Pod/Classes/Images/Images+Inspectors.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pod/Classes/Images/Images+Inspectors.swift b/Pod/Classes/Images/Images+Inspectors.swift index f3b99e2..7d39a3a 100644 --- a/Pod/Classes/Images/Images+Inspectors.swift +++ b/Pod/Classes/Images/Images+Inspectors.swift @@ -205,7 +205,7 @@ final class Images { bezierPath.lineWidth = 1.5 bezierPath.stroke() - //// Rectangle Drawing + //// Rectangle Drawing let rectanglePath = UIBezierPath(rect: CGRect(x: frame.minX + 7, y: frame.minY + 4, width: 10, height: 1.5)) color4.setFill() rectanglePath.fill() From 2dfca17c01854dcd6d8e0961907738642ae397ff Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Mon, 26 Mar 2018 23:34:49 +0200 Subject: [PATCH 19/37] Uses guard instead of if --- Pod/Classes/VolumeController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pod/Classes/VolumeController.swift b/Pod/Classes/VolumeController.swift index 0969e3d..5614731 100644 --- a/Pod/Classes/VolumeController.swift +++ b/Pod/Classes/VolumeController.swift @@ -99,7 +99,7 @@ final class VolumeController: NSObject, PeekActivationController { } @objc func unregister() { - if volumeView == nil { + guard volumeView != nil else { print("\(#file): already unregistered") return } From ffe1f3f26295562cde8159918ccc7a375a029b4c Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Mon, 26 Mar 2018 23:40:03 +0200 Subject: [PATCH 20/37] Refactors hitTest func in PeekOverlayView --- .../Overlays/PeekOverlayView.swift | 27 ++++++++----------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift b/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift index ec35f2f..a3dcf8d 100644 --- a/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift +++ b/Pod/Classes/Controllers & Views/Overlays/PeekOverlayView.swift @@ -128,22 +128,17 @@ internal class PeekOverlayView: UIView { } private func hitTest(at point: CGPoint) { - for (index, model) in zip(viewModels.indices, viewModels) { - let frame = model.frameInPeek(self) - - if frame.contains(point) { - if !indexesForSelectedItems.contains(index) { - selectViewModel(at: index, animated: true) - delegate?.didSelect(viewModel: model, in: self) - } else { - if !isDragging { - indexesForSelectedItems.reverse() - updateHighlights(animated: true) - } - } - - break - } + guard let (index, model) = zip(viewModels.indices, viewModels) + .first(where: { $0.1.frameInPeek(self).contains(point) }) + else { return } + guard indexesForSelectedItems.contains(index) else { + selectViewModel(at: index, animated: true) + delegate?.didSelect(viewModel: model, in: self) + return + } + if !isDragging { + indexesForSelectedItems.reverse() + updateHighlights(animated: true) } } From 9dc658dd421bbf1cb9e4003e7a3fb5a270c1d15a Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Tue, 27 Mar 2018 00:51:30 +0200 Subject: [PATCH 21/37] Fixes filename --- ...eViewController.swift => TimelineViewController.swift} | 2 +- Example/Peek.xcodeproj/project.pbxproj | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename Example/NotTwitter/{TimlineViewController.swift => TimelineViewController.swift} (98%) diff --git a/Example/NotTwitter/TimlineViewController.swift b/Example/NotTwitter/TimelineViewController.swift similarity index 98% rename from Example/NotTwitter/TimlineViewController.swift rename to Example/NotTwitter/TimelineViewController.swift index 81459de..63b7764 100644 --- a/Example/NotTwitter/TimlineViewController.swift +++ b/Example/NotTwitter/TimelineViewController.swift @@ -1,5 +1,5 @@ // -// ViewController.swift +// TimelineViewController.swift // NotTwitter // // Created by Shaps Benkau on 10/03/2018. diff --git a/Example/Peek.xcodeproj/project.pbxproj b/Example/Peek.xcodeproj/project.pbxproj index a7fc746..6ef95d6 100644 --- a/Example/Peek.xcodeproj/project.pbxproj +++ b/Example/Peek.xcodeproj/project.pbxproj @@ -8,7 +8,7 @@ /* Begin PBXBuildFile section */ 540B99E22053FCAF0086FF61 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 540B99E12053FCAF0086FF61 /* AppDelegate.swift */; }; - 540B99E42053FCAF0086FF61 /* TimlineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 540B99E32053FCAF0086FF61 /* TimlineViewController.swift */; }; + 540B99E42053FCAF0086FF61 /* TimelineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 540B99E32053FCAF0086FF61 /* TimelineViewController.swift */; }; 540B99E72053FCAF0086FF61 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 540B99E52053FCAF0086FF61 /* Main.storyboard */; }; 540B99E92053FCAF0086FF61 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 540B99E82053FCAF0086FF61 /* Assets.xcassets */; }; 540B99EC2053FCAF0086FF61 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 540B99EA2053FCAF0086FF61 /* LaunchScreen.storyboard */; }; @@ -24,7 +24,7 @@ 25235662A734B5CC098E5A5F /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 540B99DF2053FCAF0086FF61 /* NotTwitter.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NotTwitter.app; sourceTree = BUILT_PRODUCTS_DIR; }; 540B99E12053FCAF0086FF61 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 540B99E32053FCAF0086FF61 /* TimlineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimlineViewController.swift; sourceTree = ""; }; + 540B99E32053FCAF0086FF61 /* TimelineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TimelineViewController.swift; sourceTree = ""; }; 540B99E62053FCAF0086FF61 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 540B99E82053FCAF0086FF61 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 540B99EB2053FCAF0086FF61 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; @@ -60,7 +60,7 @@ children = ( 54E8B9A32054085000CEEFA3 /* Theming.swift */, 540B99E12053FCAF0086FF61 /* AppDelegate.swift */, - 540B99E32053FCAF0086FF61 /* TimlineViewController.swift */, + 540B99E32053FCAF0086FF61 /* TimelineViewController.swift */, 542668D92054064500F6B016 /* TextView.swift */, 54E8B9A520540A0C00CEEFA3 /* Cell.swift */, 540B99E52053FCAF0086FF61 /* Main.storyboard */, @@ -254,7 +254,7 @@ buildActionMask = 2147483647; files = ( 542668DA2054064500F6B016 /* TextView.swift in Sources */, - 540B99E42053FCAF0086FF61 /* TimlineViewController.swift in Sources */, + 540B99E42053FCAF0086FF61 /* TimelineViewController.swift in Sources */, 54E8B9A42054085000CEEFA3 /* Theming.swift in Sources */, 540B99E22053FCAF0086FF61 /* AppDelegate.swift in Sources */, 54E8B9A620540A0C00CEEFA3 /* Cell.swift in Sources */, From 713fb56abcb5a228e3fb9b35a620d27d2a003635 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Wed, 28 Mar 2018 12:01:29 +0100 Subject: [PATCH 22/37] Updated Peek's Initial Inspector to show the view's type, rather than 'Peek' --- .../Controllers & Views/PeekInspectorViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift index 06a3c03..109d480 100644 --- a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift @@ -95,7 +95,7 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U super.viewDidLoad() if title == nil { - title = "Peek" + title = String(describing: model.classForCoder) } if navigationController?.viewControllers.count == 1 { From 38061b4c7ac017aab59ba962d1923f62d85b24be Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Wed, 28 Mar 2018 12:38:53 +0100 Subject: [PATCH 23/37] Introduced PeekAccessoryProviding for providing custom accessoryView's for an inspector value --- Example/Pods/Pods.xcodeproj/project.pbxproj | 4 ++++ Pod/Classes/Accessory Views/BoolAccessoryView.swift | 4 ++-- .../Accessory Views/ColorAccessoryView.swift | 3 ++- .../Accessory Views/PeekAccessoryProviding.swift | 13 +++++++++++++ 4 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 Pod/Classes/Accessory Views/PeekAccessoryProviding.swift diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index cac4035..c9e385e 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -34,6 +34,7 @@ 49BBA74EF04F0978ACD80741B4B6B6E4 /* UISegmentedControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 369BB6EA47BB4568B60C1E10F77F6C31 /* UISegmentedControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 4B1B5BD40C50FABA0E9F0B1267642D08 /* UIToolbar+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFE7F873ED2023A824B5E1EEF3B09CB8 /* UIToolbar+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 4DD48FC7EDFF7E4E65F873EE9E2E0D74 /* PeekPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D10E3F5C38A6ACC92723BFCE14A3481 /* PeekPresentationController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; + 549D7638206BB57A000738A0 /* PeekAccessoryProviding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 549D7637206BB57A000738A0 /* PeekAccessoryProviding.swift */; }; 54BA18A32069429A002B9C5B /* UIDevice+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54BA18A22069429A002B9C5B /* UIDevice+Extensions.swift */; }; 54C7DFF020694CA3001E383D /* UIView+Ignore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54C7DFEF20694CA3001E383D /* UIView+Ignore.swift */; }; 54CF22A4D3EF233CB7DFA953701CC705 /* Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7728391455F1D6CDE04777AE9594C3 /* Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -152,6 +153,7 @@ 4E5508AC826808D6BE9A4EB649EB6637 /* Pods-NotTwitter-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-NotTwitter-resources.sh"; sourceTree = ""; }; 5069C98E696E3AC31FE37081CA4FA3BD /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 51A7C7C54059580E7C1EEB91A7D7D97D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 549D7637206BB57A000738A0 /* PeekAccessoryProviding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeekAccessoryProviding.swift; sourceTree = ""; }; 54BA18A22069429A002B9C5B /* UIDevice+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+Extensions.swift"; sourceTree = ""; }; 54C7DFEF20694CA3001E383D /* UIView+Ignore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Ignore.swift"; sourceTree = ""; }; 554BA39873CF7632FAC9ADF893AD16C6 /* UIImage+Resize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImage+Resize.swift"; sourceTree = ""; }; @@ -306,6 +308,7 @@ children = ( 25D972449D0B39FC0569FF6FF8139E27 /* BoolAccessoryView.swift */, 5A99C53FAF3871FA288EF835E3CC8F92 /* ColorAccessoryView.swift */, + 549D7637206BB57A000738A0 /* PeekAccessoryProviding.swift */, ); name = "Accessory Views"; path = "Pod/Classes/Accessory Views"; @@ -730,6 +733,7 @@ A460EA4D341C9AB3EF0C4A1F427612C4 /* UILabel+Peekable.swift in Sources */, 54C7DFF020694CA3001E383D /* UIView+Ignore.swift in Sources */, ECF31777808FB1569BFD613624CF973C /* UINavigationBar+Peekable.swift in Sources */, + 549D7638206BB57A000738A0 /* PeekAccessoryProviding.swift in Sources */, 5542FF14BD626A9583991667176B92ED /* UIPageControl+Peekable.swift in Sources */, 9598DCCBAC37426EDA6F235706150993 /* UIPicker+Peekable.swift in Sources */, 79845CFC863E38E3D5E82ADED428636C /* UIProgressView+Peekable.swift in Sources */, diff --git a/Pod/Classes/Accessory Views/BoolAccessoryView.swift b/Pod/Classes/Accessory Views/BoolAccessoryView.swift index c40517a..a26a0e5 100644 --- a/Pod/Classes/Accessory Views/BoolAccessoryView.swift +++ b/Pod/Classes/Accessory Views/BoolAccessoryView.swift @@ -23,9 +23,9 @@ import UIKit /// This accessory view is used in Peek to show a 'switch' representing the underlying Bool value -final class BoolAccessoryView: UIView { +final class BoolAccessoryView: UIView, PeekAccessoryProviding { - private let theme: PeekTheme + internal var theme: PeekTheme fileprivate let size = CGSize(width: 30, height: 20) fileprivate let value: Bool diff --git a/Pod/Classes/Accessory Views/ColorAccessoryView.swift b/Pod/Classes/Accessory Views/ColorAccessoryView.swift index 3dde802..cd0f181 100644 --- a/Pod/Classes/Accessory Views/ColorAccessoryView.swift +++ b/Pod/Classes/Accessory Views/ColorAccessoryView.swift @@ -23,8 +23,9 @@ import UIKit /// This accessory view is used in Peek to show an icon representing the underlying UIColor value -final class ColorAccessoryView: UIView { +final class ColorAccessoryView: UIView, PeekAccessoryProviding { + public var theme: PeekTheme = .dark fileprivate let color: UIColor? fileprivate let size = CGSize(width: 20, height: 20) private let margin: CGFloat = 8 diff --git a/Pod/Classes/Accessory Views/PeekAccessoryProviding.swift b/Pod/Classes/Accessory Views/PeekAccessoryProviding.swift new file mode 100644 index 0000000..90446b1 --- /dev/null +++ b/Pod/Classes/Accessory Views/PeekAccessoryProviding.swift @@ -0,0 +1,13 @@ +// +// PeekAccessoryProviding.swift +// Peek +// +// Created by Shaps Benkau on 28/03/2018. +// + +import Foundation + +public protocol PeekAccessoryProviding { + var theme: PeekTheme { get set } + var intrinsicContentSize: CGSize { get } +} From 674431df39171763f27d27273f1b1d80f6dc2b0b Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Wed, 28 Mar 2018 13:01:40 +0100 Subject: [PATCH 24/37] Added better documentation to Peekable and its definitions. Removed from the public interface since it adds very little value (for now) and isn't the best name anyway. --- Example/Pods/Pods.xcodeproj/project.pbxproj | 2 +- Pod/Classes/Model/Peekable.swift | 70 ++++++++++++++++----- Pod/Classes/Model/UIView+Ignore.swift | 2 +- 3 files changed, 57 insertions(+), 17 deletions(-) diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index c9e385e..bc0f9f5 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -306,9 +306,9 @@ 2D21275270432221808AE7BF0151839E /* Accessory Views */ = { isa = PBXGroup; children = ( + 549D7637206BB57A000738A0 /* PeekAccessoryProviding.swift */, 25D972449D0B39FC0569FF6FF8139E27 /* BoolAccessoryView.swift */, 5A99C53FAF3871FA288EF835E3CC8F92 /* ColorAccessoryView.swift */, - 549D7637206BB57A000738A0 /* PeekAccessoryProviding.swift */, ); name = "Accessory Views"; path = "Pod/Classes/Accessory Views"; diff --git a/Pod/Classes/Model/Peekable.swift b/Pod/Classes/Model/Peekable.swift index 65bb8e4..fc4ebe0 100644 --- a/Pod/Classes/Model/Peekable.swift +++ b/Pod/Classes/Model/Peekable.swift @@ -23,34 +23,62 @@ import UIKit /** - * Defines a view or object that Peek can provide inspectors for + Defines a view or object that Peek can provide inspectors for + Represents a type that can be inspected by Peek. + + @note + Currently this requires conformance to NSObjectProtocol since + KVC is heavily used by Peek Inspectors. */ @objc public protocol Peekable: NSObjectProtocol { - func shouldIgnore(options: PeekOptions) -> Bool + + /// Overide this in your NSObject subclass to provide custom attributes for Peek to inspect. + /// + /// - Parameter coordinator: The coordinator is your interface into Peek's running instance. func preparePeek(with coordinator: Coordinator) + /** + @see `NSObject` `classForCoder` documentation + */ var classForCoder: AnyClass { get } + + /** + @see `NSObject` `value(forKeyPath:)` documentation + */ func value(forKeyPath: String) -> Any? } @objc internal protocol InternalPeekable: Peekable { + + /** + This value is used to determine where nested inspection is possible. + Common examples are fonts, colors, constraints, etc... + To enable nested inspection of a new type, override this value and return true. + */ var isLeaf: Bool { get } + + /** + Some views contain other views, for example a button or slider. + When inspecting your UI its often simpler to reveal only the button + and then perform deeper inspection via Peek's Inspectors. + To enable this behaviour, override this value and return true. + */ var isComponent: Bool { get } + + /** + This value will be used to populate the title of your report for the + selected view. + + @note + This value may be a concatenation of similar titles + to indicate the path of the current value. + + @example + `TimelineViewController ▹ Button ▹ TintColor` + */ var reportTitle: String { get } } -extension UISwitch { override var isComponent: Bool { return true } } -extension UISlider { override var isComponent: Bool { return true } } -extension UIButton { override var isComponent: Bool { return true } } -extension UIStepper { override var isComponent: Bool { return true } } -extension UITextField { override var isComponent: Bool { return true } } -extension UITextView { override var isComponent: Bool { return true } } -extension UIPageControl { override var isComponent: Bool { return true } } -extension UIProgressView { override var isComponent: Bool { return true } } -extension UIActivityIndicatorView { override var isComponent: Bool { return true } } -extension UISegmentedControl { override var isComponent: Bool { return true } } -extension UIDatePicker { override var isComponent: Bool { return true } } - extension CALayer { override var isLeaf: Bool { return false } } extension UIView { override var isLeaf: Bool { return false } } extension UIColor { override var isLeaf: Bool { return false } } @@ -67,6 +95,18 @@ extension UIApplication { override var isLeaf: Bool { return false } } extension Bundle { override var isLeaf: Bool { return false } } extension NSShadow { override var isLeaf: Bool { return false } } +extension UISwitch { override var isComponent: Bool { return true } } +extension UISlider { override var isComponent: Bool { return true } } +extension UIButton { override var isComponent: Bool { return true } } +extension UIStepper { override var isComponent: Bool { return true } } +extension UITextField { override var isComponent: Bool { return true } } +extension UITextView { override var isComponent: Bool { return true } } +extension UIPageControl { override var isComponent: Bool { return true } } +extension UIProgressView { override var isComponent: Bool { return true } } +extension UIActivityIndicatorView { override var isComponent: Bool { return true } } +extension UISegmentedControl { override var isComponent: Bool { return true } } +extension UIDatePicker { override var isComponent: Bool { return true } } + extension NSObject: InternalPeekable { @objc internal var isLeaf: Bool { return true } @@ -88,7 +128,7 @@ extension NSObject: InternalPeekable { - returns: Returns true if Peek should ignore this type, false otherwise */ - @objc open func shouldIgnore(options: PeekOptions) -> Bool { + @objc internal func shouldIgnore(options: PeekOptions) -> Bool { return false } } diff --git a/Pod/Classes/Model/UIView+Ignore.swift b/Pod/Classes/Model/UIView+Ignore.swift index 9dae66a..6d14e52 100644 --- a/Pod/Classes/Model/UIView+Ignore.swift +++ b/Pod/Classes/Model/UIView+Ignore.swift @@ -16,7 +16,7 @@ extension UIView { - returns: Returns true if Peek should ignore this view, false otherwise */ - open override func shouldIgnore(options: PeekOptions) -> Bool { + internal override func shouldIgnore(options: PeekOptions) -> Bool { let isContainer = isMember(of: UIView.self) && subviews.count > 0 if isContainer && options.ignoresContainerViews { return true } From 2f5cf47b054bade9f35882ed5b3a3205f34c4bef Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Wed, 28 Mar 2018 13:27:39 +0100 Subject: [PATCH 25/37] Renamed `shouldIgnore` to `isVisibleInOverlay` to make it more explicit about its purpose. I also removed it from the public interface and the protocol itself as its not yet useful and I'd like to rethink how it gets applied in a future release. --- .../PeekViewController.swift | 2 +- Pod/Classes/Model/Peekable.swift | 12 +++++++--- Pod/Classes/Model/UIView+Ignore.swift | 22 +++++++++---------- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/Pod/Classes/Controllers & Views/PeekViewController.swift b/Pod/Classes/Controllers & Views/PeekViewController.swift index 1d1295b..53b2b02 100644 --- a/Pod/Classes/Controllers & Views/PeekViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekViewController.swift @@ -105,7 +105,7 @@ final class PeekViewController: UIViewController, UIViewControllerTransitioningD private func parseView(_ view: UIView) { for view in view.subviews { - if !view.shouldIgnore(options: peek.options) { + if view.isVisibleInOverlay(options: peek.options) { models.append(view) } diff --git a/Pod/Classes/Model/Peekable.swift b/Pod/Classes/Model/Peekable.swift index fc4ebe0..479b6a9 100644 --- a/Pod/Classes/Model/Peekable.swift +++ b/Pod/Classes/Model/Peekable.swift @@ -77,6 +77,7 @@ import UIKit `TimelineViewController ▹ Button ▹ TintColor` */ var reportTitle: String { get } + } extension CALayer { override var isLeaf: Bool { return false } } @@ -121,6 +122,12 @@ extension NSObject: InternalPeekable { } } + /// Return true if this object should be visible in Peek's overlay selector + /// + /// - Parameter options: The current options for Peek + /// - Returns: True if this object should be visible in Peek's overlay. False otherwise. + @objc internal func isVisibleInOverlay(options: PeekOptions) -> Bool { return false } + /** Determines if Peek should ignore this type when parsing it into a model @@ -128,7 +135,6 @@ extension NSObject: InternalPeekable { - returns: Returns true if Peek should ignore this type, false otherwise */ - @objc internal func shouldIgnore(options: PeekOptions) -> Bool { - return false - } + @available(*, obsoleted: 5.0.1, message: "Overriding this method no longer has any impact on Peek's inspection") + @objc public func shouldIgnore(options: PeekOptions) -> Bool { return false } } diff --git a/Pod/Classes/Model/UIView+Ignore.swift b/Pod/Classes/Model/UIView+Ignore.swift index 6d14e52..a6a9719 100644 --- a/Pod/Classes/Model/UIView+Ignore.swift +++ b/Pod/Classes/Model/UIView+Ignore.swift @@ -16,29 +16,29 @@ extension UIView { - returns: Returns true if Peek should ignore this view, false otherwise */ - internal override func shouldIgnore(options: PeekOptions) -> Bool { + internal override func isVisibleInOverlay(options: PeekOptions) -> Bool { let isContainer = isMember(of: UIView.self) && subviews.count > 0 - if isContainer && options.ignoresContainerViews { return true } + if isContainer && options.ignoresContainerViews { return false } let isInvisible = isHidden || alpha == 0 || frame.equalTo(CGRect.zero) - if isInvisible { return true } + if isInvisible { return false } let isTableViewOrCell = isMember(of: UITableViewCell.self) || isMember(of: UITableView.self) - if isTableViewOrCell { return true } + if isTableViewOrCell { return false } let isCollectionView = isMember(of: UICollectionView.self) - if isCollectionView { return true } + if isCollectionView { return false } let isFullScreen = frame.equalTo(window?.bounds ?? UIScreen.main.bounds) - if isFullScreen { return true } + if isFullScreen { return false } - if String(describing: classForCoder).hasPrefix("_UIModern") { return false } + if String(describing: classForCoder).hasPrefix("_UIModern") { return true } let blacklist = [ "UIPickerTableView", "UIPickerColumnView", "UITableViewCellContentView" ] let className = String(describing: classForCoder) if className.hasPrefix("_") || blacklist.contains(className) { - return true + return false } let invalidContainerClassNames = [ "UINavigationButton" ] @@ -46,14 +46,14 @@ extension UIView { while superview != nil { if superview?.isComponent == true { - return true + return false } // also need to check private internal classes for className in invalidContainerClassNames { if let klass = NSClassFromString(className) { if superview?.isMember(of: klass) ?? false { - return true + return false } } } @@ -61,7 +61,7 @@ extension UIView { superview = superview?.superview } - return false + return true } } From cb6ea882bf4b8dbbc43a872f3a4b60d1f88da734 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Wed, 28 Mar 2018 13:36:47 +0100 Subject: [PATCH 26/37] Refactored the `public CustomStringConvertible` into `internal PeekDescribing` to better document its purpose and also remove the need for it to be public. --- Pod/Classes/Helpers/Enum+Descriptions.swift | 136 +++++++++--------- .../NSAttributedString+Peekable.swift | 2 +- .../NSLayoutConstraint+Peekable.swift | 6 +- .../UIActivityIndicatorView+Peekable.swift | 2 +- Pod/Classes/Peekable/UIButton+Peekable.swift | 2 +- Pod/Classes/Peekable/UIControl+Peekable.swift | 4 +- Pod/Classes/Peekable/UIDevice+Peekable.swift | 2 +- Pod/Classes/Peekable/UIImage+Peekable.swift | 6 +- Pod/Classes/Peekable/UILabel+Peekable.swift | 4 +- .../Peekable/UINavigationBar+Peekable.swift | 2 +- Pod/Classes/Peekable/UIPicker+Peekable.swift | 2 +- .../Peekable/UIScrollView+Peekable.swift | 4 +- .../Peekable/UIStackView+Peekable.swift | 2 +- .../Peekable/UITextField+Peekable.swift | 8 +- .../Peekable/UITextView+Peekable.swift | 2 +- Pod/Classes/Peekable/UIToolbar+Peekable.swift | 2 +- Pod/Classes/Peekable/UIView+Peekable.swift | 4 +- .../Peekable/UIViewController+Peekable.swift | 14 +- 18 files changed, 104 insertions(+), 100 deletions(-) diff --git a/Pod/Classes/Helpers/Enum+Descriptions.swift b/Pod/Classes/Helpers/Enum+Descriptions.swift index 469697d..a0bc6e0 100644 --- a/Pod/Classes/Helpers/Enum+Descriptions.swift +++ b/Pod/Classes/Helpers/Enum+Descriptions.swift @@ -22,9 +22,13 @@ import UIKit -extension UILayoutConstraintAxis: CustomStringConvertible { +internal protocol PeekDescribing { + var displayName: String { get } +} + +extension UILayoutConstraintAxis: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .horizontal: return "Horizontal" case .vertical: return "Vertical" @@ -33,9 +37,9 @@ extension UILayoutConstraintAxis: CustomStringConvertible { } -extension UIStackViewDistribution: CustomStringConvertible { +extension UIStackViewDistribution: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .equalCentering: return "Equal Centering" case .equalSpacing: return "Equal Spacing" @@ -47,9 +51,9 @@ extension UIStackViewDistribution: CustomStringConvertible { } -extension UIStackViewAlignment: CustomStringConvertible { +extension UIStackViewAlignment: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .center: return "Center" case .fill: return "Fill" @@ -62,9 +66,9 @@ extension UIStackViewAlignment: CustomStringConvertible { } -extension UISplitViewControllerDisplayMode: CustomStringConvertible { +extension UISplitViewControllerDisplayMode: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .allVisible: return "All Visible" case .automatic: return "Automatic" @@ -76,9 +80,9 @@ extension UISplitViewControllerDisplayMode: CustomStringConvertible { } @available(iOS 11.0, *) -extension UISplitViewControllerPrimaryEdge: CustomStringConvertible { +extension UISplitViewControllerPrimaryEdge: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .leading: return "Leading" case .trailing: return "Trailing" @@ -87,9 +91,9 @@ extension UISplitViewControllerPrimaryEdge: CustomStringConvertible { } -extension NSLayoutRelation: CustomStringConvertible { +extension NSLayoutRelation: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .equal: return "Equal" case .greaterThanOrEqual: return "Greater or Equal" @@ -99,9 +103,9 @@ extension NSLayoutRelation: CustomStringConvertible { } -extension NSLayoutAttribute: CustomStringConvertible { +extension NSLayoutAttribute: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .lastBaseline: return "Baseline" case .bottom: return "Bottom" @@ -129,9 +133,9 @@ extension NSLayoutAttribute: CustomStringConvertible { } -extension UIProgressViewStyle: CustomStringConvertible { +extension UIProgressViewStyle: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .bar: return "Bar" case .default: return "Default" @@ -140,9 +144,9 @@ extension UIProgressViewStyle: CustomStringConvertible { } -extension UIActivityIndicatorViewStyle: CustomStringConvertible { +extension UIActivityIndicatorViewStyle: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .gray: return "Small Gray" case .white: return "Small White" @@ -152,9 +156,9 @@ extension UIActivityIndicatorViewStyle: CustomStringConvertible { } -extension UIDatePickerMode: CustomStringConvertible { +extension UIDatePickerMode: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .countDownTimer: return "Count Down Timer" case .date: return "Date" @@ -165,9 +169,9 @@ extension UIDatePickerMode: CustomStringConvertible { } -extension UIBarButtonItemStyle: CustomStringConvertible { +extension UIBarButtonItemStyle: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .bordered: return "Bordered" case .done: return "Done" @@ -177,9 +181,9 @@ extension UIBarButtonItemStyle: CustomStringConvertible { } -extension UIBarButtonSystemItem: CustomStringConvertible { +extension UIBarButtonSystemItem: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .action: return "Action" case .add: return "Add" @@ -210,9 +214,9 @@ extension UIBarButtonSystemItem: CustomStringConvertible { } -extension UIBarStyle: CustomStringConvertible { +extension UIBarStyle: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .black: return "Black" case .blackTranslucent: return "Black Translucent" @@ -222,9 +226,9 @@ extension UIBarStyle: CustomStringConvertible { } -extension UITextFieldViewMode: CustomStringConvertible { +extension UITextFieldViewMode: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .always: return "Always" case .never: return "Never" @@ -235,9 +239,9 @@ extension UITextFieldViewMode: CustomStringConvertible { } -extension UITextBorderStyle: CustomStringConvertible { +extension UITextBorderStyle: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .bezel: return "Bezel" case .line: return "Line" @@ -248,9 +252,9 @@ extension UITextBorderStyle: CustomStringConvertible { } -extension UIImageOrientation: CustomStringConvertible { +extension UIImageOrientation: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .down: return "Down" case .downMirrored: return "Down Mirrored" @@ -265,9 +269,9 @@ extension UIImageOrientation: CustomStringConvertible { } -extension UIImageResizingMode: CustomStringConvertible { +extension UIImageResizingMode: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .stretch: return "Stretch" case .tile: return "Tile" @@ -276,9 +280,9 @@ extension UIImageResizingMode: CustomStringConvertible { } -extension UIImageRenderingMode: CustomStringConvertible { +extension UIImageRenderingMode: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .alwaysOriginal: return "Original" case .alwaysTemplate: return "Template" @@ -288,9 +292,9 @@ extension UIImageRenderingMode: CustomStringConvertible { } -extension UIStatusBarStyle: CustomStringConvertible { +extension UIStatusBarStyle: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .lightContent: return "Light Content" default: return "Default" @@ -299,9 +303,9 @@ extension UIStatusBarStyle: CustomStringConvertible { } -extension UIStatusBarAnimation: CustomStringConvertible { +extension UIStatusBarAnimation: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .fade: return "Fade" case .none: return "None" @@ -311,9 +315,9 @@ extension UIStatusBarAnimation: CustomStringConvertible { } -extension UIModalTransitionStyle: CustomStringConvertible { +extension UIModalTransitionStyle: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .coverVertical: return "Cross Vertical" case .crossDissolve: return "Cross Dissolve" @@ -324,9 +328,9 @@ extension UIModalTransitionStyle: CustomStringConvertible { } -extension UIModalPresentationStyle: CustomStringConvertible { +extension UIModalPresentationStyle: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .currentContext: return "Current Context" case .custom: return "Custom" @@ -343,9 +347,9 @@ extension UIModalPresentationStyle: CustomStringConvertible { } -extension UIControlContentVerticalAlignment: CustomStringConvertible { +extension UIControlContentVerticalAlignment: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .bottom: return "Bottom" case .center: return "Center" @@ -356,9 +360,9 @@ extension UIControlContentVerticalAlignment: CustomStringConvertible { } -extension UIControlContentHorizontalAlignment: CustomStringConvertible { +extension UIControlContentHorizontalAlignment: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .left: return "Left" case .center: return "Center" @@ -371,9 +375,9 @@ extension UIControlContentHorizontalAlignment: CustomStringConvertible { } -extension UIButtonType: CustomStringConvertible { +extension UIButtonType: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .custom: return "Custom" case .contactAdd: return "Add Contact" @@ -387,9 +391,9 @@ extension UIButtonType: CustomStringConvertible { } -extension UIDeviceBatteryState: CustomStringConvertible { +extension UIDeviceBatteryState: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .charging: return "Charging" case .full: return "Full" @@ -400,9 +404,9 @@ extension UIDeviceBatteryState: CustomStringConvertible { } -extension UIInterfaceOrientation: CustomStringConvertible { +extension UIInterfaceOrientation: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .landscapeLeft: return "Left" case .landscapeRight: return "Right" @@ -414,9 +418,9 @@ extension UIInterfaceOrientation: CustomStringConvertible { } -extension UIViewContentMode: CustomStringConvertible { +extension UIViewContentMode: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .left: return "Left" case .right: return "Right" @@ -436,9 +440,9 @@ extension UIViewContentMode: CustomStringConvertible { } -extension UIViewTintAdjustmentMode: CustomStringConvertible { +extension UIViewTintAdjustmentMode: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .automatic: return "Automatic" case .dimmed: return "Dimmed" @@ -448,9 +452,9 @@ extension UIViewTintAdjustmentMode: CustomStringConvertible { } -extension NSLineBreakMode: CustomStringConvertible { +extension NSLineBreakMode: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .byCharWrapping: return "Character Wrap" case .byClipping: return "Clipped" @@ -463,9 +467,9 @@ extension NSLineBreakMode: CustomStringConvertible { } -extension NSTextAlignment: CustomStringConvertible { +extension NSTextAlignment: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .center: return "Center" case .justified: return "Justified" @@ -477,9 +481,9 @@ extension NSTextAlignment: CustomStringConvertible { } -extension UIScrollViewIndicatorStyle: CustomStringConvertible { +extension UIScrollViewIndicatorStyle: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .black: return "Black" case .default: return "Default" @@ -489,9 +493,9 @@ extension UIScrollViewIndicatorStyle: CustomStringConvertible { } -extension UIScrollViewKeyboardDismissMode: CustomStringConvertible { +extension UIScrollViewKeyboardDismissMode: PeekDescribing { - public var description: String { + internal var displayName: String { switch self { case .interactive: return "Interactive" case .none: return "None" diff --git a/Pod/Classes/Peekable/NSAttributedString+Peekable.swift b/Pod/Classes/Peekable/NSAttributedString+Peekable.swift index fd4abd9..5cbe791 100644 --- a/Pod/Classes/Peekable/NSAttributedString+Peekable.swift +++ b/Pod/Classes/Peekable/NSAttributedString+Peekable.swift @@ -117,7 +117,7 @@ extension NSAttributedString { coordinator.appendTransformed(keyPaths: ["paragraph.lineBreakMode"], valueTransformer: { value in guard let rawValue = value as? Int, let lineBreakMode = NSLineBreakMode(rawValue: rawValue) else { return nil } - return lineBreakMode.description + return lineBreakMode.displayName }, forModel: self, in: .paragraph) coordinator.appendDynamic(keyPaths: [ diff --git a/Pod/Classes/Peekable/NSLayoutConstraint+Peekable.swift b/Pod/Classes/Peekable/NSLayoutConstraint+Peekable.swift index 4f6f8f3..d91b2e4 100644 --- a/Pod/Classes/Peekable/NSLayoutConstraint+Peekable.swift +++ b/Pod/Classes/Peekable/NSLayoutConstraint+Peekable.swift @@ -52,14 +52,14 @@ extension NSLayoutConstraint { coordinator.appendTransformed(keyPaths: ["secondAttribute"], valueTransformer: { value in guard let rawValue = value as? Int, let attribute = NSLayoutAttribute(rawValue: rawValue) else { return nil } - return attribute.description + return attribute.displayName }, forModel: self, in: .general) coordinator.appendDynamic(keyPaths: ["peek_secondItem"], forModel: self, in: .general) coordinator.appendTransformed(keyPaths: ["firstAttribute"], valueTransformer: { value in guard let rawValue = value as? Int, let attribute = NSLayoutAttribute(rawValue: rawValue) else { return nil } - return attribute.description + return attribute.displayName }, forModel: self, in: .general) coordinator.appendDynamic(keyPaths: ["peek_firstItem"], forModel: self, in: .general) @@ -70,7 +70,7 @@ extension NSLayoutConstraint { coordinator.appendTransformed(keyPaths: ["relation"], valueTransformer: { value in guard let rawValue = value as? Int, let relation = NSLayoutRelation(rawValue: rawValue) else { return nil } - return relation.description + return relation.displayName }, forModel: self, in: .layout) super.preparePeek(with: coordinator) diff --git a/Pod/Classes/Peekable/UIActivityIndicatorView+Peekable.swift b/Pod/Classes/Peekable/UIActivityIndicatorView+Peekable.swift index ad5250b..15e8359 100644 --- a/Pod/Classes/Peekable/UIActivityIndicatorView+Peekable.swift +++ b/Pod/Classes/Peekable/UIActivityIndicatorView+Peekable.swift @@ -31,7 +31,7 @@ extension UIActivityIndicatorView { coordinator.appendTransformed(keyPaths: ["activityIndicatorViewStyle"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UIActivityIndicatorViewStyle(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) super.preparePeek(with: coordinator) diff --git a/Pod/Classes/Peekable/UIButton+Peekable.swift b/Pod/Classes/Peekable/UIButton+Peekable.swift index d510dbd..1237c13 100644 --- a/Pod/Classes/Peekable/UIButton+Peekable.swift +++ b/Pod/Classes/Peekable/UIButton+Peekable.swift @@ -75,7 +75,7 @@ extension UIButton { open override func preparePeek(with coordinator: Coordinator) { coordinator.appendTransformed(keyPaths: ["buttonType"], valueTransformer: { value in guard let rawValue = value as? Int, let buttonType = UIButtonType(rawValue: rawValue) else { return nil } - return buttonType.description + return buttonType.displayName }, forModel: self, in: .appearance) coordinator.appendDynamic(keyPaths: [ diff --git a/Pod/Classes/Peekable/UIControl+Peekable.swift b/Pod/Classes/Peekable/UIControl+Peekable.swift index 6cdee27..5cd0539 100644 --- a/Pod/Classes/Peekable/UIControl+Peekable.swift +++ b/Pod/Classes/Peekable/UIControl+Peekable.swift @@ -31,12 +31,12 @@ extension UIControl { coordinator.appendTransformed(keyPaths: ["contentVerticalAlignment"], valueTransformer: { value in guard let rawValue = value as? Int, let alignment = UIControlContentVerticalAlignment(rawValue: rawValue) else { return nil } - return alignment.description + return alignment.displayName }, forModel: self, in: .layout) coordinator.appendTransformed(keyPaths: ["contentHorizontalAlignment"], valueTransformer: { value in guard let rawValue = value as? Int, let alignment = UIControlContentHorizontalAlignment(rawValue: rawValue) else { return nil } - return alignment.description + return alignment.displayName }, forModel: self, in: .layout) super.preparePeek(with: coordinator) diff --git a/Pod/Classes/Peekable/UIDevice+Peekable.swift b/Pod/Classes/Peekable/UIDevice+Peekable.swift index e0ce150..647dd8c 100644 --- a/Pod/Classes/Peekable/UIDevice+Peekable.swift +++ b/Pod/Classes/Peekable/UIDevice+Peekable.swift @@ -32,7 +32,7 @@ extension UIDevice { coordinator.appendTransformed(keyPaths: ["batteryState"], valueTransformer: { value in guard let rawValue = value as? Int, let state = UIDeviceBatteryState(rawValue: rawValue) else { return nil } - return state.description + return state.displayName }, forModel: self, in: .general) coordinator.appendDynamic(keyPaths: [ diff --git a/Pod/Classes/Peekable/UIImage+Peekable.swift b/Pod/Classes/Peekable/UIImage+Peekable.swift index 19d66d7..519185a 100644 --- a/Pod/Classes/Peekable/UIImage+Peekable.swift +++ b/Pod/Classes/Peekable/UIImage+Peekable.swift @@ -30,17 +30,17 @@ extension UIImage { coordinator.appendTransformed(keyPaths: ["renderingMode"], valueTransformer: { value in guard let rawValue = value as? Int, let mode = UIImageRenderingMode(rawValue: rawValue) else { return nil } - return mode.description + return mode.displayName }, forModel: self, in: .appearance) coordinator.appendTransformed(keyPaths: ["resizingMode"], valueTransformer: { value in guard let rawValue = value as? Int, let mode = UIImageResizingMode(rawValue: rawValue) else { return nil } - return mode.description + return mode.displayName }, forModel: self, in: .appearance) coordinator.appendTransformed(keyPaths: ["imageOrientation"], valueTransformer: { value in guard let rawValue = value as? Int, let mode = UIImageOrientation(rawValue: rawValue) else { return nil } - return mode.description + return mode.displayName }, forModel: self, in: .appearance) coordinator.appendDynamic(keyPaths: [ diff --git a/Pod/Classes/Peekable/UILabel+Peekable.swift b/Pod/Classes/Peekable/UILabel+Peekable.swift index 50c3d25..d98b626 100644 --- a/Pod/Classes/Peekable/UILabel+Peekable.swift +++ b/Pod/Classes/Peekable/UILabel+Peekable.swift @@ -27,7 +27,7 @@ extension UILabel { open override func preparePeek(with coordinator: Coordinator) { coordinator.appendTransformed(keyPaths: ["lineBreakMode"], valueTransformer: { value in guard let rawValue = value as? Int, let lineBreakMode = NSLineBreakMode(rawValue: rawValue) else { return nil } - return lineBreakMode.description + return lineBreakMode.displayName }, forModel: self, in: .behaviour) coordinator.appendDynamic(keyPaths: ["adjustsFontSizeToFitWidth"], forModel: self, in: .behaviour) @@ -39,7 +39,7 @@ extension UILabel { coordinator.appendTransformed(keyPaths: ["textAlignment"], valueTransformer: { value in guard let rawValue = value as? Int, let textAlignment = NSTextAlignment(rawValue: rawValue) else { return nil } - return textAlignment.description + return textAlignment.displayName }, forModel: self, in: .typography) coordinator.appendDynamic(keyPaths: [ diff --git a/Pod/Classes/Peekable/UINavigationBar+Peekable.swift b/Pod/Classes/Peekable/UINavigationBar+Peekable.swift index 134f36f..c5ab5a2 100644 --- a/Pod/Classes/Peekable/UINavigationBar+Peekable.swift +++ b/Pod/Classes/Peekable/UINavigationBar+Peekable.swift @@ -31,7 +31,7 @@ extension UINavigationBar { coordinator.appendTransformed(keyPaths: ["barStyle"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UIBarStyle(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) super.preparePeek(with: coordinator) diff --git a/Pod/Classes/Peekable/UIPicker+Peekable.swift b/Pod/Classes/Peekable/UIPicker+Peekable.swift index 9855472..7ce4d51 100644 --- a/Pod/Classes/Peekable/UIPicker+Peekable.swift +++ b/Pod/Classes/Peekable/UIPicker+Peekable.swift @@ -41,7 +41,7 @@ extension UIDatePicker { coordinator.appendTransformed(keyPaths: ["datePickerMode"], valueTransformer: { value in guard let rawValue = value as? Int, let mode = UIDatePickerMode(rawValue: rawValue) else { return nil } - return mode.description + return mode.displayName }, forModel: self, in: .appearance) super.preparePeek(with: coordinator) diff --git a/Pod/Classes/Peekable/UIScrollView+Peekable.swift b/Pod/Classes/Peekable/UIScrollView+Peekable.swift index 574d2eb..af29587 100644 --- a/Pod/Classes/Peekable/UIScrollView+Peekable.swift +++ b/Pod/Classes/Peekable/UIScrollView+Peekable.swift @@ -37,7 +37,7 @@ extension UIScrollView { coordinator.appendTransformed(keyPaths: ["indicatorStyle"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UIScrollViewIndicatorStyle(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) coordinator.appendDynamic(keyPaths: [ @@ -46,7 +46,7 @@ extension UIScrollView { coordinator.appendTransformed(keyPaths: ["keyboardDismissMode"], valueTransformer: { value in guard let rawValue = value as? Int, let mode = UIScrollViewKeyboardDismissMode(rawValue: rawValue) else { return nil } - return mode.description + return mode.displayName }, forModel: self, in: .behaviour) coordinator.appendDynamic(keyPaths: [ diff --git a/Pod/Classes/Peekable/UIStackView+Peekable.swift b/Pod/Classes/Peekable/UIStackView+Peekable.swift index 36deff0..57f1e0d 100644 --- a/Pod/Classes/Peekable/UIStackView+Peekable.swift +++ b/Pod/Classes/Peekable/UIStackView+Peekable.swift @@ -12,7 +12,7 @@ extension UIStackView { open override func preparePeek(with coordinator: Coordinator) { coordinator.appendTransformed(keyPaths: ["axis"], valueTransformer: { value in guard let rawValue = value as? Int, let axis = UILayoutConstraintAxis(rawValue: rawValue) else { return nil } - return axis.description + return axis.displayName }, forModel: self, in: .appearance) coordinator.appendTransformed(keyPaths: ["distribution"], valueTransformer: { value in diff --git a/Pod/Classes/Peekable/UITextField+Peekable.swift b/Pod/Classes/Peekable/UITextField+Peekable.swift index 6d06af6..2fa9b7a 100644 --- a/Pod/Classes/Peekable/UITextField+Peekable.swift +++ b/Pod/Classes/Peekable/UITextField+Peekable.swift @@ -27,12 +27,12 @@ extension UITextField { open override func preparePeek(with coordinator: Coordinator) { coordinator.appendTransformed(keyPaths: ["borderStyle"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UITextBorderStyle(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) coordinator.appendTransformed(keyPaths: ["clearButtonMode", "leftViewMode", "rightViewMode"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UITextFieldViewMode(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) coordinator.appendDynamic(keyPaths: [ @@ -41,7 +41,7 @@ extension UITextField { coordinator.appendTransformed(keyPaths: ["rightViewMode"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UITextFieldViewMode(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) coordinator.appendDynamic(keyPaths: [ @@ -63,7 +63,7 @@ extension UITextField { coordinator.appendTransformed(keyPaths: ["textAlignment"], valueTransformer: { value in guard let rawValue = value as? Int, let style = NSTextAlignment(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .typography) coordinator.appendDynamic(keyPaths: [ diff --git a/Pod/Classes/Peekable/UITextView+Peekable.swift b/Pod/Classes/Peekable/UITextView+Peekable.swift index 23c4563..9e9b025 100644 --- a/Pod/Classes/Peekable/UITextView+Peekable.swift +++ b/Pod/Classes/Peekable/UITextView+Peekable.swift @@ -40,7 +40,7 @@ extension UITextView { coordinator.appendTransformed(keyPaths: ["textAlignment"], valueTransformer: { value in guard let rawValue = value as? Int, let style = NSTextAlignment(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .typography) coordinator.appendDynamic(keyPaths: [ diff --git a/Pod/Classes/Peekable/UIToolbar+Peekable.swift b/Pod/Classes/Peekable/UIToolbar+Peekable.swift index 098b059..9c2ce6a 100644 --- a/Pod/Classes/Peekable/UIToolbar+Peekable.swift +++ b/Pod/Classes/Peekable/UIToolbar+Peekable.swift @@ -31,7 +31,7 @@ extension UIToolbar { coordinator.appendTransformed(keyPaths: ["barStyle"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UIBarStyle(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) super.preparePeek(with: coordinator) diff --git a/Pod/Classes/Peekable/UIView+Peekable.swift b/Pod/Classes/Peekable/UIView+Peekable.swift index ff2966c..bbd46e3 100644 --- a/Pod/Classes/Peekable/UIView+Peekable.swift +++ b/Pod/Classes/Peekable/UIView+Peekable.swift @@ -112,7 +112,7 @@ extension UIView { coordinator.appendTransformed(keyPaths: ["tintAdjustmentMode"], valueTransformer: { value in guard let rawValue = value as? Int, let adjustmodeMode = UIViewTintAdjustmentMode(rawValue: rawValue) else { return nil } - return adjustmodeMode.description + return adjustmodeMode.displayName }, forModel: self, in: .appearance) coordinator.appendDynamic(keyPaths: [ @@ -127,7 +127,7 @@ extension UIView { coordinator.appendTransformed(keyPaths: ["contentMode"], valueTransformer: { value in guard let rawValue = value as? Int, let contentMode = UIViewContentMode(rawValue: rawValue) else { return nil } - return contentMode.description + return contentMode.displayName }, forModel: self, in: .layout) coordinator.appendDynamic(keyPaths: [ diff --git a/Pod/Classes/Peekable/UIViewController+Peekable.swift b/Pod/Classes/Peekable/UIViewController+Peekable.swift index 971ac19..93a184e 100644 --- a/Pod/Classes/Peekable/UIViewController+Peekable.swift +++ b/Pod/Classes/Peekable/UIViewController+Peekable.swift @@ -30,22 +30,22 @@ extension UIViewController { coordinator.appendTransformed(keyPaths: ["modalTransitionStyle"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UIModalTransitionStyle(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) coordinator.appendTransformed(keyPaths: ["modalPresentationStyle"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UIModalPresentationStyle(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) coordinator.appendTransformed(keyPaths: ["preferredStatusBarStyle"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UIStatusBarStyle(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) coordinator.appendTransformed(keyPaths: ["preferredStatusBarUpdateAnimation"], valueTransformer: { value in guard let rawValue = value as? Int, let style = UIStatusBarAnimation(rawValue: rawValue) else { return nil } - return style.description + return style.displayName }, forModel: self, in: .appearance) if self is UITableViewController { @@ -105,18 +105,18 @@ extension UIViewController { if self is UISplitViewController { coordinator.appendTransformed(keyPaths: ["preferredDisplayMode"], valueTransformer: { value in guard let rawValue = value as? Int, let mode = UISplitViewControllerDisplayMode(rawValue: rawValue) else { return nil } - return mode.description + return mode.displayName }, forModel: self, in: .appearance) coordinator.appendTransformed(keyPaths: ["displayMode"], valueTransformer: { value in guard let rawValue = value as? Int, let mode = UISplitViewControllerDisplayMode(rawValue: rawValue) else { return nil } - return mode.description + return mode.displayName }, forModel: self, in: .appearance) if #available(iOS 11.0, *) { coordinator.appendTransformed(keyPaths: ["primaryEdge"], valueTransformer: { value in guard let rawValue = value as? Int, let edge = UISplitViewControllerPrimaryEdge(rawValue: rawValue) else { return nil } - return edge.description + return edge.displayName }, forModel: self, in: .appearance) } From d4ef2f550a414ea562220716529f2bd587de0d99 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Wed, 28 Mar 2018 14:56:39 +0100 Subject: [PATCH 27/37] Refactored the entire enum transformation implementation to use a more Generic implementation. This has to remain `internal` for now since it can't be exposed to Obj-C code. Its a more consistent implementation, less error prone and now provides the ability for Peek to 'understand' alternate values which can be useful when reporting. --- Example/Pods/Pods.xcodeproj/project.pbxproj | 8 +- Pod/Classes/Coordinator/Coordinator.swift | 77 ++++++++++++++----- Pod/Classes/Helpers/Enum+Cases.swift | 10 +-- Pod/Classes/Model/Peekable.swift | 10 ++- ...IView+Ignore.swift => UIView+Filter.swift} | 0 .../NSAttributedString+Peekable.swift | 6 +- .../NSLayoutConstraint+Peekable.swift | 28 +++---- .../UIActivityIndicatorView+Peekable.swift | 6 +- Pod/Classes/Peekable/UIButton+Peekable.swift | 6 +- Pod/Classes/Peekable/UIControl+Peekable.swift | 12 +-- Pod/Classes/Peekable/UIDevice+Peekable.swift | 6 +- Pod/Classes/Peekable/UIImage+Peekable.swift | 18 +---- Pod/Classes/Peekable/UILabel+Peekable.swift | 18 ++--- .../Peekable/UINavigationBar+Peekable.swift | 6 +- Pod/Classes/Peekable/UIPicker+Peekable.swift | 6 +- .../Peekable/UIScrollView+Peekable.swift | 14 +--- .../Peekable/UIStackView+Peekable.swift | 18 +---- .../Peekable/UITextField+Peekable.swift | 25 ++---- .../Peekable/UITextView+Peekable.swift | 6 +- Pod/Classes/Peekable/UIToolbar+Peekable.swift | 6 +- Pod/Classes/Peekable/UIView+Peekable.swift | 14 +--- .../Peekable/UIViewController+Peekable.swift | 63 ++++----------- 22 files changed, 143 insertions(+), 220 deletions(-) rename Pod/Classes/Model/{UIView+Ignore.swift => UIView+Filter.swift} (100%) diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index bc0f9f5..8c65dfa 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -36,7 +36,7 @@ 4DD48FC7EDFF7E4E65F873EE9E2E0D74 /* PeekPresentationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2D10E3F5C38A6ACC92723BFCE14A3481 /* PeekPresentationController.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 549D7638206BB57A000738A0 /* PeekAccessoryProviding.swift in Sources */ = {isa = PBXBuildFile; fileRef = 549D7637206BB57A000738A0 /* PeekAccessoryProviding.swift */; }; 54BA18A32069429A002B9C5B /* UIDevice+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54BA18A22069429A002B9C5B /* UIDevice+Extensions.swift */; }; - 54C7DFF020694CA3001E383D /* UIView+Ignore.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54C7DFEF20694CA3001E383D /* UIView+Ignore.swift */; }; + 54C7DFF020694CA3001E383D /* UIView+Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54C7DFEF20694CA3001E383D /* UIView+Filter.swift */; }; 54CF22A4D3EF233CB7DFA953701CC705 /* Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F7728391455F1D6CDE04777AE9594C3 /* Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 5542FF14BD626A9583991667176B92ED /* UIPageControl+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = E82C2EF0097E2C3CD3FBB1D84188D45D /* UIPageControl+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; 570AE69F67442A6AD8508A05332C6787 /* UIDevice+Peekable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D179539BADBCE6D387E74D35404C3494 /* UIDevice+Peekable.swift */; settings = {COMPILER_FLAGS = "-w -Xanalyzer -analyzer-disable-all-checks"; }; }; @@ -155,7 +155,7 @@ 51A7C7C54059580E7C1EEB91A7D7D97D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 549D7637206BB57A000738A0 /* PeekAccessoryProviding.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PeekAccessoryProviding.swift; sourceTree = ""; }; 54BA18A22069429A002B9C5B /* UIDevice+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDevice+Extensions.swift"; sourceTree = ""; }; - 54C7DFEF20694CA3001E383D /* UIView+Ignore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Ignore.swift"; sourceTree = ""; }; + 54C7DFEF20694CA3001E383D /* UIView+Filter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIView+Filter.swift"; sourceTree = ""; }; 554BA39873CF7632FAC9ADF893AD16C6 /* UIImage+Resize.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImage+Resize.swift"; sourceTree = ""; }; 582F2B9B55C29DD6FA9207FA424CDA50 /* UIBarButtonItem+Peekable.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIBarButtonItem+Peekable.swift"; sourceTree = ""; }; 5A99C53FAF3871FA288EF835E3CC8F92 /* ColorAccessoryView.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ColorAccessoryView.swift; sourceTree = ""; }; @@ -456,7 +456,7 @@ isa = PBXGroup; children = ( 6F7728391455F1D6CDE04777AE9594C3 /* Peekable.swift */, - 54C7DFEF20694CA3001E383D /* UIView+Ignore.swift */, + 54C7DFEF20694CA3001E383D /* UIView+Filter.swift */, 30F7677913C9AD4E300D39B350B1E565 /* ContextDataSource.swift */, ); name = Model; @@ -731,7 +731,7 @@ F645C49CD02A1A1176AE0A01C1F18CBA /* UIImage+Resize.swift in Sources */, A7CCD6B3E718542E0154A32E6C621078 /* UIImageView+Peekable.swift in Sources */, A460EA4D341C9AB3EF0C4A1F427612C4 /* UILabel+Peekable.swift in Sources */, - 54C7DFF020694CA3001E383D /* UIView+Ignore.swift in Sources */, + 54C7DFF020694CA3001E383D /* UIView+Filter.swift in Sources */, ECF31777808FB1569BFD613624CF973C /* UINavigationBar+Peekable.swift in Sources */, 549D7638206BB57A000738A0 /* PeekAccessoryProviding.swift in Sources */, 5542FF14BD626A9583991667176B92ED /* UIPageControl+Peekable.swift in Sources */, diff --git a/Pod/Classes/Coordinator/Coordinator.swift b/Pod/Classes/Coordinator/Coordinator.swift index bb8f7c0..221d754 100644 --- a/Pod/Classes/Coordinator/Coordinator.swift +++ b/Pod/Classes/Coordinator/Coordinator.swift @@ -8,14 +8,24 @@ import Foundation @objc public protocol Coordinator: class { - func appendDynamic(keyPaths: [String], forModel model: Peekable, in group: Group) - func appendDynamic(keyPathToName mapping: [[String: String]], forModel model: Peekable, in group: Group) - func appendTransformed(keyPaths: [String], valueTransformer: AttributeValueTransformer?, forModel model: Peekable, in group: Group) - func appendStatic(keyPath: String, title: String, detail: String?, value: Any?, in group: Group) - func appendPreview(image: UIImage, forModel model: Peekable) + @discardableResult + func appendDynamic(keyPaths: [String], forModel model: Peekable, in group: Group) -> Coordinator + @discardableResult + func appendDynamic(keyPathToName mapping: [[String: String]], forModel model: Peekable, in group: Group) -> Coordinator + @discardableResult + func appendStatic(keyPath: String, title: String, detail: String?, value: Any?, in group: Group) -> Coordinator + @discardableResult + func appendPreview(image: UIImage, forModel model: Peekable) -> Coordinator + @discardableResult + func appendTransformed(keyPaths: [String], valueTransformer: AttributeValueTransformer?, forModel model: Peekable, in group: Group) -> Coordinator } -internal final class PeekCoordinator: Coordinator, CustomStringConvertible { +internal protocol SwiftCoordinator: Coordinator { + @discardableResult + func appendEnum(keyPath: String..., into: T.Type, forModel model: Peekable, group: Group) -> Self where T: RawRepresentable, T.RawValue == Int +} + +internal final class PeekCoordinator: SwiftCoordinator { internal unowned let model: Peekable internal private(set) var groupsMapping: [Group: PeekGroup] = [:] @@ -24,44 +34,69 @@ internal final class PeekCoordinator: Coordinator, CustomStringConvertible { self.model = model } - internal func appendPreview(image: UIImage, forModel model: Peekable) { - guard image.size.width > 0 && image.size.height > 0 else { return } + internal func appendPreview(image: UIImage, forModel model: Peekable) -> Coordinator { + guard image.size.width > 0 && image.size.height > 0 else { return self } let peekGroup = groupsMapping[.preview] ?? Group.preview.peekGroup() groupsMapping[.preview] = peekGroup peekGroup.attributes.insert(PreviewAttribute(image: image), at: 0) + + return self } - func appendTransformed(keyPaths: [String], valueTransformer: AttributeValueTransformer?, forModel model: Peekable, in group: Group) { - let peekGroup = groupsMapping[group] ?? group.peekGroup() - groupsMapping[group] = peekGroup - - peekGroup.attributes.insert(contentsOf: keyPaths.map { - DynamicAttribute(title: String.capitalized($0), detail: nil, keyPath: $0, model: model, valueTransformer: valueTransformer) - }, at: peekGroup.attributes.count) - } - - internal func appendDynamic(keyPaths: [String], forModel model: Peekable, in group: Group) { - appendTransformed(keyPaths: keyPaths, valueTransformer: nil, forModel: model, in: group) + internal func appendDynamic(keyPaths: [String], forModel model: Peekable, in group: Group) -> Coordinator { + return appendTransformed(keyPaths: keyPaths, valueTransformer: nil, forModel: model, in: group) } - internal func appendDynamic(keyPathToName mapping: [[String : String]], forModel model: Peekable, in group: Group) { + internal func appendDynamic(keyPathToName mapping: [[String : String]], forModel model: Peekable, in group: Group) -> Coordinator { let peekGroup = groupsMapping[group] ?? group.peekGroup() groupsMapping[group] = peekGroup peekGroup.attributes.insert(contentsOf: mapping.map { DynamicAttribute(title: $0.values.first!, keyPath: $0.keys.first!, model: model) }, at: peekGroup.attributes.count) + + return self } - internal func appendStatic(keyPath: String, title: String, detail: String? = nil, value: Any?, in group: Group) { + internal func appendStatic(keyPath: String, title: String, detail: String? = nil, value: Any?, in group: Group) -> Coordinator { let peekGroup = groupsMapping[group] ?? group.peekGroup() groupsMapping[group] = peekGroup let attribute = StaticAttribute(keyPath: keyPath, title: title, detail: detail, value: value) peekGroup.attributes.insert(attribute, at: peekGroup.attributes.count) + + return self + } + + internal func appendTransformed(keyPaths: [String], valueTransformer: AttributeValueTransformer?, forModel model: Peekable, in group: Group) -> Coordinator { + let peekGroup = groupsMapping[group] ?? group.peekGroup() + groupsMapping[group] = peekGroup + + peekGroup.attributes.insert(contentsOf: keyPaths.map { + DynamicAttribute(title: String.capitalized($0), detail: nil, keyPath: $0, model: model, valueTransformer: valueTransformer) + }, at: peekGroup.attributes.count) + + return self + } + + internal func appendEnum(keyPath: String..., into: T.Type, forModel model: Peekable, group: Group) -> Self where T: RawRepresentable, T.RawValue == Int { + appendTransformed(keyPaths: keyPath, valueTransformer: { value in + guard let rawValue = value as? Int, + let enumRep = T(rawValue: rawValue) as? PeekDescribing else { + fatalError() + } + + return enumRep.displayName + }, forModel: model, in: group) + + return self } +} + +extension PeekCoordinator: CustomStringConvertible { + internal var description: String { return """ \(type(of: self)) diff --git a/Pod/Classes/Helpers/Enum+Cases.swift b/Pod/Classes/Helpers/Enum+Cases.swift index e6d3739..9a6a70b 100644 --- a/Pod/Classes/Helpers/Enum+Cases.swift +++ b/Pod/Classes/Helpers/Enum+Cases.swift @@ -7,18 +7,14 @@ import Foundation -internal protocol EnumCollection: Hashable { - static var all: [Self] { get } -} - -internal extension EnumCollection { +extension RawRepresentable where RawValue == Int { private static func cases() -> AnySequence { return AnySequence { () -> AnyIterator in var raw = 0 return AnyIterator { let current: Self = withUnsafePointer(to: &raw) { $0.withMemoryRebound(to: self, capacity: 1) { $0.pointee } } - guard current.hashValue == raw else { + guard current.rawValue.hashValue == raw else { return nil } raw += 1 @@ -27,7 +23,7 @@ internal extension EnumCollection { } } - public static var all: [Self] { + internal static var all: [Self] { return Array(self.cases()) } } diff --git a/Pod/Classes/Model/Peekable.swift b/Pod/Classes/Model/Peekable.swift index 479b6a9..bba05d4 100644 --- a/Pod/Classes/Model/Peekable.swift +++ b/Pod/Classes/Model/Peekable.swift @@ -78,6 +78,12 @@ import UIKit */ var reportTitle: String { get } + /// Return true if this object should be visible in Peek's overlay selector + /// + /// - Parameter options: The current options for Peek + /// - Returns: True if this object should be visible in Peek's overlay. False otherwise. +// func isVisibleInOverlay(options: PeekOptions) -> Bool + } extension CALayer { override var isLeaf: Bool { return false } } @@ -122,10 +128,6 @@ extension NSObject: InternalPeekable { } } - /// Return true if this object should be visible in Peek's overlay selector - /// - /// - Parameter options: The current options for Peek - /// - Returns: True if this object should be visible in Peek's overlay. False otherwise. @objc internal func isVisibleInOverlay(options: PeekOptions) -> Bool { return false } /** diff --git a/Pod/Classes/Model/UIView+Ignore.swift b/Pod/Classes/Model/UIView+Filter.swift similarity index 100% rename from Pod/Classes/Model/UIView+Ignore.swift rename to Pod/Classes/Model/UIView+Filter.swift diff --git a/Pod/Classes/Peekable/NSAttributedString+Peekable.swift b/Pod/Classes/Peekable/NSAttributedString+Peekable.swift index 5cbe791..edca582 100644 --- a/Pod/Classes/Peekable/NSAttributedString+Peekable.swift +++ b/Pod/Classes/Peekable/NSAttributedString+Peekable.swift @@ -115,10 +115,8 @@ extension NSAttributedString { "paragraph.firstLineHeadIndent" ], forModel: self, in: .paragraph) - coordinator.appendTransformed(keyPaths: ["paragraph.lineBreakMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let lineBreakMode = NSLineBreakMode(rawValue: rawValue) else { return nil } - return lineBreakMode.displayName - }, forModel: self, in: .paragraph) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "paragraph.lineBreakMode", into: NSLineBreakMode.self, forModel: self, group: .paragraph) coordinator.appendDynamic(keyPaths: [ "attributes.shadow.shadowOffset", diff --git a/Pod/Classes/Peekable/NSLayoutConstraint+Peekable.swift b/Pod/Classes/Peekable/NSLayoutConstraint+Peekable.swift index d91b2e4..fc5a469 100644 --- a/Pod/Classes/Peekable/NSLayoutConstraint+Peekable.swift +++ b/Pod/Classes/Peekable/NSLayoutConstraint+Peekable.swift @@ -22,9 +22,9 @@ import UIKit -extension NSLayoutConstraint { +extension NSLayoutConstraint: PeekDescribing { - open override var description: String { + internal var displayName: String { var name = "\(perform(Selector(("asciiArtDescription"))))".components(separatedBy: ": ").last if name == "nil" { @@ -50,29 +50,23 @@ extension NSLayoutConstraint { "shouldBeArchived" ], forModel: self, in: .behaviour) - coordinator.appendTransformed(keyPaths: ["secondAttribute"], valueTransformer: { value in - guard let rawValue = value as? Int, let attribute = NSLayoutAttribute(rawValue: rawValue) else { return nil } - return attribute.displayName - }, forModel: self, in: .general) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "firstAttribute", into: NSLayoutAttribute.self, forModel: self, group: .general) - coordinator.appendDynamic(keyPaths: ["peek_secondItem"], forModel: self, in: .general) + coordinator.appendDynamic(keyPaths: ["peek_firstItem"], forModel: self, in: .general) - coordinator.appendTransformed(keyPaths: ["firstAttribute"], valueTransformer: { value in - guard let rawValue = value as? Int, let attribute = NSLayoutAttribute(rawValue: rawValue) else { return nil } - return attribute.displayName - }, forModel: self, in: .general) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "secondAttribute", into: NSLayoutAttribute.self, forModel: self, group: .general) - coordinator.appendDynamic(keyPaths: ["peek_firstItem"], forModel: self, in: .general) + coordinator.appendDynamic(keyPaths: ["peek_secondItem"], forModel: self, in: .general) + + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "relation", into: NSLayoutRelation.self, forModel: self, group: .general) coordinator.appendDynamic(keyPaths: [ "constant", "multiplier", "priority" ], forModel: self, in: .layout) - coordinator.appendTransformed(keyPaths: ["relation"], valueTransformer: { value in - guard let rawValue = value as? Int, let relation = NSLayoutRelation(rawValue: rawValue) else { return nil } - return relation.displayName - }, forModel: self, in: .layout) - super.preparePeek(with: coordinator) } diff --git a/Pod/Classes/Peekable/UIActivityIndicatorView+Peekable.swift b/Pod/Classes/Peekable/UIActivityIndicatorView+Peekable.swift index 15e8359..d6ca433 100644 --- a/Pod/Classes/Peekable/UIActivityIndicatorView+Peekable.swift +++ b/Pod/Classes/Peekable/UIActivityIndicatorView+Peekable.swift @@ -29,10 +29,8 @@ extension UIActivityIndicatorView { coordinator.appendDynamic(keyPaths: ["isAnimating"], forModel: self, in: .states) coordinator.appendDynamic(keyPaths: ["color"], forModel: self, in: .appearance) - coordinator.appendTransformed(keyPaths: ["activityIndicatorViewStyle"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UIActivityIndicatorViewStyle(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "activityIndicatorViewStyle", into: UIActivityIndicatorViewStyle.self, forModel: self, group: .appearance) super.preparePeek(with: coordinator) } diff --git a/Pod/Classes/Peekable/UIButton+Peekable.swift b/Pod/Classes/Peekable/UIButton+Peekable.swift index 1237c13..625bb00 100644 --- a/Pod/Classes/Peekable/UIButton+Peekable.swift +++ b/Pod/Classes/Peekable/UIButton+Peekable.swift @@ -73,10 +73,8 @@ extension UIButton { } open override func preparePeek(with coordinator: Coordinator) { - coordinator.appendTransformed(keyPaths: ["buttonType"], valueTransformer: { value in - guard let rawValue = value as? Int, let buttonType = UIButtonType(rawValue: rawValue) else { return nil } - return buttonType.displayName - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "buttonType", into: UIButtonType.self, forModel: self, group: .appearance) coordinator.appendDynamic(keyPaths: [ "contentEdgeInsets", diff --git a/Pod/Classes/Peekable/UIControl+Peekable.swift b/Pod/Classes/Peekable/UIControl+Peekable.swift index 5cd0539..acbd76e 100644 --- a/Pod/Classes/Peekable/UIControl+Peekable.swift +++ b/Pod/Classes/Peekable/UIControl+Peekable.swift @@ -29,15 +29,9 @@ extension UIControl { "enabled", "selected", "highlighted" ], forModel: self, in: .states) - coordinator.appendTransformed(keyPaths: ["contentVerticalAlignment"], valueTransformer: { value in - guard let rawValue = value as? Int, let alignment = UIControlContentVerticalAlignment(rawValue: rawValue) else { return nil } - return alignment.displayName - }, forModel: self, in: .layout) - - coordinator.appendTransformed(keyPaths: ["contentHorizontalAlignment"], valueTransformer: { value in - guard let rawValue = value as? Int, let alignment = UIControlContentHorizontalAlignment(rawValue: rawValue) else { return nil } - return alignment.displayName - }, forModel: self, in: .layout) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "contentVerticalAlignment", into: UIControlContentVerticalAlignment.self, forModel: self, group: .layout) + .appendEnum(keyPath: "contentHorizontalAlignment", into: UIControlContentHorizontalAlignment.self, forModel: self, group: .layout) super.preparePeek(with: coordinator) } diff --git a/Pod/Classes/Peekable/UIDevice+Peekable.swift b/Pod/Classes/Peekable/UIDevice+Peekable.swift index 647dd8c..16ca3f0 100644 --- a/Pod/Classes/Peekable/UIDevice+Peekable.swift +++ b/Pod/Classes/Peekable/UIDevice+Peekable.swift @@ -30,10 +30,8 @@ extension UIDevice { "proximityMonitoringEnabled" ], forModel: self, in: .states) - coordinator.appendTransformed(keyPaths: ["batteryState"], valueTransformer: { value in - guard let rawValue = value as? Int, let state = UIDeviceBatteryState(rawValue: rawValue) else { return nil } - return state.displayName - }, forModel: self, in: .general) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "batteryState", into: UIDeviceBatteryState.self, forModel: self, group: .general) coordinator.appendDynamic(keyPaths: [ "batteryLevel", diff --git a/Pod/Classes/Peekable/UIImage+Peekable.swift b/Pod/Classes/Peekable/UIImage+Peekable.swift index 519185a..a82f000 100644 --- a/Pod/Classes/Peekable/UIImage+Peekable.swift +++ b/Pod/Classes/Peekable/UIImage+Peekable.swift @@ -28,20 +28,10 @@ extension UIImage { let preview = renderingMode != .alwaysOriginal ? withRenderingMode(.alwaysTemplate) : self coordinator.appendPreview(image: preview, forModel: self) - coordinator.appendTransformed(keyPaths: ["renderingMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let mode = UIImageRenderingMode(rawValue: rawValue) else { return nil } - return mode.displayName - }, forModel: self, in: .appearance) - - coordinator.appendTransformed(keyPaths: ["resizingMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let mode = UIImageResizingMode(rawValue: rawValue) else { return nil } - return mode.displayName - }, forModel: self, in: .appearance) - - coordinator.appendTransformed(keyPaths: ["imageOrientation"], valueTransformer: { value in - guard let rawValue = value as? Int, let mode = UIImageOrientation(rawValue: rawValue) else { return nil } - return mode.displayName - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "renderingMode", into: UIImageRenderingMode.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "resizingMode", into: UIImageResizingMode.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "imageOrientation", into: UIImageOrientation.self, forModel: self, group: .appearance) coordinator.appendDynamic(keyPaths: [ "scale", "size", "capInsets", "alignmentRectInsets" diff --git a/Pod/Classes/Peekable/UILabel+Peekable.swift b/Pod/Classes/Peekable/UILabel+Peekable.swift index d98b626..e9384f6 100644 --- a/Pod/Classes/Peekable/UILabel+Peekable.swift +++ b/Pod/Classes/Peekable/UILabel+Peekable.swift @@ -25,22 +25,16 @@ import UIKit extension UILabel { open override func preparePeek(with coordinator: Coordinator) { - coordinator.appendTransformed(keyPaths: ["lineBreakMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let lineBreakMode = NSLineBreakMode(rawValue: rawValue) else { return nil } - return lineBreakMode.displayName - }, forModel: self, in: .behaviour) - - coordinator.appendDynamic(keyPaths: ["adjustsFontSizeToFitWidth"], forModel: self, in: .behaviour) - coordinator.appendDynamic(keyPaths: [ "text", "attributedText", - ], forModel: self, in: .typography) + ], forModel: self, in: .typography) + + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "lineBreakMode", into: NSLineBreakMode.self, forModel: self, group: .behaviour) + .appendEnum(keyPath: "textAlignment", into: NSTextAlignment.self, forModel: self, group: .typography) - coordinator.appendTransformed(keyPaths: ["textAlignment"], valueTransformer: { value in - guard let rawValue = value as? Int, let textAlignment = NSTextAlignment(rawValue: rawValue) else { return nil } - return textAlignment.displayName - }, forModel: self, in: .typography) + coordinator.appendDynamic(keyPaths: ["adjustsFontSizeToFitWidth"], forModel: self, in: .behaviour) coordinator.appendDynamic(keyPaths: [ "textColor", diff --git a/Pod/Classes/Peekable/UINavigationBar+Peekable.swift b/Pod/Classes/Peekable/UINavigationBar+Peekable.swift index c5ab5a2..22f86bc 100644 --- a/Pod/Classes/Peekable/UINavigationBar+Peekable.swift +++ b/Pod/Classes/Peekable/UINavigationBar+Peekable.swift @@ -29,10 +29,8 @@ extension UINavigationBar { "barTintColor", "translucent", "shadowImage" ], forModel: self, in: .appearance) - coordinator.appendTransformed(keyPaths: ["barStyle"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UIBarStyle(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "barStyle", into: UIBarStyle.self, forModel: self, group: .appearance) super.preparePeek(with: coordinator) } diff --git a/Pod/Classes/Peekable/UIPicker+Peekable.swift b/Pod/Classes/Peekable/UIPicker+Peekable.swift index 7ce4d51..7e239ff 100644 --- a/Pod/Classes/Peekable/UIPicker+Peekable.swift +++ b/Pod/Classes/Peekable/UIPicker+Peekable.swift @@ -39,10 +39,8 @@ extension UIDatePicker { "date", "minimumDate", "maximumDate", "countDownDuration", "minuteInterval" ], forModel: self, in: .appearance) - coordinator.appendTransformed(keyPaths: ["datePickerMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let mode = UIDatePickerMode(rawValue: rawValue) else { return nil } - return mode.displayName - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "datePickerMode", into: UIDatePickerMode.self, forModel: self, group: .appearance) super.preparePeek(with: coordinator) } diff --git a/Pod/Classes/Peekable/UIScrollView+Peekable.swift b/Pod/Classes/Peekable/UIScrollView+Peekable.swift index af29587..2a2c71a 100644 --- a/Pod/Classes/Peekable/UIScrollView+Peekable.swift +++ b/Pod/Classes/Peekable/UIScrollView+Peekable.swift @@ -35,20 +35,14 @@ extension UIScrollView { "alwaysBounceVertical", ], forModel: self, in: .appearance) - coordinator.appendTransformed(keyPaths: ["indicatorStyle"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UIScrollViewIndicatorStyle(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "indicatorStyle", into: UIScrollViewIndicatorStyle.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "keyboardDismissMode", into: UIScrollViewKeyboardDismissMode.self, forModel: self, group: .behaviour) coordinator.appendDynamic(keyPaths: [ "contentOffset", "contentSize", "contentInset", "scrollIndicatorInsets" ], forModel: self, in: .layout) - - coordinator.appendTransformed(keyPaths: ["keyboardDismissMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let mode = UIScrollViewKeyboardDismissMode(rawValue: rawValue) else { return nil } - return mode.displayName - }, forModel: self, in: .behaviour) - + coordinator.appendDynamic(keyPaths: [ "showsHorizontalScrollIndicator", "showsVerticalScrollIndicator", diff --git a/Pod/Classes/Peekable/UIStackView+Peekable.swift b/Pod/Classes/Peekable/UIStackView+Peekable.swift index 57f1e0d..a35aedb 100644 --- a/Pod/Classes/Peekable/UIStackView+Peekable.swift +++ b/Pod/Classes/Peekable/UIStackView+Peekable.swift @@ -10,20 +10,10 @@ import UIKit extension UIStackView { open override func preparePeek(with coordinator: Coordinator) { - coordinator.appendTransformed(keyPaths: ["axis"], valueTransformer: { value in - guard let rawValue = value as? Int, let axis = UILayoutConstraintAxis(rawValue: rawValue) else { return nil } - return axis.displayName - }, forModel: self, in: .appearance) - - coordinator.appendTransformed(keyPaths: ["distribution"], valueTransformer: { value in - guard let rawValue = value as? Int, let distribution = UIStackViewDistribution(rawValue: rawValue) else { return nil } - return distribution - }, forModel: self, in: .appearance) - - coordinator.appendTransformed(keyPaths: ["alignment"], valueTransformer: { value in - guard let rawValue = value as? Int, let alignment = UIStackViewAlignment(rawValue: rawValue) else { return nil } - return alignment - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "axis", into: UILayoutConstraintAxis.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "distribution", into: UIStackViewDistribution.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "alignment", into: UIStackViewAlignment.self, forModel: self, group: .appearance) coordinator.appendDynamic(keyPaths: [ "spacing" diff --git a/Pod/Classes/Peekable/UITextField+Peekable.swift b/Pod/Classes/Peekable/UITextField+Peekable.swift index 2fa9b7a..e7584ea 100644 --- a/Pod/Classes/Peekable/UITextField+Peekable.swift +++ b/Pod/Classes/Peekable/UITextField+Peekable.swift @@ -25,25 +25,10 @@ import UIKit extension UITextField { open override func preparePeek(with coordinator: Coordinator) { - coordinator.appendTransformed(keyPaths: ["borderStyle"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UITextBorderStyle(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) - - coordinator.appendTransformed(keyPaths: ["clearButtonMode", "leftViewMode", "rightViewMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UITextFieldViewMode(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) - coordinator.appendDynamic(keyPaths: [ "leftView", "rightView" ], forModel: self, in: .views) - coordinator.appendTransformed(keyPaths: ["rightViewMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UITextFieldViewMode(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) - coordinator.appendDynamic(keyPaths: [ "allowsEditingTextAttributes", "clearsOnBeginEditing", @@ -61,10 +46,12 @@ extension UITextField { "attributedPlaceholder", ], forModel: self, in: .typography) - coordinator.appendTransformed(keyPaths: ["textAlignment"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = NSTextAlignment(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .typography) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "indicatorStyle", into: UIScrollViewIndicatorStyle.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "indicatorStyle", into: UIScrollViewIndicatorStyle.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "borderStyle", into: UITextBorderStyle.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "clearButtonMode", "leftViewMode", "rightViewMode", into: UITextFieldViewMode.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "textAlignment", into: NSTextAlignment.self, forModel: self, group: .typography) coordinator.appendDynamic(keyPaths: [ "textColor", diff --git a/Pod/Classes/Peekable/UITextView+Peekable.swift b/Pod/Classes/Peekable/UITextView+Peekable.swift index 9e9b025..a616620 100644 --- a/Pod/Classes/Peekable/UITextView+Peekable.swift +++ b/Pod/Classes/Peekable/UITextView+Peekable.swift @@ -38,10 +38,8 @@ extension UITextView { "attributedText", ], forModel: self, in: .typography) - coordinator.appendTransformed(keyPaths: ["textAlignment"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = NSTextAlignment(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .typography) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "textAlignment", into: NSTextAlignment.self, forModel: self, group: .typography) coordinator.appendDynamic(keyPaths: [ "textColor", diff --git a/Pod/Classes/Peekable/UIToolbar+Peekable.swift b/Pod/Classes/Peekable/UIToolbar+Peekable.swift index 9c2ce6a..c4bbeee 100644 --- a/Pod/Classes/Peekable/UIToolbar+Peekable.swift +++ b/Pod/Classes/Peekable/UIToolbar+Peekable.swift @@ -29,10 +29,8 @@ extension UIToolbar { "barTintColor", "translucent" ], forModel: self, in: .appearance) - coordinator.appendTransformed(keyPaths: ["barStyle"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UIBarStyle(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "barStyle", into: UIBarStyle.self, forModel: self, group: .appearance) super.preparePeek(with: coordinator) } diff --git a/Pod/Classes/Peekable/UIView+Peekable.swift b/Pod/Classes/Peekable/UIView+Peekable.swift index bbd46e3..baf07cb 100644 --- a/Pod/Classes/Peekable/UIView+Peekable.swift +++ b/Pod/Classes/Peekable/UIView+Peekable.swift @@ -109,11 +109,10 @@ extension UIView { ], forModel: self, in: .general) coordinator.appendDynamic(keyPaths: ["tintColor"], forModel: self, in: .appearance) - - coordinator.appendTransformed(keyPaths: ["tintAdjustmentMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let adjustmodeMode = UIViewTintAdjustmentMode(rawValue: rawValue) else { return nil } - return adjustmodeMode.displayName - }, forModel: self, in: .appearance) + + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "tintAdjustmentMode", into: UIViewTintAdjustmentMode.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "contentMode", into: UIViewContentMode.self, forModel: self, group: .layout) coordinator.appendDynamic(keyPaths: [ "backgroundColor", @@ -125,11 +124,6 @@ extension UIView { "layer.masksToBounds", ], forModel: self, in: .appearance) - coordinator.appendTransformed(keyPaths: ["contentMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let contentMode = UIViewContentMode(rawValue: rawValue) else { return nil } - return contentMode.displayName - }, forModel: self, in: .layout) - coordinator.appendDynamic(keyPaths: [ "frame", "bounds", diff --git a/Pod/Classes/Peekable/UIViewController+Peekable.swift b/Pod/Classes/Peekable/UIViewController+Peekable.swift index 93a184e..47e89a9 100644 --- a/Pod/Classes/Peekable/UIViewController+Peekable.swift +++ b/Pod/Classes/Peekable/UIViewController+Peekable.swift @@ -28,25 +28,11 @@ extension UIViewController { let orientations = Images.orientationMaskImage(supportedInterfaceOrientations) coordinator.appendPreview(image: orientations, forModel: self) - coordinator.appendTransformed(keyPaths: ["modalTransitionStyle"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UIModalTransitionStyle(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) - - coordinator.appendTransformed(keyPaths: ["modalPresentationStyle"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UIModalPresentationStyle(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) - - coordinator.appendTransformed(keyPaths: ["preferredStatusBarStyle"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UIStatusBarStyle(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) - - coordinator.appendTransformed(keyPaths: ["preferredStatusBarUpdateAnimation"], valueTransformer: { value in - guard let rawValue = value as? Int, let style = UIStatusBarAnimation(rawValue: rawValue) else { return nil } - return style.displayName - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "preferredStatusBarStyle", into: UIStatusBarStyle.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "preferredStatusBarUpdateAnimation", into: UIStatusBarAnimation.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "modalTransitionStyle", into: UIModalTransitionStyle.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "modalPresentationStyle", into: UIModalPresentationStyle.self, forModel: self, group: .appearance) if self is UITableViewController { coordinator.appendDynamic(keyPathToName: [ @@ -103,21 +89,13 @@ extension UIViewController { } if self is UISplitViewController { - coordinator.appendTransformed(keyPaths: ["preferredDisplayMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let mode = UISplitViewControllerDisplayMode(rawValue: rawValue) else { return nil } - return mode.displayName - }, forModel: self, in: .appearance) - - coordinator.appendTransformed(keyPaths: ["displayMode"], valueTransformer: { value in - guard let rawValue = value as? Int, let mode = UISplitViewControllerDisplayMode(rawValue: rawValue) else { return nil } - return mode.displayName - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "preferredDisplayMode", into: UISplitViewControllerDisplayMode.self, forModel: self, group: .appearance) + .appendEnum(keyPath: "displayMode", into: UISplitViewControllerDisplayMode.self, forModel: self, group: .appearance) if #available(iOS 11.0, *) { - coordinator.appendTransformed(keyPaths: ["primaryEdge"], valueTransformer: { value in - guard let rawValue = value as? Int, let edge = UISplitViewControllerPrimaryEdge(rawValue: rawValue) else { return nil } - return edge.displayName - }, forModel: self, in: .appearance) + (coordinator as? SwiftCoordinator)? + .appendEnum(keyPath: "primaryEdge", into: UISplitViewControllerPrimaryEdge.self, forModel: self, group: .appearance) } coordinator.appendDynamic(keyPaths: [ @@ -128,24 +106,15 @@ extension UIViewController { "presentsWithGesture", ], forModel: self, in: .behaviour) - coordinator.appendTransformed(keyPaths: ["preferredPrimaryColumnWidthFraction"], valueTransformer: { value in - guard let value = value as? CGFloat else { return nil } - return value == UISplitViewControllerAutomaticDimension ? "Automatic" : "\(value)" - }, forModel: self, in: .layout) - - coordinator.appendTransformed(keyPaths: ["maximumPrimaryColumnWidth"], valueTransformer: { value in - guard let value = value as? CGFloat else { return nil } - return value == UISplitViewControllerAutomaticDimension ? "Automatic" : "\(value)" - }, forModel: self, in: .layout) - - coordinator.appendTransformed(keyPaths: ["primaryColumnWidth"], valueTransformer: { value in - guard let value = value as? CGFloat else { return nil } - return value == UISplitViewControllerAutomaticDimension ? "Automatic" : "\(value)" - }, forModel: self, in: .layout) - coordinator.appendDynamic(keyPaths: [ "displayModeButtonItem" ], forModel: self, in: .more) + + coordinator.appendDynamic(keyPaths: [ + "preferredPrimaryColumnWidthFraction", + "maximumPrimaryColumnWidth", + "primaryColumnWidth" + ], forModel: self, in: .layout) } if let parent = parent { From 932214dbb675c3df6d572099d24980bc3950f132 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Wed, 28 Mar 2018 16:46:16 +0100 Subject: [PATCH 28/37] Enums have better support and are now automatically used to populate alternateValues during reporting This is just a small start on a larger refactor to replace complex logic in PeekInspectorViewController --- .../PeekInspectorViewController.swift | 66 ++++++++++++------- Pod/Classes/Coordinator/Attribute.swift | 44 +++++++++++++ Pod/Classes/Coordinator/Coordinator.swift | 18 +++-- Pod/Classes/Helpers/Enum+Cases.swift | 4 +- 4 files changed, 97 insertions(+), 35 deletions(-) diff --git a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift index 109d480..6590488 100644 --- a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift @@ -557,34 +557,54 @@ extension PeekInspectorViewController { } controller.addAction(UIAlertAction(title: "Suggest Alternative", style: .default, handler: { [weak self] _ -> Void in - let alert = UIAlertController(title: "\(attribute.title)", message: "What is the expected value?", preferredStyle: .alert) + let alert: UIAlertController - alert.addTextField { field in - if attribute.valueTransformer == nil, - let value = attribute.value as? NSNumber, - !value.isBool() { - field.keyboardType = .decimalPad - } else { - field.spellCheckingType = .yes - field.autocorrectionType = .yes - field.autocapitalizationType = .sentences + if !attribute.alternateValues.isEmpty { + alert = UIAlertController(title: nil, message: nil, preferredStyle: .actionSheet) + + attribute.alternateValues.map { + UIAlertAction(title: $0, style: .default) { action in + let note = action.title ?? "" + let item = Report.Item(keyPath: attribute.keyPath, displayTitle: attribute.title, displayValue: cell?.detailTextLabel?.text ?? "", reportersNote: note ?? "") + self?.reportingIndexPaths[indexPath] = item + self?.invalidateSendButton() + self?.indicateSection(for: indexPath) + } + }.forEach { alert.addAction($0) } + + alert.addAction(UIAlertAction(title: "Cancel", style: .cancel) { _ in + tableView.deselectRow(at: indexPath, animated: true) + }) + } else { + alert = UIAlertController(title: "\(attribute.title)", message: "What is the expected value?", preferredStyle: .alert) + + alert.addTextField { field in + if attribute.valueTransformer == nil, + let value = attribute.value as? NSNumber, + !value.isBool() { + field.keyboardType = .decimalPad + } else { + field.spellCheckingType = .yes + field.autocorrectionType = .yes + field.autocapitalizationType = .sentences + } + + field.keyboardAppearance = .dark } - field.keyboardAppearance = .dark + alert.addAction(UIAlertAction(title: "Cancel", style: .cancel) { _ in + tableView.deselectRow(at: indexPath, animated: true) + }) + + alert.addAction(UIAlertAction(title: "OK", style: .default) { _ in + let note = alert.textFields?.first?.text?.trimmingCharacters(in: .whitespacesAndNewlines) + let item = Report.Item(keyPath: attribute.keyPath, displayTitle: attribute.title, displayValue: cell?.detailTextLabel?.text ?? "", reportersNote: note ?? "") + self?.reportingIndexPaths[indexPath] = item + self?.invalidateSendButton() + self?.indicateSection(for: indexPath) + }) } - alert.addAction(UIAlertAction(title: "Cancel", style: .cancel) { _ in - tableView.deselectRow(at: indexPath, animated: true) - }) - - alert.addAction(UIAlertAction(title: "OK", style: .default) { _ in - let note = alert.textFields?.first?.text?.trimmingCharacters(in: .whitespacesAndNewlines) - let item = Report.Item(keyPath: attribute.keyPath, displayTitle: attribute.title, displayValue: cell?.detailTextLabel?.text ?? "", reportersNote: note ?? "") - self?.reportingIndexPaths[indexPath] = item - self?.invalidateSendButton() - self?.indicateSection(for: indexPath) - }) - self?.topViewController().present(alert, animated: true, completion: nil) })) diff --git a/Pod/Classes/Coordinator/Attribute.swift b/Pod/Classes/Coordinator/Attribute.swift index f099ab7..4849bca 100644 --- a/Pod/Classes/Coordinator/Attribute.swift +++ b/Pod/Classes/Coordinator/Attribute.swift @@ -14,6 +14,7 @@ public typealias AttributeValueTransformer = (Any?) -> Any? var title: String { get } var detail: String? { get } var value: Any? { get } + var alternateValues: [String] { get } var valueTransformer: AttributeValueTransformer? { get } } @@ -23,6 +24,7 @@ internal final class PreviewAttribute: Attribute { internal let title: String internal let detail: String? = nil internal let value: Any? + var alternateValues: [String] { return [] } internal let valueTransformer: AttributeValueTransformer? internal var image: UIImage? { @@ -44,6 +46,7 @@ internal final class DynamicAttribute: Attribute, CustomStringConvertible, Equat internal let title: String internal let detail: String? internal var previewImage: UIImage? = nil + var alternateValues: [String] { return [] } internal private(set) weak var model: Peekable? internal let valueTransformer: AttributeValueTransformer? @@ -77,6 +80,7 @@ internal final class StaticAttribute: Attribute, CustomStringConvertible, Equata internal let detail: String? internal let value: Any? internal let valueTransformer: AttributeValueTransformer? + var alternateValues: [String] { return [] } internal var previewImage: UIImage? = nil init(keyPath: String, title: String, detail: String? = nil, value: Any?, valueTransformer: AttributeValueTransformer? = nil) { @@ -96,3 +100,43 @@ internal final class StaticAttribute: Attribute, CustomStringConvertible, Equata } } + +internal final class EnumAttribute: Attribute, CustomStringConvertible, Equatable where T: RawRepresentable & PeekDescribing & Hashable, T.RawValue == Int { + + internal let keyPath: String + internal let title: String + internal let detail: String? + internal private(set) weak var model: Peekable? + + internal let valueTransformer: AttributeValueTransformer? + + internal var alternateValues: [String] { + return T.all.map { $0.displayName } + } + + internal var value: Any? { + guard let value = model?.value(forKeyPath: keyPath) as? Int, + let enumRep = T(rawValue: value) as? PeekDescribing else { + fatalError() + } + + return enumRep.displayName + } + + internal init(title: String?, detail: String? = nil, keyPath: String, model: Peekable, valueTransformer: AttributeValueTransformer? = nil) { + self.title = title ?? String.capitalized(keyPath) + self.detail = detail + self.keyPath = keyPath + self.model = model + self.valueTransformer = valueTransformer + } + + internal var description: String { + return "\(title) – \(keyPath) | \(value == nil ? "nil" : value!)" + } + + static func ==(lhs: EnumAttribute, rhs: EnumAttribute) -> Bool { + return lhs.model === rhs.model && lhs.keyPath == rhs.keyPath + } + +} diff --git a/Pod/Classes/Coordinator/Coordinator.swift b/Pod/Classes/Coordinator/Coordinator.swift index 221d754..e8131b8 100644 --- a/Pod/Classes/Coordinator/Coordinator.swift +++ b/Pod/Classes/Coordinator/Coordinator.swift @@ -22,7 +22,7 @@ import Foundation internal protocol SwiftCoordinator: Coordinator { @discardableResult - func appendEnum(keyPath: String..., into: T.Type, forModel model: Peekable, group: Group) -> Self where T: RawRepresentable, T.RawValue == Int + func appendEnum(keyPath: String..., into: T.Type, forModel model: Peekable, group: Group) -> Self where T: RawRepresentable & PeekDescribing & Hashable, T.RawValue == Int } internal final class PeekCoordinator: SwiftCoordinator { @@ -80,15 +80,13 @@ internal final class PeekCoordinator: SwiftCoordinator { return self } - internal func appendEnum(keyPath: String..., into: T.Type, forModel model: Peekable, group: Group) -> Self where T: RawRepresentable, T.RawValue == Int { - appendTransformed(keyPaths: keyPath, valueTransformer: { value in - guard let rawValue = value as? Int, - let enumRep = T(rawValue: rawValue) as? PeekDescribing else { - fatalError() - } - - return enumRep.displayName - }, forModel: model, in: group) + internal func appendEnum(keyPath: String..., into: T.Type, forModel model: Peekable, group: Group) -> Self where T: RawRepresentable & PeekDescribing & Hashable, T.RawValue == Int { + let peekGroup = groupsMapping[group] ?? group.peekGroup() + groupsMapping[group] = peekGroup + + peekGroup.attributes.insert(contentsOf: keyPath.map { + EnumAttribute(title: String.capitalized($0), detail: nil, keyPath: $0, model: model, valueTransformer: nil) + }, at: peekGroup.attributes.count) return self } diff --git a/Pod/Classes/Helpers/Enum+Cases.swift b/Pod/Classes/Helpers/Enum+Cases.swift index 9a6a70b..59c1bfb 100644 --- a/Pod/Classes/Helpers/Enum+Cases.swift +++ b/Pod/Classes/Helpers/Enum+Cases.swift @@ -7,14 +7,14 @@ import Foundation -extension RawRepresentable where RawValue == Int { +extension RawRepresentable where RawValue == Int, Self: Hashable { private static func cases() -> AnySequence { return AnySequence { () -> AnyIterator in var raw = 0 return AnyIterator { let current: Self = withUnsafePointer(to: &raw) { $0.withMemoryRebound(to: self, capacity: 1) { $0.pointee } } - guard current.rawValue.hashValue == raw else { + guard current.hashValue == raw else { return nil } raw += 1 From 9bc8482c5c365f13f46f8ea1fa7155b01be0eea3 Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Sat, 31 Mar 2018 23:36:30 +0200 Subject: [PATCH 29/37] Light optimization --- Pod/Classes/Peek.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pod/Classes/Peek.swift b/Pod/Classes/Peek.swift index 753b5b3..bedaf45 100644 --- a/Pod/Classes/Peek.swift +++ b/Pod/Classes/Peek.swift @@ -136,8 +136,8 @@ public final class Peek: NSObject { private func handleActivation() { if let nav = window?.rootViewController?.presentedViewController as? UINavigationController { let inspectors = nav.viewControllers.flatMap { $0 as? PeekInspectorViewController } - - if (inspectors.filter { $0.tableView.isEditing }).count == 0 { + + if inspectors.first(where: { $0.tableView.isEditing }) == nil { nav.dismiss(animated: true, completion: nil) } From bdd0603cf5e89ea0bc711eddf6c0da9db0bb85ac Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Sat, 31 Mar 2018 23:47:57 +0200 Subject: [PATCH 30/37] Fixing branch name in CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a87aae6..50b6154 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ ## Pull Requests -Pull requests must always use the upcoming release branch as its base. This is currently `feature/5.1.0`. No requests made to `master` will be allowed. +Pull requests must always use the upcoming release branch as its base. This is currently `release/5.1.0`. No requests made to `master` will be allowed. All changes, no matter how trivial, must be done via pull request. Commits should never be made directly on the master branch. @@ -34,4 +34,4 @@ The project has already been configured to use SwiftLint, so ensure you have thi ## README -Where applicable, you should ensure the README is also maintained. A typical example is where a new feature is introduced that warrants some explanation, or perhaps an update to the changelog. \ No newline at end of file +Where applicable, you should ensure the README is also maintained. A typical example is where a new feature is introduced that warrants some explanation, or perhaps an update to the changelog. From d855b0f54775b4f795593194c6a6ec52911cdcbc Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Sat, 31 Mar 2018 23:52:56 +0200 Subject: [PATCH 31/37] Fixing branch name in pull_request_template.md --- pull_request_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pull_request_template.md b/pull_request_template.md index 48a53db..4d499b6 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -2,7 +2,7 @@ Make sure you're currently pointing to the next release base branch. For example: -`branch: feature/5.1.0` +`branch: release/5.1.0` If you're unsure, check the latest tag, it'll be a semantic version higher than that. From 5d19dfa35037e17ddb212f4639d88af7f0ac11e0 Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Sun, 1 Apr 2018 15:47:06 +0200 Subject: [PATCH 32/37] Refactors switch statement in PeekInspectorViewController --- .../PeekInspectorViewController.swift | 49 +++++++------------ 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift index 109d480..995da9c 100644 --- a/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekInspectorViewController.swift @@ -221,39 +221,26 @@ internal final class PeekInspectorViewController: PeekSectionedViewController, U var editingAccessoryView: UIView? switch value { - case is UIViewController: - if let value = value as? UIViewController { - text = String(describing: value.classForCoder) - } - case is [AnyObject]: - if let value = value as? [AnyObject] { - text = "\(value.count)" - } - case is UIFont: - if let value = value as? UIFont { - text = "\(value.fontName), \(value.pointSize)" - } + case let value as UIViewController: + text = String(describing: value.classForCoder) + case let value as [AnyObject]: + text = "\(value.count)" + case let value as UIFont: + text = "\(value.fontName), \(value.pointSize)" case is UIImageView, is UILabel, is UIBarButtonItem, /*is Segment,*/ is UIImage: text = nil - case is NSAttributedString: - if let value = value as? NSAttributedString { - text = value.string - } - case is NSNumber: - if let value = value as? NSNumber { - text = NumberTransformer().transformedValue(value) as? String - accessoryView = value.isBool() ? BoolAccessoryView(value: value.boolValue, theme: peek.options.theme) : nil - } - case is UIColor: - if let value = value as? UIColor { - text = ColorTransformer().transformedValue(value) as? String - accessoryView = ColorAccessoryView(color: value) - } - case is NSValue: - if let value = value as? NSValue { - text = ValueTransformer().transformedValue(value) as? String - } - default: text = "\(value)" + case let value as NSAttributedString: + text = value.string + case let value as NSNumber: + text = NumberTransformer().transformedValue(value) as? String + accessoryView = value.isBool() ? BoolAccessoryView(value: value.boolValue, theme: peek.options.theme) : nil + case let value as UIColor: + text = ColorTransformer().transformedValue(value) as? String + accessoryView = ColorAccessoryView(color: value) + case let value as NSValue: + text = ValueTransformer().transformedValue(value) as? String + default: + text = "\(value)" } if CFGetTypeID(value) == CGColor.typeID { From c4e660395aae2ea19a541cba629c97a60bb3eb55 Mon Sep 17 00:00:00 2001 From: Valeriy Van Date: Mon, 2 Apr 2018 23:32:07 +0200 Subject: [PATCH 33/37] Uses more succinct force unwrap instead of guard with fatalError in else. Failing force unwrap means exact fatalError and is more succinct. --- .../Controllers & Views/PeekSectionedViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift b/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift index 48245f2..59c736e 100644 --- a/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift +++ b/Pod/Classes/Controllers & Views/PeekSectionedViewController.swift @@ -44,7 +44,7 @@ internal class PeekSectionedViewController: UIViewController, UITableViewDelegat } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { - guard let cell = tableView.dequeueReusableCell(withIdentifier: "InspectorCell", for: indexPath) as? PeekInspectorCell else { fatalError() } + let cell = tableView.dequeueReusableCell(withIdentifier: "InspectorCell", for: indexPath) as! PeekInspectorCell cell.detailTextLabel?.font = UIFont.preferredFont(forTextStyle: .body) cell.detailTextLabel?.textColor = peek.options.theme.primaryTextColor @@ -62,7 +62,7 @@ internal class PeekSectionedViewController: UIViewController, UITableViewDelegat } func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? { - guard let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: "CollapsibleSectionHeaderView") as? CollapsibleSectionHeaderView else { fatalError() } + let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: "CollapsibleSectionHeaderView") as! CollapsibleSectionHeaderView header.contentView.backgroundColor = peek.options.theme.backgroundColor header.label.text = sectionTitle(for: section) header.label.font = UIFont.systemFont(ofSize: 15, weight: .black) From cbaf0e34627a996df66a2a90c8bcc2274bf54487 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Tue, 3 Apr 2018 15:30:18 +0100 Subject: [PATCH 34/37] Updated the changelog in preparation for a release: Peek now supports a Light theme Peek now recommends alternate values for enum types Peek now provides a Static Library variant via Cocoapods: [!] Unknown command: `PeekStatic` Did you mean: install? Usage: $ pod COMMAND CocoaPods, the Cocoa library package manager. Commands: + cache Manipulate the CocoaPods cache + deintegrate Deintegrate CocoaPods from your project + env Display pod environment + init Generate a Podfile for the current directory + install Install project dependencies according to versions from a Podfile.lock + ipc Inter-process communication + lib Develop pods + list List pods + outdated Show outdated project dependencies + plugins Show available CocoaPods plugins + repo Manage spec-repositories + search Search for pods + setup Setup the CocoaPods environment + spec Manage pod specs + trunk Interact with the CocoaPods API (e.g. publishing new specs) + try Try a Pod! + update Update outdated project dependencies and create new Podfile.lock Options: --silent Show nothing --version Show the version of the tool --verbose Show more debugging information --no-ansi Show output without ANSI codes --help Show help banner of specified command Peek now supports Carthage --- CHANGELOG.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a9dc15..3562ac0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,23 @@ # Changelog +5.1.0 + +**[Added]** + +Peek now supports a Light theme +Peek now recommends alternate values for enum types +Peek now provides a Static Library variant via Cocoapods: `pod 'PeekStatic'` +Peek now supports Carthage + +**[Removed]** + +Classes and functions that should never have been public have been removed + +**[Fixed]** + +Fixing branch name in CONTRIBUTING.md and pull_request_template.md +Lots of small refactors and optimizations thanks to @valeriyvan + 5.0 (Major Release) - @@ -48,4 +66,4 @@ Please use the Swift 4 version instead. * Absolute layout overlay * Multiple inspectors * Swift Support -* iOS 8.3 Support \ No newline at end of file +* iOS 8.3 Support From e99d81d8a9e385d4b5c64c028bcbf60314fb5b5f Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Tue, 3 Apr 2018 15:31:54 +0100 Subject: [PATCH 35/37] Updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3562ac0..321e636 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ 5.1.0 +Note: This will be the last release targetting Swift 4.0 + **[Added]** Peek now supports a Light theme From 8b7f030740dede81bc130fd3cd86a352be7d9752 Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Tue, 3 Apr 2018 15:33:07 +0100 Subject: [PATCH 36/37] Updated PeekStatic podspec --- Example/Peek.xcodeproj/project.pbxproj | 4 ++-- Peek-Static.podspec => PeekStatic.podspec | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename Peek-Static.podspec => PeekStatic.podspec (94%) diff --git a/Example/Peek.xcodeproj/project.pbxproj b/Example/Peek.xcodeproj/project.pbxproj index 163cf24..f8bc33f 100644 --- a/Example/Peek.xcodeproj/project.pbxproj +++ b/Example/Peek.xcodeproj/project.pbxproj @@ -32,7 +32,7 @@ 542668D92054064500F6B016 /* TextView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextView.swift; sourceTree = ""; }; 54533DEB1C66D1DB00527626 /* PhotosUI.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PhotosUI.framework; path = System/Library/Frameworks/PhotosUI.framework; sourceTree = SDKROOT; }; 54533DED1C66D1DB00527626 /* Photos.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Photos.framework; path = System/Library/Frameworks/Photos.framework; sourceTree = SDKROOT; }; - 5472753920695D9100F1A975 /* Peek-Static.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = "Peek-Static.podspec"; path = "../Peek-Static.podspec"; sourceTree = ""; }; + 5472753920695D9100F1A975 /* PeekStatic.podspec */ = {isa = PBXFileReference; lastKnownFileType = text; name = PeekStatic.podspec; path = ../PeekStatic.podspec; sourceTree = ""; }; 5472753A20695E7300F1A975 /* CONTRIBUTING.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CONTRIBUTING.md; path = ../CONTRIBUTING.md; sourceTree = ""; }; 5472753B20695E7300F1A975 /* CHANGELOG.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CHANGELOG.md; path = ../CHANGELOG.md; sourceTree = ""; }; 5472753C20695E7300F1A975 /* CODE_OF_CONDUCT.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; name = CODE_OF_CONDUCT.md; path = ../CODE_OF_CONDUCT.md; sourceTree = ""; }; @@ -101,7 +101,7 @@ isa = PBXGroup; children = ( 2294D63777F3A53CCD6C4977 /* Peek.podspec */, - 5472753920695D9100F1A975 /* Peek-Static.podspec */, + 5472753920695D9100F1A975 /* PeekStatic.podspec */, 97CF41E9D825DEAA39984224 /* LICENSE */, 25235662A734B5CC098E5A5F /* README.md */, 5472753B20695E7300F1A975 /* CHANGELOG.md */, diff --git a/Peek-Static.podspec b/PeekStatic.podspec similarity index 94% rename from Peek-Static.podspec rename to PeekStatic.podspec index f42dff2..debacd4 100644 --- a/Peek-Static.podspec +++ b/PeekStatic.podspec @@ -1,5 +1,5 @@ Pod::Spec.new do |s| - s.name = "Peek-Static" + s.name = "PeekStatic" s.version = "5.1.0" s.summary = "All new design. Inspect your iOS application at runtime." s.homepage = "https://shaps.me/peek" From cd1d06962660c000b178f99c09cbce93fda6829e Mon Sep 17 00:00:00 2001 From: Shaps Benkau Date: Tue, 3 Apr 2018 15:37:38 +0100 Subject: [PATCH 37/37] Minor updates to README and LICENSE --- LICENSE | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LICENSE b/LICENSE index 6adf1ca..4a2a96b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2016 Shaps Mohsenin +Copyright (c) 2016 Shaps Benkau Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 41d1b58..4f38038 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ # Peek: All new design -Peek 5.0 with an all new design and all new features. Whether you're a developer, designer or QA/tester, Peek can help you at all stages of your development process. +Peek 5 with an all new design and all new features. Whether you're a developer, designer or QA/tester, Peek can help you at all stages of your development process. [Watch the Promo][vimeo] to see it in action. @@ -59,7 +59,7 @@ The simplest way to integrate Peek into your project is to use `Cocoapods` or `C pod 'Peek', :configurations => ['Debug'] # Carthage -github "shaps80/Peek" ~> 5.0.1 +github "shaps80/Peek" ~> 5.1.0 ``` You only need 1 line of code to enable Peek in your application: