Skip to content

Commit

Permalink
Release 1.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo committed Jan 19, 2016
1 parent cf410f5 commit 57c8142
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 6 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.2.6"
s.version = "1.2.7"
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/LeoiOS/LCTabBarController"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down
6 changes: 5 additions & 1 deletion LCTabBarController/LCTabBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>


@class LCTabBar;
@class LCTabBar, LCTabBarItem;

@protocol LCTabBarDelegate <NSObject>

Expand Down Expand Up @@ -50,6 +50,10 @@

@property (nonatomic, assign) NSInteger tabBarItemCount;

@property (nonatomic, strong) LCTabBarItem *selectedItem;

@property (nonatomic, strong) NSMutableArray *tabBarItems;

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

- (void)addTabBarItem:(UITabBarItem *)item;
Expand Down
3 changes: 0 additions & 3 deletions LCTabBarController/LCTabBar.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

@interface LCTabBar ()

@property (nonatomic, strong) LCTabBarItem *selectedItem;
@property (nonatomic, strong) NSMutableArray *tabBarItems;

@end

@implementation LCTabBar
Expand Down
2 changes: 1 addition & 1 deletion LCTabBarController/LCTabBarController.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// Created by Leo on 15/12/2.
// Copyright © 2015年 Leo. All rights reserved.
//
// V 1.2.6
// V 1.2.7

#import <UIKit/UIKit.h>

Expand Down
10 changes: 10 additions & 0 deletions LCTabBarController/LCTabBarController.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import "LCTabBarController.h"
#import "LCTabBar.h"
#import "LCTabBarCONST.h"
#import "LCTabBarItem.h"

@interface LCTabBarController () <LCTabBarDelegate>

Expand Down Expand Up @@ -129,6 +130,15 @@ - (void)setViewControllers:(NSArray *)viewControllers {
}];
}

- (void)setSelectedIndex:(NSUInteger)selectedIndex {

[super setSelectedIndex:selectedIndex];

self.lcTabBar.selectedItem.selected = NO;
self.lcTabBar.selectedItem = self.lcTabBar.tabBarItems[selectedIndex];
self.lcTabBar.selectedItem.selected = YES;
}

#pragma mark - XXTabBarDelegate Method

- (void)tabBar:(LCTabBar *)tabBarView didSelectedItemFrom:(NSInteger)from to:(NSInteger)to {
Expand Down
8 changes: 8 additions & 0 deletions LCTabBarControllerDemo/HomeVC.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import "LCTabBarCONST.h"
#import "OtherVC.h"
#import "TwoVC.h"
#import "LCTabBarController.h"

@interface HomeVC ()

Expand All @@ -20,6 +21,13 @@ @implementation HomeVC
- (void)viewDidLoad {

[super viewDidLoad];

self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Go" style:UIBarButtonItemStyleDone target:self action:@selector(rightBarButtonItemClicked)];
}

- (void)rightBarButtonItemClicked {

[(LCTabBarController *)[UIApplication sharedApplication].keyWindow.rootViewController setSelectedIndex:1];
}

#pragma mark - Table view data source
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ LCTabBarController *tabBarC = [[LCTabBarController alloc] init];
## Release
### V 1.2.7
* Bug fixed: [Issues 3](https://github.com/LeoiOS/LCTabBarController/issues/3), thanks [Sesadev](https://github.com/Sesadev)'s commit!
### V 1.2.6
* Bug fixed:
Expand Down
5 changes: 5 additions & 0 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,11 @@ LCTabBarController *tabBarC = [[LCTabBarController alloc] init];
## 版本
### V 1.2.7
* 修复 Bug: [Issues 3](https://github.com/LeoiOS/LCTabBarController/issues/3), 感谢 [Sesadev](https://github.com/Sesadev) 的提交!
### V 1.2.6
* 修复 Bug:
Expand Down

0 comments on commit 57c8142

Please sign in to comment.