Skip to content

Commit

Permalink
added tabbar height parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
askopin committed Feb 8, 2019
1 parent 2699749 commit 30bd13f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
17 changes: 12 additions & 5 deletions CBFlashyTabBarController/Classes/CBFlashyTabBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,19 @@ open class CBFlashyTabBarController: UITabBarController {
super.viewDidAppear(animated)
}

private var barHeight: CGFloat {
var height: CGFloat = 74
if #available(iOS 11.0, *) {
height += view.safeAreaInsets.bottom
private var _barHeight: CGFloat = 74
open var barHeight: CGFloat {
get {
if #available(iOS 11.0, *) {
return _barHeight + view.safeAreaInsets.bottom
} else {
return _barHeight
}
}
set {
_barHeight = newValue
updateTabBarFrame()
}
return height
}

private func updateTabBarFrame() {
Expand Down
2 changes: 1 addition & 1 deletion CBFlashyTabBarController/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>0.81</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
Expand Down
2 changes: 1 addition & 1 deletion Example/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>0.81</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
4 changes: 4 additions & 0 deletions FlashyTabBar.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = SK7A63GXF6;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -485,6 +486,7 @@
CODE_SIGN_STYLE = Automatic;
DEVELOPMENT_TEAM = SK7A63GXF6;
INFOPLIST_FILE = Example/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -509,6 +511,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = CBFlashyTabBarController/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -537,6 +540,7 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = CBFlashyTabBarController/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down

0 comments on commit 30bd13f

Please sign in to comment.