Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions RDVTabBarController/RDVTabBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@
*/
@property UIEdgeInsets contentEdgeInsets;

/*
user tabbar height
*/
@property(nonatomic, assign) CGFloat height;
/**
* Sets the height of tab bar.
*/
Expand Down
1 change: 1 addition & 0 deletions RDVTabBarController/RDVTabBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ - (void)setItems:(NSArray *)items {
}

- (void)setHeight:(CGFloat)height {
_height = height;
[self setFrame:CGRectMake(CGRectGetMinX(self.frame), CGRectGetMinY(self.frame),
CGRectGetWidth(self.frame), height)];
}
Expand Down
6 changes: 3 additions & 3 deletions RDVTabBarController/RDVTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ -(void)viewDidLayoutSubviews{
if (!tabBarHeight) {
if (@available(iOS 11.0, *)) {
CGFloat safeAreaBottom = UIApplication.sharedApplication.keyWindow.safeAreaInsets.bottom;
tabBarHeight = 58.f + safeAreaBottom / 1.5f;
tabBarHeight = [self tabBar].height + safeAreaBottom / 1.5f;
} else {
tabBarHeight = 58.f;
tabBarHeight = [self tabBar].height;
}
} else if (@available(iOS 11.0, *)) {
CGFloat safeAreaBottom = UIApplication.sharedApplication.keyWindow.safeAreaInsets.bottom;
tabBarHeight = 58.f + safeAreaBottom / 1.5f;
tabBarHeight = [self tabBar].height + safeAreaBottom / 1.5f;
}

if (!self.tabBarHidden) {
Expand Down