Skip to content

Commit

Permalink
About #15 , publish lcTabBar
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo committed Mar 20, 2017
1 parent 6bb32f1 commit 600a676
Show file tree
Hide file tree
Showing 15 changed files with 281 additions and 48 deletions.
2 changes: 1 addition & 1 deletion LCTabBarController.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "LCTabBarController"
s.version = "1.3.5"
s.version = "1.3.6"
s.summary = "A amazing and highly customized tabBarController! You could almost customize 100% of the properties! Support: http://LeoDev.me"
s.homepage = "https://github.com/iTofu/LCTabBarController"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down
49 changes: 43 additions & 6 deletions LCTabBarController/LCTabBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,27 @@
// LCTabBarControllerDemo
//
// Created by Leo on 15/12/2.
// Copyright © 2015年 Leo. All rights reserved.
// Copyright © 2015 Leo <[email protected]>
//
// Copyright (c) 2015-2017 Leo
//
// 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 <UIKit/UIKit.h>

Expand All @@ -15,6 +34,9 @@

@optional

/**
TabBar's item be selected handler
*/
- (void)tabBar:(LCTabBar *)tabBarView didSelectedItemFrom:(NSInteger)from to:(NSInteger)to;

@end
Expand All @@ -24,38 +46,53 @@
@interface LCTabBar : UIView

/**
* Tabbar item title color
* TabBar item title color
*/
@property (nonatomic, strong) UIColor *itemTitleColor;

/**
* Tabbar selected item title color
* TabBar selected item title color
*/
@property (nonatomic, strong) UIColor *selectedItemTitleColor;

/**
* Tabbar item title font
* TabBar item title font
*/
@property (nonatomic, strong) UIFont *itemTitleFont;

/**
* Tabbar item's badge title font
* TabBar item's badge title font
*/
@property (nonatomic, strong) UIFont *badgeTitleFont;

/**
* Tabbar item image ratio
* TabBar item image ratio
*/
@property (nonatomic, assign) CGFloat itemImageRatio;

/**
* TabBar's item count
*/
@property (nonatomic, assign) NSInteger tabBarItemCount;

/**
* TabBar's selected item
*/
@property (nonatomic, strong) LCTabBarItem *selectedItem;

/**
* TabBar items array
*/
@property (nonatomic, strong) NSMutableArray *tabBarItems;

/**
* TabBar delegate
*/
@property (nonatomic, weak) id<LCTabBarDelegate> delegate;

/**
* Add tabBar item
*/
- (void)addTabBarItem:(UITabBarItem *)item;

@end
21 changes: 20 additions & 1 deletion LCTabBarController/LCTabBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,27 @@
// LCTabBarControllerDemo
//
// Created by Leo on 15/12/2.
// Copyright © 2015年 Leo. All rights reserved.
// Copyright © 2015 Leo <[email protected]>
//
// Copyright (c) 2015-2017 Leo
//
// 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 "LCTabBar.h"
#import "LCTabBarItem.h"
Expand Down
29 changes: 27 additions & 2 deletions LCTabBarController/LCTabBarBadge.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,44 @@
// LCTabBarControllerDemo
//
// Created by Leo on 15/12/2.
// Copyright © 2015年 Leo. All rights reserved.
// Copyright © 2015 Leo <[email protected]>
//
// Copyright (c) 2015-2017 Leo
//
// 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 <UIKit/UIKit.h>

@interface LCTabBarBadge : UIButton

/**
* TabBar item badge value
*/
@property (nonatomic, copy) NSString *badgeValue;

/**
* TabBar's item count
*/
@property (nonatomic, assign) NSInteger tabBarItemCount;

/**
* Tabbar item's badge title font
* TabBar item's badge title font
*/
@property (nonatomic, strong) UIFont *badgeTitleFont;

Expand Down
21 changes: 20 additions & 1 deletion LCTabBarController/LCTabBarBadge.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,27 @@
// LCTabBarControllerDemo
//
// Created by Leo on 15/12/2.
// Copyright © 2015年 Leo. All rights reserved.
// Copyright © 2015 Leo <[email protected]>
//
// Copyright (c) 2015-2017 Leo
//
// 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 "LCTabBarBadge.h"
#import "LCTabBarCONST.h"
Expand Down
21 changes: 20 additions & 1 deletion LCTabBarController/LCTabBarCONST.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,27 @@
// LCTabBarControllerDemo
//
// Created by Leo on 15/12/2.
// Copyright © 2015年 Leo. All rights reserved.
// Copyright © 2015 Leo <[email protected]>
//
// Copyright (c) 2015-2017 Leo
//
// 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 <UIKit/UIKit.h>

Expand Down
42 changes: 32 additions & 10 deletions LCTabBarController/LCTabBarController.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,66 @@
// LCTabBarControllerDemo
//
// Created by Leo on 15/12/2.
// Copyright © 2015年 Leo. All rights reserved.
// Copyright © 2015 Leo <[email protected]>
//
// GitHub: https://github.com/iTofu/LCTabBarController
// Blog: http://LeoDev.me
// Copyright (c) 2015-2017 Leo
//
// V 1.3.5
// 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 <UIKit/UIKit.h>
#import "LCTabBar.h"

@interface LCTabBarController : UITabBarController

/**
* Tabbar item title color
* TabBar
*/
@property (nonatomic, strong) LCTabBar *lcTabBar;

/**
* TabBar item title color
*/
@property (nonatomic, strong) UIColor *itemTitleColor;

/**
* Tabbar selected item title color
* TabBar selected item title color
*/
@property (nonatomic, strong) UIColor *selectedItemTitleColor;

/**
* Tabbar item title font
* TabBar item title font
*/
@property (nonatomic, strong) UIFont *itemTitleFont;

/**
* Tabbar item's badge title font
* TabBar item's badge title font
*/
@property (nonatomic, strong) UIFont *badgeTitleFont;

/**
* Tabbar item image ratio
* TabBar item image ratio
*/
@property (nonatomic, assign) CGFloat itemImageRatio;

/**
* Remove origin controls, for `- popToRootViewController`
* System will display the original controls so you should call this line when you change any tabBar item, like: `- popToRootViewController`, `someViewController.tabBarItem.title = xx`, etc.
* Remove origin controls
*/
- (void)removeOriginControls;

Expand Down
24 changes: 20 additions & 4 deletions LCTabBarController/LCTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,34 @@
// LCTabBarControllerDemo
//
// Created by Leo on 15/12/2.
// Copyright © 2015年 Leo. All rights reserved.
// Copyright © 2015 Leo <[email protected]>
//
// Copyright (c) 2015-2017 Leo
//
// 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 "LCTabBarController.h"
#import "LCTabBar.h"
#import "LCTabBarCONST.h"
#import "LCTabBarItem.h"

@interface LCTabBarController () <LCTabBarDelegate>

@property (nonatomic, strong) LCTabBar *lcTabBar;

@end

@implementation LCTabBarController
Expand Down
Loading

0 comments on commit 600a676

Please sign in to comment.