Skip to content

Commit

Permalink
Revert appearance struct restructure
Browse files Browse the repository at this point in the history
Move appearance substructures back into TabmanBar+Appearance.swift due to compiler issue with extensions
  • Loading branch information
msaps committed May 24, 2017
1 parent a125bcc commit 9b86d34
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 177 deletions.
32 changes: 0 additions & 32 deletions Sources/Tabman.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,7 @@
D68FBA811E701D1A00B96EC0 /* TabmanCircularView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D68FBA801E701D1A00B96EC0 /* TabmanCircularView.swift */; };
D696BFAC1E92531900771F22 /* TabmanViewController+Embedding.swift in Sources */ = {isa = PBXBuildFile; fileRef = D696BFAB1E92531900771F22 /* TabmanViewController+Embedding.swift */; };
D697AB421E7C166800586DCF /* TabmanClearIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = D697AB411E7C166800586DCF /* TabmanClearIndicator.swift */; };
D6CC55911ECCF00E00A7FBB4 /* Appearance+Indicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC55901ECCF00E00A7FBB4 /* Appearance+Indicator.swift */; };
D6CC55931ECCF08700A7FBB4 /* TabmanBar+Appearance.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC55921ECCF08700A7FBB4 /* TabmanBar+Appearance.swift */; };
D6CC55951ECCF0C300A7FBB4 /* Appearance+State.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC55941ECCF0C300A7FBB4 /* Appearance+State.swift */; };
D6CC55971ECCF0F600A7FBB4 /* Appearance+Layout.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC55961ECCF0F600A7FBB4 /* Appearance+Layout.swift */; };
D6CC55991ECCF13F00A7FBB4 /* Appearance+Text.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC55981ECCF13F00A7FBB4 /* Appearance+Text.swift */; };
D6CC559B1ECCF19600A7FBB4 /* Appearance+Interaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC559A1ECCF19600A7FBB4 /* Appearance+Interaction.swift */; };
D6CC559D1ECCF19E00A7FBB4 /* Appearance+Style.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6CC559C1ECCF19E00A7FBB4 /* Appearance+Style.swift */; };
D6E5C1AF1E705CF1003FF39D /* TabmanBarConfigTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6E5C1AE1E705CF1003FF39D /* TabmanBarConfigTests.swift */; };
D6F7FF4C1EC39E050077219B /* TabmanBar+Insets.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6F7FF4B1EC39E050077219B /* TabmanBar+Insets.swift */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -134,13 +128,7 @@
D68FBA801E701D1A00B96EC0 /* TabmanCircularView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabmanCircularView.swift; sourceTree = "<group>"; };
D696BFAB1E92531900771F22 /* TabmanViewController+Embedding.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TabmanViewController+Embedding.swift"; sourceTree = "<group>"; };
D697AB411E7C166800586DCF /* TabmanClearIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabmanClearIndicator.swift; sourceTree = "<group>"; };
D6CC55901ECCF00E00A7FBB4 /* Appearance+Indicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Appearance+Indicator.swift"; sourceTree = "<group>"; };
D6CC55921ECCF08700A7FBB4 /* TabmanBar+Appearance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TabmanBar+Appearance.swift"; sourceTree = "<group>"; };
D6CC55941ECCF0C300A7FBB4 /* Appearance+State.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Appearance+State.swift"; sourceTree = "<group>"; };
D6CC55961ECCF0F600A7FBB4 /* Appearance+Layout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Appearance+Layout.swift"; sourceTree = "<group>"; };
D6CC55981ECCF13F00A7FBB4 /* Appearance+Text.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Appearance+Text.swift"; sourceTree = "<group>"; };
D6CC559A1ECCF19600A7FBB4 /* Appearance+Interaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Appearance+Interaction.swift"; sourceTree = "<group>"; };
D6CC559C1ECCF19E00A7FBB4 /* Appearance+Style.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Appearance+Style.swift"; sourceTree = "<group>"; };
D6E5C1AE1E705CF1003FF39D /* TabmanBarConfigTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TabmanBarConfigTests.swift; sourceTree = "<group>"; };
D6F7FF4B1EC39E050077219B /* TabmanBar+Insets.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "TabmanBar+Insets.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -315,7 +303,6 @@
D66FEEBB1E79662C00E7E87A /* TabmanBar+Indicator.swift */,
D66FEEBD1E79670700E7E87A /* TabmanBar+Protocols.swift */,
D6F7FF4B1EC39E050077219B /* TabmanBar+Insets.swift */,
D6CC558D1ECCEFEC00A7FBB4 /* Appearance */,
D6020AA51E5DE4A800C2B7BA /* Styles */,
D616D09F1E77EFC600C7AA32 /* Transitioning */,
D62AC1AE1E5C84CB0020B8AE /* Components */,
Expand Down Expand Up @@ -382,19 +369,6 @@
path = Views;
sourceTree = "<group>";
};
D6CC558D1ECCEFEC00A7FBB4 /* Appearance */ = {
isa = PBXGroup;
children = (
D6CC55901ECCF00E00A7FBB4 /* Appearance+Indicator.swift */,
D6CC559A1ECCF19600A7FBB4 /* Appearance+Interaction.swift */,
D6CC55961ECCF0F600A7FBB4 /* Appearance+Layout.swift */,
D6CC55941ECCF0C300A7FBB4 /* Appearance+State.swift */,
D6CC559C1ECCF19E00A7FBB4 /* Appearance+Style.swift */,
D6CC55981ECCF13F00A7FBB4 /* Appearance+Text.swift */,
);
path = Appearance;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
Expand Down Expand Up @@ -546,11 +520,9 @@
D62AC11C1E573AA00020B8AE /* TabmanBar.swift in Sources */,
D696BFAC1E92531900771F22 /* TabmanViewController+Embedding.swift in Sources */,
D6CC55931ECCF08700A7FBB4 /* TabmanBar+Appearance.swift in Sources */,
D6CC55951ECCF0C300A7FBB4 /* Appearance+State.swift in Sources */,
D66F583C1EC0F66000418B40 /* TabmanButtonBar.swift in Sources */,
D616D0B71E77FF7600C7AA32 /* TabmanItemMaskTransition.swift in Sources */,
D6020AA71E5DE4A800C2B7BA /* TabmanScrollingButtonBar.swift in Sources */,
D6CC55971ECCF0F600A7FBB4 /* Appearance+Layout.swift in Sources */,
D616D0BD1E783E6400C7AA32 /* ImageUtils.swift in Sources */,
D62AC1A91E5C54570020B8AE /* TabmanViewUtils.swift in Sources */,
D62AC1201E573FD20020B8AE /* TabmanBarItem.swift in Sources */,
Expand All @@ -574,7 +546,6 @@
D697AB421E7C166800586DCF /* TabmanClearIndicator.swift in Sources */,
D62AC1AB1E5C55290020B8AE /* TabmanScrollView.swift in Sources */,
D66FEEF81E7C024E00E7E87A /* TabmanChevronView.swift in Sources */,
D6CC55911ECCF00E00A7FBB4 /* Appearance+Indicator.swift in Sources */,
D616D0AE1E77FA9300C7AA32 /* TabmanStaticBarIndicatorTransition.swift in Sources */,
D616D0B11E77FCDA00C7AA32 /* TabmanItemTransition.swift in Sources */,
D616D06A1E72C1FC00C7AA32 /* TabmanBlockIndicator.swift in Sources */,
Expand All @@ -583,10 +554,7 @@
D66FEEF61E7BFF8E00E7E87A /* TabmanChevronIndicator.swift in Sources */,
D670521D1E856664003348BD /* TabmanFixedButtonBar.swift in Sources */,
D616D0601E719D3B00C7AA32 /* TabmanBlockTabBar.swift in Sources */,
D6CC55991ECCF13F00A7FBB4 /* Appearance+Text.swift in Sources */,
D62AC0F51E5733FE0020B8AE /* TabmanViewController.swift in Sources */,
D6CC559B1ECCF19600A7FBB4 /* Appearance+Interaction.swift in Sources */,
D6CC559D1ECCF19E00A7FBB4 /* Appearance+Style.swift in Sources */,
D616D06B1E72C1FC00C7AA32 /* TabmanDotIndicator.swift in Sources */,
D6822CDE1EAD2A9500E246AD /* TabmanViewController+Insetting.swift in Sources */,
);
Expand Down
31 changes: 0 additions & 31 deletions Sources/Tabman/TabmanBar/Appearance/Appearance+Indicator.swift

