├── ScreenShot.png
├── ZFTabBar
├── ZFTabBar
│ ├── Images.xcassets
│ │ ├── quanzi.imageset
│ │ │ ├── .svn
│ │ │ │ ├── prop-base
│ │ │ │ │ ├── quanzi@2x.png.svn-base
│ │ │ │ │ └── quanzi@3x.png.svn-base
│ │ │ │ ├── text-base
│ │ │ │ │ ├── quanzi@2x.png.svn-base
│ │ │ │ │ ├── quanzi@3x.png.svn-base
│ │ │ │ │ └── Contents.json.svn-base
│ │ │ │ └── entries
│ │ │ ├── quanzi@2x.png
│ │ │ ├── quanzi@3x.png
│ │ │ └── Contents.json
│ │ ├── shouye.imageset
│ │ │ ├── .svn
│ │ │ │ ├── prop-base
│ │ │ │ │ ├── shouye@2x.png.svn-base
│ │ │ │ │ └── shouye@3x.png.svn-base
│ │ │ │ ├── text-base
│ │ │ │ │ ├── shouye@2x.png.svn-base
│ │ │ │ │ ├── shouye@3x.png.svn-base
│ │ │ │ │ └── Contents.json.svn-base
│ │ │ │ └── entries
│ │ │ ├── shouye@2x.png
│ │ │ ├── shouye@3x.png
│ │ │ └── Contents.json
│ │ ├── quanzi_s.imageset
│ │ │ ├── .svn
│ │ │ │ ├── prop-base
│ │ │ │ │ ├── quanzi_s@2x.png.svn-base
│ │ │ │ │ └── quanzi_s@3x.png.svn-base
│ │ │ │ ├── text-base
│ │ │ │ │ ├── quanzi_s@2x.png.svn-base
│ │ │ │ │ ├── quanzi_s@3x.png.svn-base
│ │ │ │ │ └── Contents.json.svn-base
│ │ │ │ └── entries
│ │ │ ├── quanzi_s@2x.png
│ │ │ ├── quanzi_s@3x.png
│ │ │ └── Contents.json
│ │ ├── shouye_s.imageset
│ │ │ ├── .svn
│ │ │ │ ├── prop-base
│ │ │ │ │ ├── shouye_s@2x.png.svn-base
│ │ │ │ │ └── shouye_s@3x.png.svn-base
│ │ │ │ ├── text-base
│ │ │ │ │ ├── shouye_s@2x.png.svn-base
│ │ │ │ │ ├── shouye_s@3x.png.svn-base
│ │ │ │ │ └── Contents.json.svn-base
│ │ │ │ └── entries
│ │ │ ├── shouye_s@2x.png
│ │ │ ├── shouye_s@3x.png
│ │ │ └── Contents.json
│ │ ├── main_badge.imageset
│ │ │ ├── main_badge.png
│ │ │ ├── main_badge@2x.png
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── ViewController.h
│ ├── Class
│ │ ├── SecondViewController.h
│ │ ├── FirstViewController.h
│ │ ├── SecondViewController.m
│ │ ├── SecondViewController.xib
│ │ ├── FirstViewController.xib
│ │ └── FirstViewController.m
│ ├── Main(主要)
│ │ ├── Controller
│ │ │ ├── ZFTabBarViewController.h
│ │ │ └── ZFTabBarViewController.m
│ │ └── View
│ │ │ ├── ZFBadgeButton.h
│ │ │ ├── ZFTabBarButton.h
│ │ │ ├── ZFTabBar.h
│ │ │ ├── ZFBadgeButton.m
│ │ │ ├── ZFTabBar.m
│ │ │ └── ZFTabBarButton.m
│ ├── AppDelegate.h
│ ├── main.m
│ ├── ViewController.m
│ ├── ZFTabBar-Prefix.pch
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.xib
│ ├── Info.plist
│ └── AppDelegate.m
├── ZFTabBar.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── project.pbxproj
└── ZFTabBarTests
│ ├── Info.plist
│ └── ZFTabBarTests.m
├── .gitignore
├── README.md
└── LICENSE
/ScreenShot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ScreenShot.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/.svn/prop-base/quanzi@2x.png.svn-base:
--------------------------------------------------------------------------------
1 | K 13
2 | svn:mime-type
3 | V 24
4 | application/octet-stream
5 | END
6 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/.svn/prop-base/quanzi@3x.png.svn-base:
--------------------------------------------------------------------------------
1 | K 13
2 | svn:mime-type
3 | V 24
4 | application/octet-stream
5 | END
6 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/.svn/prop-base/shouye@2x.png.svn-base:
--------------------------------------------------------------------------------
1 | K 13
2 | svn:mime-type
3 | V 24
4 | application/octet-stream
5 | END
6 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/.svn/prop-base/shouye@3x.png.svn-base:
--------------------------------------------------------------------------------
1 | K 13
2 | svn:mime-type
3 | V 24
4 | application/octet-stream
5 | END
6 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/.svn/prop-base/quanzi_s@2x.png.svn-base:
--------------------------------------------------------------------------------
1 | K 13
2 | svn:mime-type
3 | V 24
4 | application/octet-stream
5 | END
6 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/.svn/prop-base/quanzi_s@3x.png.svn-base:
--------------------------------------------------------------------------------
1 | K 13
2 | svn:mime-type
3 | V 24
4 | application/octet-stream
5 | END
6 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/.svn/prop-base/shouye_s@2x.png.svn-base:
--------------------------------------------------------------------------------
1 | K 13
2 | svn:mime-type
3 | V 24
4 | application/octet-stream
5 | END
6 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/.svn/prop-base/shouye_s@3x.png.svn-base:
--------------------------------------------------------------------------------
1 | K 13
2 | svn:mime-type
3 | V 24
4 | application/octet-stream
5 | END
6 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/quanzi@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/quanzi@2x.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/quanzi@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/quanzi@3x.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/shouye@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/shouye@2x.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/shouye@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/shouye@3x.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/quanzi_s@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/quanzi_s@2x.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/quanzi_s@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/quanzi_s@3x.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/shouye_s@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/shouye_s@2x.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/shouye_s@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/shouye_s@3x.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/main_badge.imageset/main_badge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/main_badge.imageset/main_badge.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/main_badge.imageset/main_badge@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/main_badge.imageset/main_badge@2x.png
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/.svn/text-base/quanzi@2x.png.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/.svn/text-base/quanzi@2x.png.svn-base
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/.svn/text-base/quanzi@3x.png.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/.svn/text-base/quanzi@3x.png.svn-base
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/.svn/text-base/shouye@2x.png.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/.svn/text-base/shouye@2x.png.svn-base
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/.svn/text-base/shouye@3x.png.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/.svn/text-base/shouye@3x.png.svn-base
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/.svn/text-base/quanzi_s@2x.png.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/.svn/text-base/quanzi_s@2x.png.svn-base
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/.svn/text-base/quanzi_s@3x.png.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/.svn/text-base/quanzi_s@3x.png.svn-base
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/.svn/text-base/shouye_s@2x.png.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/.svn/text-base/shouye_s@2x.png.svn-base
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/.svn/text-base/shouye_s@3x.png.svn-base:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/renzifeng/ZFTabBar/HEAD/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/.svn/text-base/shouye_s@3x.png.svn-base
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Class/SecondViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // SecondViewController.h
3 | // TabBarTest
4 | //
5 | // Created by 任子丰 on 15/9/9.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface SecondViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Class/FirstViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // FirstViewController.h
3 | // TabBarTest
4 | //
5 | // Created by 任子丰 on 15/9/9.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface FirstViewController : UITableViewController
12 | - (void)refrshUI;
13 | @end
14 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Main(主要)/Controller/ZFTabBarViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZFTabBarViewController.h
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2014年 任子丰. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ZFTabBarViewController : UITabBarController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Main(主要)/View/ZFBadgeButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZFBadgeButton.h
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2014年 任子丰. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ZFBadgeButton : UIButton
12 | @property (nonatomic, copy) NSString *badgeValue;
13 | @end
14 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Main(主要)/View/ZFTabBarButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZFTabBarButton.h
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2014年 任子丰. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ZFTabBarButton : UIButton
12 | @property (nonatomic, strong) UITabBarItem *item;
13 | @end
14 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "quanzi@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "quanzi@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "shouye@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "shouye@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "quanzi_s@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "quanzi_s@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "shouye_s@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "shouye_s@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/main_badge.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "main_badge.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "main_badge@2x.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/.svn/text-base/Contents.json.svn-base:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "quanzi@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "quanzi@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/.svn/text-base/Contents.json.svn-base:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "shouye@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "shouye@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/.svn/text-base/Contents.json.svn-base:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "quanzi_s@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "quanzi_s@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/.svn/text-base/Contents.json.svn-base:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x",
10 | "filename" : "shouye_s@2x.png"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x",
15 | "filename" : "shouye_s@3x.png"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Main(主要)/View/ZFTabBar.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZFTabBar.h
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2014年 任子丰. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class ZFTabBar;
12 |
13 | @protocol ZFTabBarDelegate
14 |
15 | @optional
16 | - (void)tabBar:(ZFTabBar *)tabBar didSelectedButtonFrom:(NSInteger)from to:(NSInteger)to;
17 |
18 | @end
19 |
20 | @interface ZFTabBar : UIView
21 | - (void)addTabBarButtonWithItem:(UITabBarItem *)item;
22 |
23 | @property (nonatomic, weak) id delegate;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | build/
4 | *.pbxuser
5 | !default.pbxuser
6 | *.mode1v3
7 | !default.mode1v3
8 | *.mode2v3
9 | !default.mode2v3
10 | *.perspectivev3
11 | !default.perspectivev3
12 | xcuserdata
13 | *.xccheckout
14 | *.moved-aside
15 | DerivedData
16 | *.hmap
17 | *.ipa
18 | *.xcuserstate
19 |
20 | # CocoaPods
21 | #
22 | # We recommend against adding the Pods directory to your .gitignore. However
23 | # you should judge for yourself, the pros and cons are mentioned at:
24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
25 | #
26 | #Pods/
27 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 |
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | // Do any additional setup after loading the view, typically from a nib.
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | // Dispose of any resources that can be recreated.
25 | }
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/ZFTabBar-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // ZFTabBar-Prefix.pch
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #ifndef ZFTabBar_ZFTabBar_Prefix_pch
10 | #define ZFTabBar_ZFTabBar_Prefix_pch
11 |
12 | #ifdef __OBJC__
13 | #import
14 | #import
15 |
16 | // 1.判断是否为iOS7
17 | #define iOS7 ([[UIDevice currentDevice].systemVersion doubleValue] >= 7.0)
18 |
19 |
20 | // 2.获得RGB颜色
21 | #define ZFColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
22 |
23 | #endif
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBarTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | zifeng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBarTests/ZFTabBarTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZFTabBarTests.m
3 | // ZFTabBarTests
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface ZFTabBarTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation ZFTabBarTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Class/SecondViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // SecondViewController.m
3 | // TabBarTest
4 | //
5 | // Created by 任子丰 on 15/9/9.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #import "SecondViewController.h"
10 |
11 | @interface SecondViewController ()
12 |
13 | @end
14 |
15 | @implementation SecondViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | self.navigationItem.title = self.tabBarItem.title;
20 | // Do any additional setup after loading the view from its nib.
21 | }
22 |
23 | - (void)didReceiveMemoryWarning {
24 | [super didReceiveMemoryWarning];
25 | // Dispose of any resources that can be recreated.
26 | }
27 |
28 | /*
29 | #pragma mark - Navigation
30 |
31 | // In a storyboard-based application, you will often want to do a little preparation before navigation
32 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
33 | // Get the new view controller using [segue destinationViewController].
34 | // Pass the selected object to the new view controller.
35 | }
36 | */
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Class/SecondViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "ipad",
35 | "size" : "29x29",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "ipad",
40 | "size" : "29x29",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "ipad",
45 | "size" : "40x40",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "ipad",
50 | "size" : "40x40",
51 | "scale" : "2x"
52 | },
53 | {
54 | "idiom" : "ipad",
55 | "size" : "76x76",
56 | "scale" : "1x"
57 | },
58 | {
59 | "idiom" : "ipad",
60 | "size" : "76x76",
61 | "scale" : "2x"
62 | }
63 | ],
64 | "info" : {
65 | "version" : 1,
66 | "author" : "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye.imageset/.svn/entries:
--------------------------------------------------------------------------------
1 | 10
2 |
3 | dir
4 | 1230
5 | svn://renzifeng@123.57.140.10/palmcon/client/ios/WanWanEntertainment/WanWanEntertainment/Images.xcassets/%E9%A6%96%E9%A1%B5/shouye.imageset
6 | svn://renzifeng@123.57.140.10
7 |
8 |
9 |
10 | 2015-07-17T01:16:59.209030Z
11 | 5
12 | renzifeng
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 97f156aa-bc85-4bdc-a161-7f1bb3150efa
28 |
29 | Contents.json
30 | file
31 |
32 |
33 |
34 |
35 | 2015-08-06T01:35:24.000000Z
36 | 3e96653cbbe3e0eb2cd74bbad722a255
37 | 2015-07-17T01:16:59.209030Z
38 | 5
39 | renzifeng
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 342
62 |
63 | shouye@2x.png
64 | file
65 |
66 |
67 |
68 |
69 | 2015-08-06T01:35:24.000000Z
70 | fc58ea0454c3786f60c1a438d9fb8176
71 | 2015-07-17T01:16:59.209030Z
72 | 5
73 | renzifeng
74 | has-props
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | 19020
96 |
97 | shouye@3x.png
98 | file
99 |
100 |
101 |
102 |
103 | 2015-08-06T01:35:24.000000Z
104 | 92d46a3a50efd90c785d2c107373c3c0
105 | 2015-07-17T01:16:59.209030Z
106 | 5
107 | renzifeng
108 | has-props
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | 19624
130 |
131 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi.imageset/.svn/entries:
--------------------------------------------------------------------------------
1 | 10
2 |
3 | dir
4 | 1230
5 | svn://renzifeng@123.57.140.10/palmcon/client/ios/WanWanEntertainment/WanWanEntertainment/Images.xcassets/%E5%9C%88%E5%AD%90-1/quanzi.imageset
6 | svn://renzifeng@123.57.140.10
7 |
8 |
9 |
10 | 2015-07-17T01:16:59.209030Z
11 | 5
12 | renzifeng
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 97f156aa-bc85-4bdc-a161-7f1bb3150efa
28 |
29 | quanzi@2x.png
30 | file
31 |
32 |
33 |
34 |
35 | 2015-08-06T01:35:26.000000Z
36 | 974c7f01c48774fa026fb57717c51881
37 | 2015-07-17T01:16:59.209030Z
38 | 5
39 | renzifeng
40 | has-props
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 19811
62 |
63 | Contents.json
64 | file
65 |
66 |
67 |
68 |
69 | 2015-08-06T01:35:26.000000Z
70 | 7a4317d7b234404a7e5a8d88e0199852
71 | 2015-07-17T01:16:59.209030Z
72 | 5
73 | renzifeng
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | 342
96 |
97 | quanzi@3x.png
98 | file
99 |
100 |
101 |
102 |
103 | 2015-08-06T01:35:26.000000Z
104 | 9cc54da66be961256ee30893a4ae571c
105 | 2015-07-17T01:16:59.209030Z
106 | 5
107 | renzifeng
108 | has-props
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | 21064
130 |
131 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/quanzi_s.imageset/.svn/entries:
--------------------------------------------------------------------------------
1 | 10
2 |
3 | dir
4 | 1230
5 | svn://renzifeng@123.57.140.10/palmcon/client/ios/WanWanEntertainment/WanWanEntertainment/Images.xcassets/%E5%9C%88%E5%AD%90-1/quanzi_s.imageset
6 | svn://renzifeng@123.57.140.10
7 |
8 |
9 |
10 | 2015-07-17T01:16:59.209030Z
11 | 5
12 | renzifeng
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 97f156aa-bc85-4bdc-a161-7f1bb3150efa
28 |
29 | Contents.json
30 | file
31 |
32 |
33 |
34 |
35 | 2015-08-06T01:35:26.000000Z
36 | 8c09283917a9fdb9720f2e23ea4832f6
37 | 2015-07-17T01:16:59.209030Z
38 | 5
39 | renzifeng
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 346
62 |
63 | quanzi_s@2x.png
64 | file
65 |
66 |
67 |
68 |
69 | 2015-08-06T01:35:26.000000Z
70 | beba679563917220df7875090439e815
71 | 2015-07-17T01:16:59.209030Z
72 | 5
73 | renzifeng
74 | has-props
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | 19782
96 |
97 | quanzi_s@3x.png
98 | file
99 |
100 |
101 |
102 |
103 | 2015-08-06T01:35:26.000000Z
104 | 4b9a92b528c6a4ad6c9b0dab3021f2eb
105 | 2015-07-17T01:16:59.209030Z
106 | 5
107 | renzifeng
108 | has-props
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | 20973
130 |
131 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Images.xcassets/shouye_s.imageset/.svn/entries:
--------------------------------------------------------------------------------
1 | 10
2 |
3 | dir
4 | 1230
5 | svn://renzifeng@123.57.140.10/palmcon/client/ios/WanWanEntertainment/WanWanEntertainment/Images.xcassets/%E9%A6%96%E9%A1%B5/shouye_s.imageset
6 | svn://renzifeng@123.57.140.10
7 |
8 |
9 |
10 | 2015-07-17T01:16:59.209030Z
11 | 5
12 | renzifeng
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | 97f156aa-bc85-4bdc-a161-7f1bb3150efa
28 |
29 | Contents.json
30 | file
31 |
32 |
33 |
34 |
35 | 2015-08-06T01:35:24.000000Z
36 | d3f1590d22ade2c0a864c538ac5eff53
37 | 2015-07-17T01:16:59.209030Z
38 | 5
39 | renzifeng
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 | 346
62 |
63 | shouye_s@2x.png
64 | file
65 |
66 |
67 |
68 |
69 | 2015-08-06T01:35:24.000000Z
70 | 7699c4357261a9cc705936abb07db0b0
71 | 2015-07-17T01:16:59.209030Z
72 | 5
73 | renzifeng
74 | has-props
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 | 19012
96 |
97 | shouye_s@3x.png
98 | file
99 |
100 |
101 |
102 |
103 | 2015-08-06T01:35:24.000000Z
104 | 5f3613db99a1c6e4d2253ab9af113186
105 | 2015-07-17T01:16:59.209030Z
106 | 5
107 | renzifeng
108 | has-props
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 | 19611
130 |
131 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Main(主要)/View/ZFBadgeButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZFBadgeButton.m
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2014年 任子丰. All rights reserved.
7 | //
8 |
9 | #import "ZFBadgeButton.h"
10 |
11 | @implementation ZFBadgeButton
12 |
13 | - (id)initWithFrame:(CGRect)frame
14 | {
15 | self = [super initWithFrame:frame];
16 | if (self) {
17 | self.hidden = YES;
18 | self.userInteractionEnabled = NO;
19 | [self setBackgroundImage:[UIImage imageNamed:@"main_badge"] forState:UIControlStateNormal];
20 | self.titleLabel.font = [UIFont systemFontOfSize:11];
21 | }
22 | return self;
23 | }
24 |
25 | - (void)setBadgeValue:(NSString *)badgeValue
26 | {
27 | // _badgeValue = badgeValue;
28 | _badgeValue = [badgeValue copy];
29 |
30 | if (badgeValue) {
31 | self.hidden = NO;
32 | // 设置文字
33 | [self setTitle:badgeValue forState:UIControlStateNormal];
34 |
35 | // 设置frame
36 | CGRect frame = self.frame;
37 | CGFloat badgeH = self.currentBackgroundImage.size.height;
38 | CGFloat badgeW = self.currentBackgroundImage.size.width;
39 | if (badgeValue.length > 1) {
40 | // 文字的尺寸
41 | CGSize badgeSize = [badgeValue sizeWithFont:self.titleLabel.font];
42 | badgeW = badgeSize.width + 10;
43 | }
44 | frame.size.width = badgeW;
45 | frame.size.height = badgeH;
46 | self.frame = frame;
47 | } else {
48 | self.hidden = YES;
49 | }
50 | }
51 |
52 | @end
53 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Class/FirstViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | zifeng.$(PRODUCT_NAME:rfc1034identifier)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ZFTabBar
2 | **自定义TabBar,可以选中和非选中图片,还可以加badgeValue**
3 |
4 | ### 效果演示:
5 | 
6 |
7 | #用法示例
8 |
9 | ## 初始化TabBar
10 | ``` objc
11 | /**
12 | * 初始化所有的子控制器
13 | */
14 | - (void)setupAllChildViewControllers
15 | {
16 | // 1.首页
17 | FirstViewController *home = [[FirstViewController alloc] init];
18 | home.tabBarItem.badgeValue = @"N";
19 | [self setupChildViewController:home title:@"首页" imageName:@"shouye" selectedImageName:@"shouye_s"];
20 |
21 | // 2.消息
22 | SecondViewController *message = [[SecondViewController alloc] init];
23 | message.tabBarItem.badgeValue = @"8";
24 | [self setupChildViewController:message title:@"消息" imageName:@"quanzi" selectedImageName:@"quanzi_s"];
25 |
26 | // 3.首页
27 | FirstViewController *home1 = [[FirstViewController alloc] init];
28 | home1.tabBarItem.badgeValue = @"19";
29 | [self setupChildViewController:home1 title:@"发现" imageName:@"shouye" selectedImageName:@"shouye_s"];
30 |
31 | // 4.消息
32 | SecondViewController *message1 = [[SecondViewController alloc] init];
33 | message1.tabBarItem.badgeValue = @"99";
34 | [self setupChildViewController:message1 title:@"广场" imageName:@"quanzi" selectedImageName:@"quanzi_s"];
35 | }
36 | ```
37 | ## 双击tabbar,可刷新当前页面列表,具体看代码
38 | ```objc
39 | /**
40 | * 监听tabbar按钮的改变
41 | * @param from 原来选中的位置
42 | * @param to 最新选中的位置
43 | */
44 | - (void)tabBar:(ZFTabBar *)tabBar didSelectedButtonFrom:(NSInteger)from to:(NSInteger)to
45 | {
46 | if (self.selectedIndex == to && to == 0 ) {//双击刷新制定页面的列表
47 | UINavigationController *nav = self.viewControllers[0];
48 | FirstViewController *firstVC = nav.viewControllers[0];
49 | [firstVC refrshUI];
50 | }
51 | self.selectedIndex = to;
52 | }
53 |
54 | ```
55 | # 期待
56 | - 如果在使用过程中遇到BUG,或发现功能不够用,希望你能Issues我
57 | - 如果觉得好用请Star!
58 | - 谢谢!
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Main(主要)/View/ZFTabBar.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZFTabBar.m
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2014年 任子丰. All rights reserved.
7 | //
8 |
9 | #import "ZFTabBar.h"
10 | #import "ZFTabBarButton.h"
11 |
12 | @interface ZFTabBar()
13 | @property (nonatomic, weak) ZFTabBarButton *selectedButton;
14 | @end
15 |
16 | @implementation ZFTabBar
17 |
18 | - (id)initWithFrame:(CGRect)frame
19 | {
20 | self = [super initWithFrame:frame];
21 | if (self) {
22 | if (!iOS7) { // 非iOS7下,设置tabbar的背景
23 | self.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"tabbar_background"]];
24 | }
25 | }
26 | return self;
27 | }
28 |
29 | - (void)addTabBarButtonWithItem:(UITabBarItem *)item
30 | {
31 | // 1.创建按钮
32 | ZFTabBarButton *button = [[ZFTabBarButton alloc] init];
33 | [self addSubview:button];
34 |
35 | // 2.设置数据
36 | button.item = item;
37 |
38 | // 3.监听按钮点击
39 | [button addTarget:self action:@selector(buttonClick:) forControlEvents:UIControlEventTouchDown];
40 |
41 | // 4.默认选中第0个按钮
42 | if (self.subviews.count == 1) {
43 | [self buttonClick:button];
44 | }
45 | }
46 |
47 | /**
48 | * 监听按钮点击
49 | */
50 | - (void)buttonClick:(ZFTabBarButton *)button
51 | {
52 | // 1.通知代理
53 | if ([self.delegate respondsToSelector:@selector(tabBar:didSelectedButtonFrom:to:)]) {
54 | [self.delegate tabBar:self didSelectedButtonFrom:self.selectedButton.tag to:button.tag];
55 | }
56 |
57 | // 2.设置按钮的状态
58 | self.selectedButton.selected = NO;
59 | button.selected = YES;
60 | self.selectedButton = button;
61 | }
62 |
63 | - (void)layoutSubviews
64 | {
65 | [super layoutSubviews];
66 |
67 | // 按钮的frame数据
68 | CGFloat buttonH = self.frame.size.height;
69 | CGFloat buttonW = self.frame.size.width / self.subviews.count;
70 | CGFloat buttonY = 0;
71 |
72 | for (int index = 0; index
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Main(主要)/Controller/ZFTabBarViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZFTabBarViewController.m
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2014年 任子丰. All rights reserved.
7 | //
8 |
9 | #import "ZFTabBarViewController.h"
10 | #import "ZFTabBar.h"
11 | #import "FirstViewController.h"
12 | #import "SecondViewController.h"
13 |
14 | @interface ZFTabBarViewController ()
15 | /**
16 | * 自定义的tabbar
17 | */
18 | @property (nonatomic, weak) ZFTabBar *customTabBar;
19 | @end
20 |
21 | @implementation ZFTabBarViewController
22 |
23 | - (void)viewDidLoad
24 | {
25 | [super viewDidLoad];
26 | // 初始化tabbar
27 | [self setupTabbar];
28 |
29 | // 初始化所有的子控制器
30 | [self setupAllChildViewControllers];
31 | }
32 |
33 | - (void)viewWillAppear:(BOOL)animated
34 | {
35 | [super viewWillAppear:animated];
36 |
37 | // 删除系统自动生成的UITabBarButton
38 | for (UIView *child in self.tabBar.subviews) {
39 | if ([child isKindOfClass:[UIControl class]]) {
40 | [child removeFromSuperview];
41 | }
42 | }
43 | }
44 |
45 | /**
46 | * 初始化tabbar
47 | */
48 | - (void)setupTabbar
49 | {
50 | ZFTabBar *customTabBar = [[ZFTabBar alloc] init];
51 | customTabBar.frame = self.tabBar.bounds;
52 | customTabBar.delegate = self;
53 | [self.tabBar addSubview:customTabBar];
54 | self.customTabBar = customTabBar;
55 | }
56 |
57 | /**
58 | * 监听tabbar按钮的改变
59 | * @param from 原来选中的位置
60 | * @param to 最新选中的位置
61 | */
62 | - (void)tabBar:(ZFTabBar *)tabBar didSelectedButtonFrom:(NSInteger)from to:(NSInteger)to
63 | {
64 | if (self.selectedIndex == to && to == 0 ) {//双击刷新制定页面的列表
65 | UINavigationController *nav = self.viewControllers[0];
66 | FirstViewController *firstVC = nav.viewControllers[0];
67 | [firstVC refrshUI];
68 | }
69 | self.selectedIndex = to;
70 | }
71 |
72 | /**
73 | * 初始化所有的子控制器
74 | */
75 | - (void)setupAllChildViewControllers
76 | {
77 | // 1.首页
78 | FirstViewController *home = [[FirstViewController alloc] init];
79 | home.tabBarItem.badgeValue = @"N";
80 | [self setupChildViewController:home title:@"首页" imageName:@"shouye" selectedImageName:@"shouye_s"];
81 |
82 | // 2.消息
83 | SecondViewController *message = [[SecondViewController alloc] init];
84 | message.tabBarItem.badgeValue = @"8";
85 | [self setupChildViewController:message title:@"消息" imageName:@"quanzi" selectedImageName:@"quanzi_s"];
86 |
87 | // 3.首页
88 | FirstViewController *home1 = [[FirstViewController alloc] init];
89 | home1.tabBarItem.badgeValue = @"19";
90 | [self setupChildViewController:home1 title:@"发现" imageName:@"shouye" selectedImageName:@"shouye_s"];
91 |
92 | // 4.消息
93 | SecondViewController *message1 = [[SecondViewController alloc] init];
94 | message1.tabBarItem.badgeValue = @"99";
95 | [self setupChildViewController:message1 title:@"广场" imageName:@"quanzi" selectedImageName:@"quanzi_s"];
96 | }
97 |
98 | /**
99 | * 初始化一个子控制器
100 | *
101 | * @param childVc 需要初始化的子控制器
102 | * @param title 标题
103 | * @param imageName 图标
104 | * @param selectedImageName 选中的图标
105 | */
106 | - (void)setupChildViewController:(UIViewController *)childVc title:(NSString *)title imageName:(NSString *)imageName selectedImageName:(NSString *)selectedImageName
107 | {
108 | // 1.设置控制器的属性
109 | childVc.title = title;
110 | // 设置图标
111 | childVc.tabBarItem.image = [UIImage imageNamed:imageName];
112 | // 设置选中的图标
113 | UIImage *selectedImage = [UIImage imageNamed:selectedImageName];
114 | if (iOS7) {
115 | childVc.tabBarItem.selectedImage = [selectedImage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
116 | } else {
117 | childVc.tabBarItem.selectedImage = selectedImage;
118 | }
119 |
120 | // 2.包装一个导航控制器
121 | UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:childVc];
122 | [self addChildViewController:nav];
123 |
124 | // 3.添加tabbar内部的按钮
125 | [self.customTabBar addTabBarButtonWithItem:childVc.tabBarItem];
126 | }
127 |
128 | @end
129 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Main(主要)/View/ZFTabBarButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // ZFTabBarButton.m
3 | // ZFTabBar
4 | //
5 | // Created by 任子丰 on 15/9/10.
6 | // Copyright (c) 2014年 任子丰. All rights reserved.
7 | //
8 |
9 | // 图标的比例
10 | #define ZFTabBarButtonImageRatio 0.6
11 |
12 | // 按钮的默认文字颜色
13 | #define ZFTabBarButtonTitleColor (iOS7 ? [UIColor blackColor] : [UIColor whiteColor])
14 | // 按钮的选中文字颜色
15 | #define ZFTabBarButtonTitleSelectedColor [UIColor blueColor]
16 |
17 | #import "ZFTabBarButton.h"
18 | #import "ZFBadgeButton.h"
19 |
20 | @interface ZFTabBarButton()
21 | /**
22 | * 提醒数字
23 | */
24 | @property (nonatomic, weak) ZFBadgeButton *badgeButton;
25 | @end
26 |
27 | @implementation ZFTabBarButton
28 |
29 | - (id)initWithFrame:(CGRect)frame
30 | {
31 | self = [super initWithFrame:frame];
32 | if (self) {
33 | // 图标居中
34 | self.imageView.contentMode = UIViewContentModeCenter;
35 | // 文字居中
36 | self.titleLabel.textAlignment = NSTextAlignmentCenter;
37 | // 字体大小
38 | self.titleLabel.font = [UIFont systemFontOfSize:11];
39 | // 文字颜色
40 | [self setTitleColor:ZFTabBarButtonTitleColor forState:UIControlStateNormal];
41 | [self setTitleColor:ZFTabBarButtonTitleSelectedColor forState:UIControlStateSelected];
42 |
43 | // if (!iOS7) { // 非iOS7下,设置按钮选中时的背景
44 | // [self setBackgroundImage:[UIImage imageNamed:@"tabbar_slider"] forState:UIControlStateSelected];
45 | // }
46 |
47 | // 添加一个提醒数字按钮
48 | ZFBadgeButton *badgeButton = [[ZFBadgeButton alloc] init];
49 | badgeButton.autoresizingMask = UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleBottomMargin;
50 | [self addSubview:badgeButton];
51 | self.badgeButton = badgeButton;
52 | }
53 | return self;
54 | }
55 |
56 | // 重写去掉高亮状态
57 | - (void)setHighlighted:(BOOL)highlighted {}
58 |
59 | // 内部图片的frame
60 | - (CGRect)imageRectForContentRect:(CGRect)contentRect
61 | {
62 | CGFloat imageW = contentRect.size.width;
63 | CGFloat imageH = contentRect.size.height * ZFTabBarButtonImageRatio;
64 | return CGRectMake(0, 3, imageW, imageH-3);
65 | }
66 |
67 | // 内部文字的frame
68 | - (CGRect)titleRectForContentRect:(CGRect)contentRect
69 | {
70 | CGFloat titleY = contentRect.size.height * ZFTabBarButtonImageRatio;
71 | CGFloat titleW = contentRect.size.width;
72 | CGFloat titleH = contentRect.size.height - titleY;
73 | return CGRectMake(0, titleY+2, titleW, titleH);
74 | }
75 |
76 | // 设置item
77 | - (void)setItem:(UITabBarItem *)item
78 | {
79 | _item = item;
80 |
81 | // KVO 监听属性改变
82 | [item addObserver:self forKeyPath:@"badgeValue" options:0 context:nil];
83 | [item addObserver:self forKeyPath:@"title" options:0 context:nil];
84 | [item addObserver:self forKeyPath:@"image" options:0 context:nil];
85 | [item addObserver:self forKeyPath:@"selectedImage" options:0 context:nil];
86 |
87 | [self observeValueForKeyPath:nil ofObject:nil change:nil context:nil];
88 | }
89 |
90 | - (void)dealloc
91 | {
92 | [self.item removeObserver:self forKeyPath:@"badgeValue"];
93 | [self.item removeObserver:self forKeyPath:@"title"];
94 | [self.item removeObserver:self forKeyPath:@"image"];
95 | [self.item removeObserver:self forKeyPath:@"selectedImage"];
96 | }
97 |
98 | /**
99 | * 监听到某个对象的属性改变了,就会调用
100 | *
101 | * @param keyPath 属性名
102 | * @param object 哪个对象的属性被改变
103 | * @param change 属性发生的改变
104 | */
105 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
106 | {
107 | // 设置文字
108 | [self setTitle:self.item.title forState:UIControlStateSelected];
109 | [self setTitle:self.item.title forState:UIControlStateNormal];
110 |
111 | // 设置图片
112 | [self setImage:self.item.image forState:UIControlStateNormal];
113 | [self setImage:self.item.selectedImage forState:UIControlStateSelected];
114 |
115 | // 设置提醒数字
116 | self.badgeButton.badgeValue = self.item.badgeValue;
117 |
118 | // 设置提醒数字的位置
119 | CGFloat badgeY = 5;
120 | CGFloat badgeX = self.frame.size.width - self.badgeButton.frame.size.width - 10;
121 | CGRect badgeF = self.badgeButton.frame;
122 | badgeF.origin.x = badgeX;
123 | badgeF.origin.y = badgeY;
124 | self.badgeButton.frame = badgeF;
125 | }
126 | @end
127 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar/Class/FirstViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // FirstViewController.m
3 | // TabBarTest
4 | //
5 | // Created by 任子丰 on 15/9/9.
6 | // Copyright (c) 2015年 任子丰. All rights reserved.
7 | //
8 |
9 | #import "FirstViewController.h"
10 |
11 | @interface FirstViewController ()
12 |
13 | @end
14 |
15 | @implementation FirstViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | self.navigationItem.title = self.tabBarItem.title;
20 | self.tableView.tableFooterView = [UIView new];
21 | self.refreshControl = [[UIRefreshControl alloc] init];
22 | [self.refreshControl beginRefreshing];
23 | [self.refreshControl addTarget:self action:@selector(refresh) forControlEvents:UIControlEventValueChanged];
24 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
25 | [self.refreshControl endRefreshing];
26 | });
27 | }
28 | - (void)refrshUI
29 | {
30 | [self.tableView setContentOffset:CGPointMake(0, -64-64) animated:YES];
31 | [self.refreshControl beginRefreshing];
32 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
33 | [self.refreshControl endRefreshing];
34 | });
35 | }
36 | - (void)refresh
37 | {
38 | dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
39 | [self.refreshControl endRefreshing];
40 | });
41 |
42 | }
43 | - (void)didReceiveMemoryWarning {
44 | [super didReceiveMemoryWarning];
45 | // Dispose of any resources that can be recreated.
46 | }
47 |
48 | #pragma mark - Table view data source
49 |
50 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
51 | // Return the number of sections.
52 | return 1;
53 | }
54 |
55 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
56 | // Return the number of rows in the section.
57 | return 10;
58 | }
59 |
60 |
61 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
62 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"reuseIdentifier"];
63 | if (!cell) {
64 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"reuseIdentifier"];
65 | }
66 | cell.textLabel.text = [NSString stringWithFormat:@"%zd",indexPath.row];
67 | // Configure the cell...
68 |
69 | return cell;
70 | }
71 |
72 |
73 | /*
74 | // Override to support conditional editing of the table view.
75 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
76 | // Return NO if you do not want the specified item to be editable.
77 | return YES;
78 | }
79 | */
80 |
81 | /*
82 | // Override to support editing the table view.
83 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
84 | if (editingStyle == UITableViewCellEditingStyleDelete) {
85 | // Delete the row from the data source
86 | [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade];
87 | } else if (editingStyle == UITableViewCellEditingStyleInsert) {
88 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view
89 | }
90 | }
91 | */
92 |
93 | /*
94 | // Override to support rearranging the table view.
95 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath {
96 | }
97 | */
98 |
99 | /*
100 | // Override to support conditional rearranging of the table view.
101 | - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath {
102 | // Return NO if you do not want the item to be re-orderable.
103 | return YES;
104 | }
105 | */
106 |
107 | /*
108 | #pragma mark - Table view delegate
109 |
110 | // In a xib-based application, navigation from a table can be handled in -tableView:didSelectRowAtIndexPath:
111 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
112 | // Navigation logic may go here, for example:
113 | // Create the next view controller.
114 | <#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:<#@"Nib name"#> bundle:nil];
115 |
116 | // Pass the selected object to the new view controller.
117 |
118 | // Push the view controller.
119 | [self.navigationController pushViewController:detailViewController animated:YES];
120 | }
121 | */
122 |
123 | /*
124 | #pragma mark - Navigation
125 |
126 | // In a storyboard-based application, you will often want to do a little preparation before navigation
127 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
128 | // Get the new view controller using [segue destinationViewController].
129 | // Pass the selected object to the new view controller.
130 | }
131 | */
132 |
133 | @end
134 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "{}"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright {yyyy} {name of copyright owner}
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
203 |
--------------------------------------------------------------------------------
/ZFTabBar/ZFTabBar.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | CC6140BB1BA1C4DB0026C303 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6140BA1BA1C4DB0026C303 /* main.m */; };
11 | CC6140BE1BA1C4DB0026C303 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6140BD1BA1C4DB0026C303 /* AppDelegate.m */; };
12 | CC6140C11BA1C4DB0026C303 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6140C01BA1C4DB0026C303 /* ViewController.m */; };
13 | CC6140C41BA1C4DB0026C303 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CC6140C21BA1C4DB0026C303 /* Main.storyboard */; };
14 | CC6140C61BA1C4DB0026C303 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CC6140C51BA1C4DB0026C303 /* Images.xcassets */; };
15 | CC6140C91BA1C4DB0026C303 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = CC6140C71BA1C4DB0026C303 /* LaunchScreen.xib */; };
16 | CC6140D51BA1C4DB0026C303 /* ZFTabBarTests.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6140D41BA1C4DB0026C303 /* ZFTabBarTests.m */; };
17 | CC6140EA1BA1C51E0026C303 /* ZFTabBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6140E11BA1C51E0026C303 /* ZFTabBarViewController.m */; };
18 | CC6140EB1BA1C51E0026C303 /* ZFBadgeButton.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6140E51BA1C51E0026C303 /* ZFBadgeButton.m */; };
19 | CC6140EC1BA1C51E0026C303 /* ZFTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6140E71BA1C51E0026C303 /* ZFTabBar.m */; };
20 | CC6140ED1BA1C51E0026C303 /* ZFTabBarButton.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6140E91BA1C51E0026C303 /* ZFTabBarButton.m */; };
21 | CC6140F41BA1C6F20026C303 /* FirstViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6140EF1BA1C6F20026C303 /* FirstViewController.m */; };
22 | CC6140F51BA1C6F20026C303 /* FirstViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CC6140F01BA1C6F20026C303 /* FirstViewController.xib */; };
23 | CC6140F61BA1C6F20026C303 /* SecondViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = CC6140F21BA1C6F20026C303 /* SecondViewController.m */; };
24 | CC6140F71BA1C6F20026C303 /* SecondViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = CC6140F31BA1C6F20026C303 /* SecondViewController.xib */; };
25 | /* End PBXBuildFile section */
26 |
27 | /* Begin PBXContainerItemProxy section */
28 | CC6140CF1BA1C4DB0026C303 /* PBXContainerItemProxy */ = {
29 | isa = PBXContainerItemProxy;
30 | containerPortal = CC6140AD1BA1C4DB0026C303 /* Project object */;
31 | proxyType = 1;
32 | remoteGlobalIDString = CC6140B41BA1C4DB0026C303;
33 | remoteInfo = ZFTabBar;
34 | };
35 | /* End PBXContainerItemProxy section */
36 |
37 | /* Begin PBXFileReference section */
38 | CC6140B51BA1C4DB0026C303 /* ZFTabBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ZFTabBar.app; sourceTree = BUILT_PRODUCTS_DIR; };
39 | CC6140B91BA1C4DB0026C303 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
40 | CC6140BA1BA1C4DB0026C303 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
41 | CC6140BC1BA1C4DB0026C303 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
42 | CC6140BD1BA1C4DB0026C303 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
43 | CC6140BF1BA1C4DB0026C303 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
44 | CC6140C01BA1C4DB0026C303 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
45 | CC6140C31BA1C4DB0026C303 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
46 | CC6140C51BA1C4DB0026C303 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
47 | CC6140C81BA1C4DB0026C303 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
48 | CC6140CE1BA1C4DB0026C303 /* ZFTabBarTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ZFTabBarTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
49 | CC6140D31BA1C4DB0026C303 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
50 | CC6140D41BA1C4DB0026C303 /* ZFTabBarTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ZFTabBarTests.m; sourceTree = ""; };
51 | CC6140E01BA1C51E0026C303 /* ZFTabBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFTabBarViewController.h; sourceTree = ""; };
52 | CC6140E11BA1C51E0026C303 /* ZFTabBarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZFTabBarViewController.m; sourceTree = ""; };
53 | CC6140E41BA1C51E0026C303 /* ZFBadgeButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFBadgeButton.h; sourceTree = ""; };
54 | CC6140E51BA1C51E0026C303 /* ZFBadgeButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZFBadgeButton.m; sourceTree = ""; };
55 | CC6140E61BA1C51E0026C303 /* ZFTabBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFTabBar.h; sourceTree = ""; };
56 | CC6140E71BA1C51E0026C303 /* ZFTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZFTabBar.m; sourceTree = ""; };
57 | CC6140E81BA1C51E0026C303 /* ZFTabBarButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ZFTabBarButton.h; sourceTree = ""; };
58 | CC6140E91BA1C51E0026C303 /* ZFTabBarButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ZFTabBarButton.m; sourceTree = ""; };
59 | CC6140EF1BA1C6F20026C303 /* FirstViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FirstViewController.m; sourceTree = ""; };
60 | CC6140F01BA1C6F20026C303 /* FirstViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = FirstViewController.xib; sourceTree = ""; };
61 | CC6140F11BA1C6F20026C303 /* SecondViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SecondViewController.h; sourceTree = ""; };
62 | CC6140F21BA1C6F20026C303 /* SecondViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SecondViewController.m; sourceTree = ""; };
63 | CC6140F31BA1C6F20026C303 /* SecondViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SecondViewController.xib; sourceTree = ""; };
64 | CC6140F81BA1C7230026C303 /* FirstViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FirstViewController.h; sourceTree = ""; };
65 | CC6140F91BA1C8460026C303 /* ZFTabBar-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "ZFTabBar-Prefix.pch"; sourceTree = ""; };
66 | /* End PBXFileReference section */
67 |
68 | /* Begin PBXFrameworksBuildPhase section */
69 | CC6140B21BA1C4DB0026C303 /* Frameworks */ = {
70 | isa = PBXFrameworksBuildPhase;
71 | buildActionMask = 2147483647;
72 | files = (
73 | );
74 | runOnlyForDeploymentPostprocessing = 0;
75 | };
76 | CC6140CB1BA1C4DB0026C303 /* Frameworks */ = {
77 | isa = PBXFrameworksBuildPhase;
78 | buildActionMask = 2147483647;
79 | files = (
80 | );
81 | runOnlyForDeploymentPostprocessing = 0;
82 | };
83 | /* End PBXFrameworksBuildPhase section */
84 |
85 | /* Begin PBXGroup section */
86 | CC6140AC1BA1C4DB0026C303 = {
87 | isa = PBXGroup;
88 | children = (
89 | CC6140B71BA1C4DB0026C303 /* ZFTabBar */,
90 | CC6140D11BA1C4DB0026C303 /* ZFTabBarTests */,
91 | CC6140B61BA1C4DB0026C303 /* Products */,
92 | );
93 | sourceTree = "";
94 | };
95 | CC6140B61BA1C4DB0026C303 /* Products */ = {
96 | isa = PBXGroup;
97 | children = (
98 | CC6140B51BA1C4DB0026C303 /* ZFTabBar.app */,
99 | CC6140CE1BA1C4DB0026C303 /* ZFTabBarTests.xctest */,
100 | );
101 | name = Products;
102 | sourceTree = "";
103 | };
104 | CC6140B71BA1C4DB0026C303 /* ZFTabBar */ = {
105 | isa = PBXGroup;
106 | children = (
107 | CC6140BC1BA1C4DB0026C303 /* AppDelegate.h */,
108 | CC6140BD1BA1C4DB0026C303 /* AppDelegate.m */,
109 | CC6140BF1BA1C4DB0026C303 /* ViewController.h */,
110 | CC6140C01BA1C4DB0026C303 /* ViewController.m */,
111 | CC6140EE1BA1C6AF0026C303 /* Class */,
112 | CC6140DE1BA1C51E0026C303 /* Main(主要) */,
113 | CC6140C21BA1C4DB0026C303 /* Main.storyboard */,
114 | CC6140C51BA1C4DB0026C303 /* Images.xcassets */,
115 | CC6140C71BA1C4DB0026C303 /* LaunchScreen.xib */,
116 | CC6140B81BA1C4DB0026C303 /* Supporting Files */,
117 | );
118 | path = ZFTabBar;
119 | sourceTree = "";
120 | };
121 | CC6140B81BA1C4DB0026C303 /* Supporting Files */ = {
122 | isa = PBXGroup;
123 | children = (
124 | CC6140B91BA1C4DB0026C303 /* Info.plist */,
125 | CC6140F91BA1C8460026C303 /* ZFTabBar-Prefix.pch */,
126 | CC6140BA1BA1C4DB0026C303 /* main.m */,
127 | );
128 | name = "Supporting Files";
129 | sourceTree = "";
130 | };
131 | CC6140D11BA1C4DB0026C303 /* ZFTabBarTests */ = {
132 | isa = PBXGroup;
133 | children = (
134 | CC6140D41BA1C4DB0026C303 /* ZFTabBarTests.m */,
135 | CC6140D21BA1C4DB0026C303 /* Supporting Files */,
136 | );
137 | path = ZFTabBarTests;
138 | sourceTree = "";
139 | };
140 | CC6140D21BA1C4DB0026C303 /* Supporting Files */ = {
141 | isa = PBXGroup;
142 | children = (
143 | CC6140D31BA1C4DB0026C303 /* Info.plist */,
144 | );
145 | name = "Supporting Files";
146 | sourceTree = "";
147 | };
148 | CC6140DE1BA1C51E0026C303 /* Main(主要) */ = {
149 | isa = PBXGroup;
150 | children = (
151 | CC6140DF1BA1C51E0026C303 /* Controller */,
152 | CC6140E21BA1C51E0026C303 /* Model */,
153 | CC6140E31BA1C51E0026C303 /* View */,
154 | );
155 | path = "Main(主要)";
156 | sourceTree = "";
157 | };
158 | CC6140DF1BA1C51E0026C303 /* Controller */ = {
159 | isa = PBXGroup;
160 | children = (
161 | CC6140E01BA1C51E0026C303 /* ZFTabBarViewController.h */,
162 | CC6140E11BA1C51E0026C303 /* ZFTabBarViewController.m */,
163 | );
164 | path = Controller;
165 | sourceTree = "";
166 | };
167 | CC6140E21BA1C51E0026C303 /* Model */ = {
168 | isa = PBXGroup;
169 | children = (
170 | );
171 | path = Model;
172 | sourceTree = "";
173 | };
174 | CC6140E31BA1C51E0026C303 /* View */ = {
175 | isa = PBXGroup;
176 | children = (
177 | CC6140E61BA1C51E0026C303 /* ZFTabBar.h */,
178 | CC6140E71BA1C51E0026C303 /* ZFTabBar.m */,
179 | CC6140E81BA1C51E0026C303 /* ZFTabBarButton.h */,
180 | CC6140E91BA1C51E0026C303 /* ZFTabBarButton.m */,
181 | CC6140E41BA1C51E0026C303 /* ZFBadgeButton.h */,
182 | CC6140E51BA1C51E0026C303 /* ZFBadgeButton.m */,
183 | );
184 | path = View;
185 | sourceTree = "";
186 | };
187 | CC6140EE1BA1C6AF0026C303 /* Class */ = {
188 | isa = PBXGroup;
189 | children = (
190 | CC6140F81BA1C7230026C303 /* FirstViewController.h */,
191 | CC6140EF1BA1C6F20026C303 /* FirstViewController.m */,
192 | CC6140F01BA1C6F20026C303 /* FirstViewController.xib */,
193 | CC6140F11BA1C6F20026C303 /* SecondViewController.h */,
194 | CC6140F21BA1C6F20026C303 /* SecondViewController.m */,
195 | CC6140F31BA1C6F20026C303 /* SecondViewController.xib */,
196 | );
197 | path = Class;
198 | sourceTree = "";
199 | };
200 | /* End PBXGroup section */
201 |
202 | /* Begin PBXNativeTarget section */
203 | CC6140B41BA1C4DB0026C303 /* ZFTabBar */ = {
204 | isa = PBXNativeTarget;
205 | buildConfigurationList = CC6140D81BA1C4DB0026C303 /* Build configuration list for PBXNativeTarget "ZFTabBar" */;
206 | buildPhases = (
207 | CC6140B11BA1C4DB0026C303 /* Sources */,
208 | CC6140B21BA1C4DB0026C303 /* Frameworks */,
209 | CC6140B31BA1C4DB0026C303 /* Resources */,
210 | );
211 | buildRules = (
212 | );
213 | dependencies = (
214 | );
215 | name = ZFTabBar;
216 | productName = ZFTabBar;
217 | productReference = CC6140B51BA1C4DB0026C303 /* ZFTabBar.app */;
218 | productType = "com.apple.product-type.application";
219 | };
220 | CC6140CD1BA1C4DB0026C303 /* ZFTabBarTests */ = {
221 | isa = PBXNativeTarget;
222 | buildConfigurationList = CC6140DB1BA1C4DB0026C303 /* Build configuration list for PBXNativeTarget "ZFTabBarTests" */;
223 | buildPhases = (
224 | CC6140CA1BA1C4DB0026C303 /* Sources */,
225 | CC6140CB1BA1C4DB0026C303 /* Frameworks */,
226 | CC6140CC1BA1C4DB0026C303 /* Resources */,
227 | );
228 | buildRules = (
229 | );
230 | dependencies = (
231 | CC6140D01BA1C4DB0026C303 /* PBXTargetDependency */,
232 | );
233 | name = ZFTabBarTests;
234 | productName = ZFTabBarTests;
235 | productReference = CC6140CE1BA1C4DB0026C303 /* ZFTabBarTests.xctest */;
236 | productType = "com.apple.product-type.bundle.unit-test";
237 | };
238 | /* End PBXNativeTarget section */
239 |
240 | /* Begin PBXProject section */
241 | CC6140AD1BA1C4DB0026C303 /* Project object */ = {
242 | isa = PBXProject;
243 | attributes = {
244 | LastUpgradeCheck = 0640;
245 | ORGANIZATIONNAME = "任子丰";
246 | TargetAttributes = {
247 | CC6140B41BA1C4DB0026C303 = {
248 | CreatedOnToolsVersion = 6.4;
249 | };
250 | CC6140CD1BA1C4DB0026C303 = {
251 | CreatedOnToolsVersion = 6.4;
252 | TestTargetID = CC6140B41BA1C4DB0026C303;
253 | };
254 | };
255 | };
256 | buildConfigurationList = CC6140B01BA1C4DB0026C303 /* Build configuration list for PBXProject "ZFTabBar" */;
257 | compatibilityVersion = "Xcode 3.2";
258 | developmentRegion = English;
259 | hasScannedForEncodings = 0;
260 | knownRegions = (
261 | en,
262 | Base,
263 | );
264 | mainGroup = CC6140AC1BA1C4DB0026C303;
265 | productRefGroup = CC6140B61BA1C4DB0026C303 /* Products */;
266 | projectDirPath = "";
267 | projectRoot = "";
268 | targets = (
269 | CC6140B41BA1C4DB0026C303 /* ZFTabBar */,
270 | CC6140CD1BA1C4DB0026C303 /* ZFTabBarTests */,
271 | );
272 | };
273 | /* End PBXProject section */
274 |
275 | /* Begin PBXResourcesBuildPhase section */
276 | CC6140B31BA1C4DB0026C303 /* Resources */ = {
277 | isa = PBXResourcesBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | CC6140C41BA1C4DB0026C303 /* Main.storyboard in Resources */,
281 | CC6140C91BA1C4DB0026C303 /* LaunchScreen.xib in Resources */,
282 | CC6140C61BA1C4DB0026C303 /* Images.xcassets in Resources */,
283 | CC6140F51BA1C6F20026C303 /* FirstViewController.xib in Resources */,
284 | CC6140F71BA1C6F20026C303 /* SecondViewController.xib in Resources */,
285 | );
286 | runOnlyForDeploymentPostprocessing = 0;
287 | };
288 | CC6140CC1BA1C4DB0026C303 /* Resources */ = {
289 | isa = PBXResourcesBuildPhase;
290 | buildActionMask = 2147483647;
291 | files = (
292 | );
293 | runOnlyForDeploymentPostprocessing = 0;
294 | };
295 | /* End PBXResourcesBuildPhase section */
296 |
297 | /* Begin PBXSourcesBuildPhase section */
298 | CC6140B11BA1C4DB0026C303 /* Sources */ = {
299 | isa = PBXSourcesBuildPhase;
300 | buildActionMask = 2147483647;
301 | files = (
302 | CC6140F61BA1C6F20026C303 /* SecondViewController.m in Sources */,
303 | CC6140EB1BA1C51E0026C303 /* ZFBadgeButton.m in Sources */,
304 | CC6140ED1BA1C51E0026C303 /* ZFTabBarButton.m in Sources */,
305 | CC6140C11BA1C4DB0026C303 /* ViewController.m in Sources */,
306 | CC6140BE1BA1C4DB0026C303 /* AppDelegate.m in Sources */,
307 | CC6140EC1BA1C51E0026C303 /* ZFTabBar.m in Sources */,
308 | CC6140EA1BA1C51E0026C303 /* ZFTabBarViewController.m in Sources */,
309 | CC6140BB1BA1C4DB0026C303 /* main.m in Sources */,
310 | CC6140F41BA1C6F20026C303 /* FirstViewController.m in Sources */,
311 | );
312 | runOnlyForDeploymentPostprocessing = 0;
313 | };
314 | CC6140CA1BA1C4DB0026C303 /* Sources */ = {
315 | isa = PBXSourcesBuildPhase;
316 | buildActionMask = 2147483647;
317 | files = (
318 | CC6140D51BA1C4DB0026C303 /* ZFTabBarTests.m in Sources */,
319 | );
320 | runOnlyForDeploymentPostprocessing = 0;
321 | };
322 | /* End PBXSourcesBuildPhase section */
323 |
324 | /* Begin PBXTargetDependency section */
325 | CC6140D01BA1C4DB0026C303 /* PBXTargetDependency */ = {
326 | isa = PBXTargetDependency;
327 | target = CC6140B41BA1C4DB0026C303 /* ZFTabBar */;
328 | targetProxy = CC6140CF1BA1C4DB0026C303 /* PBXContainerItemProxy */;
329 | };
330 | /* End PBXTargetDependency section */
331 |
332 | /* Begin PBXVariantGroup section */
333 | CC6140C21BA1C4DB0026C303 /* Main.storyboard */ = {
334 | isa = PBXVariantGroup;
335 | children = (
336 | CC6140C31BA1C4DB0026C303 /* Base */,
337 | );
338 | name = Main.storyboard;
339 | sourceTree = "";
340 | };
341 | CC6140C71BA1C4DB0026C303 /* LaunchScreen.xib */ = {
342 | isa = PBXVariantGroup;
343 | children = (
344 | CC6140C81BA1C4DB0026C303 /* Base */,
345 | );
346 | name = LaunchScreen.xib;
347 | sourceTree = "";
348 | };
349 | /* End PBXVariantGroup section */
350 |
351 | /* Begin XCBuildConfiguration section */
352 | CC6140D61BA1C4DB0026C303 /* Debug */ = {
353 | isa = XCBuildConfiguration;
354 | buildSettings = {
355 | ALWAYS_SEARCH_USER_PATHS = NO;
356 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
357 | CLANG_CXX_LIBRARY = "libc++";
358 | CLANG_ENABLE_MODULES = YES;
359 | CLANG_ENABLE_OBJC_ARC = YES;
360 | CLANG_WARN_BOOL_CONVERSION = YES;
361 | CLANG_WARN_CONSTANT_CONVERSION = YES;
362 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
363 | CLANG_WARN_EMPTY_BODY = YES;
364 | CLANG_WARN_ENUM_CONVERSION = YES;
365 | CLANG_WARN_INT_CONVERSION = YES;
366 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
367 | CLANG_WARN_UNREACHABLE_CODE = YES;
368 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
369 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
370 | COPY_PHASE_STRIP = NO;
371 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
372 | ENABLE_STRICT_OBJC_MSGSEND = YES;
373 | GCC_C_LANGUAGE_STANDARD = gnu99;
374 | GCC_DYNAMIC_NO_PIC = NO;
375 | GCC_NO_COMMON_BLOCKS = YES;
376 | GCC_OPTIMIZATION_LEVEL = 0;
377 | GCC_PREPROCESSOR_DEFINITIONS = (
378 | "DEBUG=1",
379 | "$(inherited)",
380 | );
381 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
382 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
383 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
384 | GCC_WARN_UNDECLARED_SELECTOR = YES;
385 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
386 | GCC_WARN_UNUSED_FUNCTION = YES;
387 | GCC_WARN_UNUSED_VARIABLE = YES;
388 | IPHONEOS_DEPLOYMENT_TARGET = 8.4;
389 | MTL_ENABLE_DEBUG_INFO = YES;
390 | ONLY_ACTIVE_ARCH = YES;
391 | SDKROOT = iphoneos;
392 | TARGETED_DEVICE_FAMILY = "1,2";
393 | };
394 | name = Debug;
395 | };
396 | CC6140D71BA1C4DB0026C303 /* Release */ = {
397 | isa = XCBuildConfiguration;
398 | buildSettings = {
399 | ALWAYS_SEARCH_USER_PATHS = NO;
400 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
401 | CLANG_CXX_LIBRARY = "libc++";
402 | CLANG_ENABLE_MODULES = YES;
403 | CLANG_ENABLE_OBJC_ARC = YES;
404 | CLANG_WARN_BOOL_CONVERSION = YES;
405 | CLANG_WARN_CONSTANT_CONVERSION = YES;
406 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
407 | CLANG_WARN_EMPTY_BODY = YES;
408 | CLANG_WARN_ENUM_CONVERSION = YES;
409 | CLANG_WARN_INT_CONVERSION = YES;
410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
411 | CLANG_WARN_UNREACHABLE_CODE = YES;
412 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
413 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
414 | COPY_PHASE_STRIP = NO;
415 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
416 | ENABLE_NS_ASSERTIONS = NO;
417 | ENABLE_STRICT_OBJC_MSGSEND = YES;
418 | GCC_C_LANGUAGE_STANDARD = gnu99;
419 | GCC_NO_COMMON_BLOCKS = YES;
420 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
421 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
422 | GCC_WARN_UNDECLARED_SELECTOR = YES;
423 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
424 | GCC_WARN_UNUSED_FUNCTION = YES;
425 | GCC_WARN_UNUSED_VARIABLE = YES;
426 | IPHONEOS_DEPLOYMENT_TARGET = 8.4;
427 | MTL_ENABLE_DEBUG_INFO = NO;
428 | SDKROOT = iphoneos;
429 | TARGETED_DEVICE_FAMILY = "1,2";
430 | VALIDATE_PRODUCT = YES;
431 | };
432 | name = Release;
433 | };
434 | CC6140D91BA1C4DB0026C303 /* Debug */ = {
435 | isa = XCBuildConfiguration;
436 | buildSettings = {
437 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
438 | GCC_PREFIX_HEADER = "$(SRCROOT)/ZFTabBar/ZFTabBar-Prefix.pch";
439 | INFOPLIST_FILE = ZFTabBar/Info.plist;
440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
441 | PRODUCT_NAME = "$(TARGET_NAME)";
442 | };
443 | name = Debug;
444 | };
445 | CC6140DA1BA1C4DB0026C303 /* Release */ = {
446 | isa = XCBuildConfiguration;
447 | buildSettings = {
448 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
449 | GCC_PREFIX_HEADER = "$(SRCROOT)/ZFTabBar/ZFTabBar-Prefix.pch";
450 | INFOPLIST_FILE = ZFTabBar/Info.plist;
451 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
452 | PRODUCT_NAME = "$(TARGET_NAME)";
453 | };
454 | name = Release;
455 | };
456 | CC6140DC1BA1C4DB0026C303 /* Debug */ = {
457 | isa = XCBuildConfiguration;
458 | buildSettings = {
459 | BUNDLE_LOADER = "$(TEST_HOST)";
460 | FRAMEWORK_SEARCH_PATHS = (
461 | "$(SDKROOT)/Developer/Library/Frameworks",
462 | "$(inherited)",
463 | );
464 | GCC_PREPROCESSOR_DEFINITIONS = (
465 | "DEBUG=1",
466 | "$(inherited)",
467 | );
468 | INFOPLIST_FILE = ZFTabBarTests/Info.plist;
469 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
470 | PRODUCT_NAME = "$(TARGET_NAME)";
471 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZFTabBar.app/ZFTabBar";
472 | };
473 | name = Debug;
474 | };
475 | CC6140DD1BA1C4DB0026C303 /* Release */ = {
476 | isa = XCBuildConfiguration;
477 | buildSettings = {
478 | BUNDLE_LOADER = "$(TEST_HOST)";
479 | FRAMEWORK_SEARCH_PATHS = (
480 | "$(SDKROOT)/Developer/Library/Frameworks",
481 | "$(inherited)",
482 | );
483 | INFOPLIST_FILE = ZFTabBarTests/Info.plist;
484 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
485 | PRODUCT_NAME = "$(TARGET_NAME)";
486 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ZFTabBar.app/ZFTabBar";
487 | };
488 | name = Release;
489 | };
490 | /* End XCBuildConfiguration section */
491 |
492 | /* Begin XCConfigurationList section */
493 | CC6140B01BA1C4DB0026C303 /* Build configuration list for PBXProject "ZFTabBar" */ = {
494 | isa = XCConfigurationList;
495 | buildConfigurations = (
496 | CC6140D61BA1C4DB0026C303 /* Debug */,
497 | CC6140D71BA1C4DB0026C303 /* Release */,
498 | );
499 | defaultConfigurationIsVisible = 0;
500 | defaultConfigurationName = Release;
501 | };
502 | CC6140D81BA1C4DB0026C303 /* Build configuration list for PBXNativeTarget "ZFTabBar" */ = {
503 | isa = XCConfigurationList;
504 | buildConfigurations = (
505 | CC6140D91BA1C4DB0026C303 /* Debug */,
506 | CC6140DA1BA1C4DB0026C303 /* Release */,
507 | );
508 | defaultConfigurationIsVisible = 0;
509 | defaultConfigurationName = Release;
510 | };
511 | CC6140DB1BA1C4DB0026C303 /* Build configuration list for PBXNativeTarget "ZFTabBarTests" */ = {
512 | isa = XCConfigurationList;
513 | buildConfigurations = (
514 | CC6140DC1BA1C4DB0026C303 /* Debug */,
515 | CC6140DD1BA1C4DB0026C303 /* Release */,
516 | );
517 | defaultConfigurationIsVisible = 0;
518 | defaultConfigurationName = Release;
519 | };
520 | /* End XCConfigurationList section */
521 | };
522 | rootObject = CC6140AD1BA1C4DB0026C303 /* Project object */;
523 | }
524 |
--------------------------------------------------------------------------------