-
-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from msaps/feature/block-tab-bar-style
Feature/block tab bar style
- Loading branch information
Showing
22 changed files
with
501 additions
and
68 deletions.
There are no files selected for viewing
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// PresetAppeareanceConfigs.swift | ||
// Tabman-Example | ||
// | ||
// Created by Merrick Sapsford on 10/03/2017. | ||
// Copyright © 2017 Merrick Sapsford. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import Tabman | ||
|
||
class PresetAppeareanceConfigs: Any { | ||
|
||
static func forStyle(_ style: TabmanBarConfig.Style, currentAppearance: TabmanBar.AppearanceConfig?) -> TabmanBar.AppearanceConfig? { | ||
let appearance = currentAppearance ?? TabmanBar.AppearanceConfig.defaultAppearance | ||
|
||
var view: UIView? = UIView() | ||
let defaultTintColor = view!.tintColor | ||
view = nil | ||
|
||
switch style { | ||
|
||
case .buttonBar, .bar: | ||
appearance.state.color = UIColor.white.withAlphaComponent(0.6) | ||
appearance.state.selectedColor = UIColor.white | ||
appearance.style.background = .blur(style: .light) | ||
appearance.indicator.color = UIColor.white | ||
|
||
case .blockTabBar: | ||
appearance.state.color = UIColor.white.withAlphaComponent(0.6) | ||
appearance.state.selectedColor = defaultTintColor | ||
appearance.style.background = .solid(color: UIColor.white.withAlphaComponent(0.3)) | ||
appearance.indicator.color = UIColor.white.withAlphaComponent(0.8) | ||
|
||
default:() | ||
} | ||
|
||
return appearance | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.