This file was deleted.

18 changes: 0 additions & 18 deletions Sources/Tabman/TabmanBar/Appearance/Appearance+Interaction.swift

This file was deleted.

36 changes: 0 additions & 36 deletions Sources/Tabman/TabmanBar/Appearance/Appearance+Layout.swift

This file was deleted.

20 changes: 0 additions & 20 deletions Sources/Tabman/TabmanBar/Appearance/Appearance+State.swift

This file was deleted.

22 changes: 0 additions & 22 deletions Sources/Tabman/TabmanBar/Appearance/Appearance+Style.swift

This file was deleted.

18 changes: 0 additions & 18 deletions Sources/Tabman/TabmanBar/Appearance/Appearance+Text.swift

This file was deleted.

67 changes: 67 additions & 0 deletions Sources/Tabman/TabmanBar/TabmanBar+Appearance.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,73 @@ public extension TabmanBar {
/// Appearance configuration for a TabmanBar.
public class Appearance: Any {

public struct Indicator {
/// The preferred style to use for the indicator.
/// This is optionally conformed to by the bar.
public var preferredStyle: TabmanIndicator.Style?
/// The color of the bar indicator.
public var color: UIColor?
/// The weight (thickness) of the bar indicator if using a line indicator.
public var lineWeight: TabmanIndicator.LineWeight?
/// Whether the indicator transiton is progressive.
public var isProgressive: Bool?
/// Whether the indicator bounces at the end of page ranges.
public var bounces: Bool?
/// Whether the indicator compresses at the end of page ranges (Unavailable if bounces enabled).
public var compresses: Bool?
/// Whether to use rounded corners on line indicators.
public var useRoundedCorners: Bool?
}

public struct Interaction {
/// Whether user scroll is enabled on a scrolling button bar.
public var isScrollEnabled: Bool?
}

public struct Layout {

/// The distribution of items within a TabmanBar.
///
/// - leftAligned: Items will be laid out from the left of the bar.
/// - centered: Items will be laid out from the center of the bar.
public enum ItemDistribution {
case leftAligned
case centered
}

/// The spacing between items in the bar.
public var interItemSpacing: CGFloat?
/// The spacing at the edge of the items in the bar.
public var edgeInset: CGFloat?
/// The height for the bar.
public var height: TabmanBar.Height?
/// The vertical padding between the item and the bar bounds.
public var itemVerticalPadding: CGFloat?
/// How items in the bar should be distributed.
public var itemDistribution: ItemDistribution?
}

public struct State {
/// The color to use for selected items in the bar (text/images etc.).
public var selectedColor: UIColor?
/// The text color to use for unselected items in the bar (text/images etc.).
public var color: UIColor?
}

public struct Style {
/// The background style for the bar.
public var background: TabmanBarBackgroundView.BackgroundStyle?
/// Whether to show a fade on the items at the bounds edge of a scrolling button bar.
public var showEdgeFade: Bool?
/// Color of the separator at the bottom of the bar.
public var bottomSeparatorColor: UIColor?
}

public struct Text {
/// The font to use for text labels in the bar.
public var font: UIFont?
}

// MARK: Properties

/// The indicator configuration.
Expand Down

0 comments on commit 9b86d34

Please sign in to comment.