├── .DS_Store
├── CYTabBarDemo
├── show.png
├── .DS_Store
├── CYTabBar
│ ├── .DS_Store
│ ├── CYTabBar.bundle
│ │ ├── main_badge@2x.png
│ │ └── main_badge@3x.png
│ ├── CYButton.h
│ ├── CYBadgeView.h
│ ├── CYCenterButton.h
│ ├── CustomTabBar.h
│ ├── CYButton.m
│ ├── CYCenterButton.m
│ ├── CYTabBarController.h
│ ├── CYBadgeView.m
│ ├── CYTabBarController.m
│ └── CustomTabBar.m
├── Assets.xcassets
│ ├── Contents.json
│ ├── wb
│ │ ├── Contents.json
│ │ ├── .DS_Store
│ │ ├── tabbar_discover.imageset
│ │ │ ├── tabbar_discover.png
│ │ │ └── Contents.json
│ │ ├── tabbar_mainframe.imageset
│ │ │ ├── tabbar_mainframe.png
│ │ │ └── Contents.json
│ │ ├── tabbar_discoverHL.imageset
│ │ │ ├── tabbar_discoverHL.png
│ │ │ └── Contents.json
│ │ ├── tabbar_mainframeHL.imageset
│ │ │ ├── tabbar_mainframeHL.png
│ │ │ └── Contents.json
│ │ └── tabbar_centerplus_selected.imageset
│ │ │ ├── tabbar_centerplus_selected@2x.png
│ │ │ └── Contents.json
│ └── xy
│ │ ├── Contents.json
│ │ ├── Btn01.imageset
│ │ ├── Btn01@2x.png
│ │ ├── Btn01@3x.png
│ │ └── Contents.json
│ │ ├── Btn02.imageset
│ │ ├── Btn02@2x.png
│ │ ├── Btn02@3x.png
│ │ └── Contents.json
│ │ ├── SelectBtn01.imageset
│ │ ├── SelectBtn01@2x.png
│ │ ├── SelectBtn01@3x.png
│ │ └── Contents.json
│ │ ├── SelectBtn02.imageset
│ │ ├── SelectBtn02@2x.png
│ │ ├── SelectBtn02@3x.png
│ │ └── Contents.json
│ │ ├── post_normal.imageset
│ │ ├── post_normal@2x.png
│ │ └── Contents.json
│ │ ├── post_animate_add.imageset
│ │ ├── post_animate_add@2x.png
│ │ └── Contents.json
│ │ ├── post_animate_akey.imageset
│ │ ├── post_animate_akey@2x.png
│ │ └── Contents.json
│ │ ├── post_animate_album.imageset
│ │ ├── post_animate_album@2x.png
│ │ └── Contents.json
│ │ └── post_animate_camera.imageset
│ │ ├── post_animate_camera@2x.png
│ │ └── Contents.json
├── PublishAnimate
│ ├── .DS_Store
│ ├── PlusAnimate.h
│ └── PlusAnimate.m
├── ViewController2.h
├── ViewController.h
├── AppDelegate.h
├── main.m
├── ViewController2.m
├── Info.plist
├── ViewController.m
├── Base.lproj
│ └── LaunchScreen.storyboard
└── AppDelegate.m
├── CYTabBarDemo.xcodeproj
├── xcuserdata
│ └── zhangchunyu.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── CYTabBarDemo.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── zhangchunyu.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── project.pbxproj
└── README.md
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/.DS_Store
--------------------------------------------------------------------------------
/CYTabBarDemo/show.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/show.png
--------------------------------------------------------------------------------
/CYTabBarDemo/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/.DS_Store
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/CYTabBar/.DS_Store
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/PublishAnimate/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/PublishAnimate/.DS_Store
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/wb/.DS_Store
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CYTabBar.bundle/main_badge@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/CYTabBar/CYTabBar.bundle/main_badge@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CYTabBar.bundle/main_badge@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/CYTabBar/CYTabBar.bundle/main_badge@3x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/Btn01.imageset/Btn01@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/Btn01.imageset/Btn01@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/Btn01.imageset/Btn01@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/Btn01.imageset/Btn01@3x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/Btn02.imageset/Btn02@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/Btn02.imageset/Btn02@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/Btn02.imageset/Btn02@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/Btn02.imageset/Btn02@3x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/SelectBtn01.imageset/SelectBtn01@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/SelectBtn01.imageset/SelectBtn01@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/SelectBtn01.imageset/SelectBtn01@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/SelectBtn01.imageset/SelectBtn01@3x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/SelectBtn02.imageset/SelectBtn02@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/SelectBtn02.imageset/SelectBtn02@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/SelectBtn02.imageset/SelectBtn02@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/SelectBtn02.imageset/SelectBtn02@3x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/post_normal.imageset/post_normal@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/post_normal.imageset/post_normal@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo.xcodeproj/xcuserdata/zhangchunyu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/tabbar_discover.imageset/tabbar_discover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/wb/tabbar_discover.imageset/tabbar_discover.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/tabbar_mainframe.imageset/tabbar_mainframe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/wb/tabbar_mainframe.imageset/tabbar_mainframe.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/tabbar_discoverHL.imageset/tabbar_discoverHL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/wb/tabbar_discoverHL.imageset/tabbar_discoverHL.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/post_animate_add.imageset/post_animate_add@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/post_animate_add.imageset/post_animate_add@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/tabbar_mainframeHL.imageset/tabbar_mainframeHL.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/wb/tabbar_mainframeHL.imageset/tabbar_mainframeHL.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/post_animate_akey.imageset/post_animate_akey@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/post_animate_akey.imageset/post_animate_akey@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/post_animate_album.imageset/post_animate_album@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/post_animate_album.imageset/post_animate_album@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/post_animate_camera.imageset/post_animate_camera@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/xy/post_animate_camera.imageset/post_animate_camera@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/tabbar_centerplus_selected.imageset/tabbar_centerplus_selected@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo/Assets.xcassets/wb/tabbar_centerplus_selected.imageset/tabbar_centerplus_selected@2x.png
--------------------------------------------------------------------------------
/CYTabBarDemo.xcodeproj/project.xcworkspace/xcuserdata/zhangchunyu.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/iOSCommonLibrary/CYTabbar/HEAD/CYTabBarDemo.xcodeproj/project.xcworkspace/xcuserdata/zhangchunyu.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/CYTabBarDemo/ViewController2.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController2.h
3 | // CYTabBarDemo
4 | //
5 | // Created by 张春雨 on 2017/3/13.
6 | // Copyright © 2017年 张春雨. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController2 : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/CYTabBarDemo/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // CYTabBarDemo
4 | //
5 | // Created by 张春雨 on 2017/3/12.
6 | // Copyright © 2017年 张春雨. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CYButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // CYButton.h
3 | // 蚁巢
4 | //
5 | // Created by 张春雨 on 2016/11/17.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CYButton : UIButton
12 | /** item */
13 | @property (weak , nonatomic) UITabBarItem *item;
14 | @end
15 |
--------------------------------------------------------------------------------
/CYTabBarDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // CYTabBarDemo
4 | //
5 | // Created by 张春雨 on 2017/3/12.
6 | // Copyright © 2017年 张春雨. 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 |
--------------------------------------------------------------------------------
/CYTabBarDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // CYTabBarDemo
4 | //
5 | // Created by 张春雨 on 2017/3/12.
6 | // Copyright © 2017年 张春雨. 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 |
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CYBadgeView.h:
--------------------------------------------------------------------------------
1 | //
2 | // CYBadgeView.h
3 | // 蚁巢
4 | //
5 | // Created by 张春雨 on 2016/11/19.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CYBadgeView : UIButton
12 | /** remind number */
13 | @property (copy , nonatomic) NSString *badgeValue;
14 | /** remind color */
15 | @property (copy , nonatomic) UIColor *badgeColor;
16 | @end
17 |
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CYCenterButton.h:
--------------------------------------------------------------------------------
1 | //
2 | // CYCenterButton.h
3 | // 蚁巢
4 | //
5 | // Created by 张春雨 on 2016/11/17.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import
10 | #define BULGEH 16 //button bulge of height
11 |
12 | @interface CYCenterButton : UIButton
13 | /** Whether center button to bulge */
14 | @property(assign , nonatomic,getter=is_bulge) BOOL bulge;
15 | @end
16 |
17 |
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/post_normal.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "post_normal@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/tabbar_discover.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "tabbar_discover.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/tabbar_discoverHL.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "tabbar_discoverHL.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/tabbar_mainframe.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "tabbar_mainframe.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/post_animate_add.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "post_animate_add@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/tabbar_mainframeHL.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "tabbar_mainframeHL.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/post_animate_akey.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "post_animate_akey@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/post_animate_album.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "post_animate_album@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/post_animate_camera.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "post_animate_camera@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/wb/tabbar_centerplus_selected.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "tabbar_centerplus_selected@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/Btn01.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Btn01@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "Btn01@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/Btn02.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "Btn02@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "Btn02@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/SelectBtn01.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "SelectBtn01@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "SelectBtn01@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/Assets.xcassets/xy/SelectBtn02.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "SelectBtn02@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "SelectBtn02@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CYTabBarDemo/ViewController2.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController2.m
3 | // CYTabBarDemo
4 | //
5 | // Created by 张春雨 on 2017/3/13.
6 | // Copyright © 2017年 张春雨. All rights reserved.
7 | //
8 |
9 | #import "ViewController2.h"
10 |
11 | @interface ViewController2 ()
12 |
13 | @end
14 |
15 | @implementation ViewController2
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | self.view.backgroundColor = [UIColor whiteColor];
20 | }
21 |
22 | - (void)didReceiveMemoryWarning {
23 | [super didReceiveMemoryWarning];
24 | }
25 |
26 |
27 | @end
28 |
--------------------------------------------------------------------------------
/CYTabBarDemo/PublishAnimate/PlusAnimate.h:
--------------------------------------------------------------------------------
1 | //
2 | // PublishAnimate.h
3 | // ZCYTabBar
4 | //
5 | // Created by 张春雨 on 16/8/17.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import
10 | //通知点击按钮协议
11 | @protocol PublishAnimateDelegate
12 | - (void)didSelectBtnWithBtnTag:(NSInteger)tag;
13 | @end
14 |
15 |
16 | @interface PlusAnimate : UIView
17 | //通知点击按钮代理人
18 | @property(weak,nonatomic) id delegate;
19 | //弹出动画view
20 | +(PlusAnimate *)standardPublishAnimateWithView:(UIView *)view;
21 |
22 | @end
23 |
--------------------------------------------------------------------------------
/CYTabBarDemo.xcodeproj/xcuserdata/zhangchunyu.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | CYTabBarDemo.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 24225AD71E75A7FC00B242A7
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CustomTabBar.h:
--------------------------------------------------------------------------------
1 | //
2 | // CYTabBar.h
3 | // 蚁巢
4 | //
5 | // Created by 张春雨 on 2016/11/17.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 |
10 | #import
11 | @class CYButton;
12 | @class CYCenterButton;
13 |
14 | @interface CustomTabBar : UIView
15 | /** tabbar按钮显示信息 */
16 | @property(copy, nonatomic) NSArray *items;
17 | /** 设置文字颜色 */
18 | @property (strong , nonatomic) UIColor *textColor;
19 | /** 设置选中颜色 */
20 | @property (strong , nonatomic) UIColor *selectedTextColor;
21 | /** 其他按钮 */
22 | @property (strong , nonatomic) NSMutableArray *btnArr;
23 | /** 中间按钮 */
24 | @property (strong , nonatomic) CYCenterButton *centerBtn;
25 | @end
26 |
--------------------------------------------------------------------------------
/CYTabBarDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIRequiredDeviceCapabilities
26 |
27 | armv7
28 |
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/CYTabBarDemo/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // CYTabBarDemo
4 | //
5 | // Created by 张春雨 on 2017/3/12.
6 | // Copyright © 2017年 张春雨. 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 | self.navigationController.navigationBar.barTintColor = [UIColor whiteColor];
20 | self.navigationItem.title = self.tabBarItem.title;
21 | [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor blackColor]}];
22 |
23 | self.view.backgroundColor = [UIColor whiteColor];
24 | UIButton *btn = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, 100, 30)];
25 | btn.backgroundColor = [UIColor colorWithRed:86/255.0 green:149/255.0 blue:216/255.0 alpha:1];
26 | btn.center = self.view.center;
27 | [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
28 | [self.view addSubview:btn];
29 | }
30 |
31 | - (void)btnClick{
32 | UIViewController *vc = [UIViewController new];
33 | vc.view.backgroundColor = [UIColor whiteColor];
34 | [self.navigationController pushViewController:vc animated:YES];
35 | }
36 |
37 | - (void)didReceiveMemoryWarning {
38 | [super didReceiveMemoryWarning];
39 | }
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CYButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // CYButton.m
3 | // 蚁巢
4 | //
5 | // Created by 张春雨 on 2016/11/17.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import "CYButton.h"
10 | #import "CYBadgeView.h"
11 |
12 | @interface CYButton()
13 | /** remind number */
14 | @property (weak , nonatomic)CYBadgeView * badgeView;
15 | @end
16 |
17 | @implementation CYButton
18 |
19 | - (instancetype)initWithFrame:(CGRect)frame {
20 | self = [super initWithFrame:frame];
21 | if (self)
22 | {
23 | self.titleLabel.font = [UIFont systemFontOfSize:10];
24 | self.titleLabel.textAlignment = NSTextAlignmentCenter;
25 | self.adjustsImageWhenHighlighted = NO;
26 |
27 | self.imageView.contentMode = UIViewContentModeCenter;
28 | }
29 | return self;
30 | }
31 |
32 | - (void)layoutSubviews{
33 | [super layoutSubviews];
34 | CGFloat width = self.frame.size.width;
35 | CGFloat height = self.superview.frame.size.height;
36 | if (width!=0 && height!=0)
37 | {
38 | self.titleLabel.frame = CGRectMake(0, height-16, width, 16);
39 | self.imageView.frame = CGRectMake(0 , 0, width, 35);
40 | }
41 | }
42 |
43 | /**
44 | * Set red dot item
45 | */
46 | - (void)setItem:(UITabBarItem *)item {
47 | self.badgeView.badgeValue = item.badgeValue;
48 | self.badgeView.badgeColor = item.badgeColor;
49 | }
50 |
51 | /**
52 | * getter
53 | */
54 | - (CYBadgeView *)badgeView {
55 | if (!_badgeView) {
56 | CYBadgeView * badgeView = [[CYBadgeView alloc] init];
57 | _badgeView = badgeView;
58 | [self addSubview:badgeView];
59 | }
60 | return _badgeView;
61 | }
62 |
63 |
64 | - (void)setHighlighted:(BOOL)highlighted{
65 | }
66 |
67 | @end
68 |
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CYCenterButton.m:
--------------------------------------------------------------------------------
1 | //
2 | // CYCenterButton.m
3 | // 蚁巢
4 | //
5 | // Created by 张春雨 on 2016/11/17.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import "CYCenterButton.h"
10 |
11 | @implementation CYCenterButton
12 |
13 | - (instancetype)initWithFrame:(CGRect)frame {
14 | self = [super initWithFrame:frame];
15 | if (self)
16 | {
17 | self.titleLabel.font = [UIFont systemFontOfSize:10];
18 | self.titleLabel.textAlignment = NSTextAlignmentCenter;
19 | self.adjustsImageWhenHighlighted = NO;
20 |
21 | self.imageView.contentMode = UIViewContentModeCenter;
22 | }
23 | return self;
24 | }
25 |
26 |
27 | - (void)layoutSubviews{
28 | [super layoutSubviews];
29 | if (CGRectEqualToRect(self.frame, CGRectZero)) return;
30 |
31 | /**
32 | * button is bulge
33 | */
34 | if (self.is_bulge){
35 | self.imageView.frame = self.bounds;
36 | if (self.titleLabel.text.length) {
37 | self.titleLabel.frame = CGRectMake(0 , self.frame.size.height +(BULGEH-16),
38 | self.frame.size.width , 16);
39 | }
40 | return;
41 | }
42 | /**
43 | * button is normal and no text
44 | */
45 | if (!self.titleLabel.text.length) {
46 | self.imageView.frame = self.bounds;
47 | return;
48 | }
49 | /**
50 | * button is normal and contain text
51 | */
52 | CGFloat width = self.frame.size.width;
53 | CGFloat height = self.superview.frame.size.height;
54 | self.titleLabel.frame = CGRectMake(0, height-BULGEH , width, BULGEH);
55 | self.imageView.frame = CGRectMake(0 , 0, width, 35);
56 | }
57 |
58 |
59 | - (void)setHighlighted:(BOOL)highlighted{
60 | }
61 |
62 |
63 | @end
64 |
--------------------------------------------------------------------------------
/CYTabBarDemo/Base.lproj/LaunchScreen.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 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CYTabBarController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CYTabBarController.h
3 | // 蚁巢
4 | //
5 | // Created by 张春雨 on 2016/11/17.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "CustomTabBar.h"
11 |
12 | /**
13 | * READNE
14 |
15 | * 中间按钮可以 设置为 [控制器 或 普通触发事件的按钮]
16 | * ----> 只需要设置为普通按钮的话,Controller传入nil即可
17 |
18 |
19 | * 中间按钮可以 设置为 [圆形凸出 或 普通]
20 | * ----> 圆形凸出 bulge传入YES 普通 bulge传入NO
21 |
22 |
23 | * 如果你只是想小红点提醒用户
24 | * ----> 可以设置控制器的 tabBarItem.badgeValue 为remind
25 | * ----> Controller.tabBarItem.badgeValue = @"remind";
26 |
27 |
28 | * 如果你想以数字提醒用户
29 | * ----> 可以设置控制器的 tabBarItem.badgeValue 为字符串
30 | * ----> Controller.tabBarItem.badgeValue = @"100";
31 |
32 |
33 | * 如果你想切换控制器
34 | * ----> 可以设置控制器的 selectedIndex 为数字
35 | * ----> tabBarController.selectedIndex = x(索引为添加控制器时的顺序);
36 |
37 |
38 | * 如果你想改变提醒背景颜色
39 | * ----> 可以设置控制器的 tabBarItem.badgeColor 为一个颜色
40 | * ----> Controller.tabBarItem.badgeColor = [UIColor xxxColor];
41 | */
42 |
43 |
44 | @interface CYTabBarController : UITabBarController
45 | /** 自定义的tabbar */
46 | @property (strong , nonatomic) CustomTabBar* tabbar;
47 |
48 | /**
49 | * 添加子控制器
50 | * @param Controller 需管理的子控制器
51 | * @param title 底部文字
52 | * @param imageName 未选中的图片名
53 | * @param selectedImageName 选中的图片名
54 | */
55 | - (void)addChildController:(id)Controller
56 | title:(NSString *)title
57 | imageName:(NSString *)imageName
58 | selectedImageName:(NSString *)selectedImageName;
59 |
60 | /**
61 | * 设置中间按钮
62 | * @param Controller 需管理的子控制器
63 | * @param title 底部文字
64 | * @param imageName 未选中的图片名
65 | * @param selectedImageName 选中的图片名
66 | */
67 | - (void)addCenterController:(id)Controller
68 | bulge:(BOOL)bulge
69 | title:(NSString *)title
70 | imageName:(NSString *)imageName
71 | selectedImageName:(NSString *)selectedImageName;
72 |
73 | @end
74 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CYTabBar - 底部控制器
2 | [](https://developer.apple.com/iphone/index.action)
4 | [](https://developer.apple.com/Objective-C)
5 | 
6 | 
7 |
8 | ## 一. 功能简介 - Introduction
9 |
10 | - [x] 中间按钮可凸出 (bulge设为YES 否则不突出)
11 | - [x] 中按钮可设置控制器 或 普通按钮 (Controller传入nil为普通按钮)
12 | - [x] 二级页面不再添加tababr
13 | - [x] 小红点提醒 (当前控制器.tabBarItem.badgeValue = @"remind";)
14 | - [x] 数字提醒用户(当前控制器.tabBarItem.badgeValue = @"100";)
15 | - [x] 改变数字提醒背景颜色(当前控制器.tabBarItem.badgeColor = [UIColor xxxColor];)
16 | - [x] 切换控制器 (当前tabBarController.selectedIndex = x(索引为添加控制器时的顺序);)
17 |
18 | ## 二. 安装 - Installation
19 |
20 | - 暂不支持CocoaPods
21 | - 手动导入:将项目中的“CYTabBar”文件夹拖入项目中
22 | - 在AppDelegate中导入头文件 "CYTabBarController.h"
23 |
24 | ```
25 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
26 | self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen]bounds]];
27 |
28 | CYTabBarController * tabbar = [[CYTabBarController alloc]init];
29 |
30 | [tabbar addChildController:[ViewController new] title:@"xx" imageName:@"xx" selectedImageName:@"xx"];
31 |
32 | [tabbar addChildController:[ViewController2 new] title:@"xx" imageName:@"xx" selectedImageName:@"xx"];
33 |
34 | [tabbar addCenterController:nil bulge:YES title:@"xx" imageName:@xx" selectedImageName:@"xx"];
35 |
36 | self.window.rootViewController = tabbar;
37 | [self.window makeKeyAndVisible];
38 | return YES;
39 | }
40 | ```
41 |
42 | ## 三. 要求 - Requirements
43 |
44 | - ARC环境. - Requires ARC
45 | - 竖屏. - Vertical Screen
46 |
47 |
48 | ## 四. 更新历史 - Update History
49 |
50 | - 2017.03.12 修复tabbar销毁的时候观察者移除问题
51 |
52 |
53 | ## 五. 更多 - More
54 |
55 | - 如果你发现任何Bug 或者 新需求请issue我.
56 |
57 | - 大家一起讨论一起学习进步.
58 |
59 | - QQ : 707214577
60 |
61 |
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CYBadgeView.m:
--------------------------------------------------------------------------------
1 | //
2 | // CYBadgeView.m
3 | // 蚁巢
4 | //
5 | // Created by 张春雨 on 2016/11/19.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import "CYBadgeView.h"
10 |
11 | @implementation CYBadgeView
12 |
13 | - (instancetype)initWithFrame:(CGRect)frame{
14 | self = [super initWithFrame:frame];
15 | if (self)
16 | {
17 | self.userInteractionEnabled = NO;
18 | self.titleLabel.font = [UIFont systemFontOfSize:12];
19 | //set protection of image area
20 | UIImage *image = [UIImage imageNamed:@"CYTabBar.bundle/main_badge"];
21 | image = [image stretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
22 | [self setBackgroundImage:image forState:UIControlStateNormal];
23 | //set text of alignment
24 | self.titleLabel.textAlignment = NSTextAlignmentCenter;
25 | }
26 | return self;
27 | }
28 |
29 | /**
30 | * Set remind number
31 | */
32 | - (void)setBadgeValue:(NSString *)badgeValue
33 | {
34 | if (![_badgeValue isEqualToString:badgeValue])
35 | {
36 | _badgeValue = badgeValue;
37 | [self layoutIfNeeded];
38 | }
39 | }
40 |
41 | /**
42 | * Set color for remind Badge
43 | */
44 | - (void)setBadgeColor:(UIColor *)badgeColor{
45 | if (badgeColor!=nil && ![_badgeColor isEqual:badgeColor]) {
46 | UIImage *image = [UIImage imageNamed:@"CYTabBar.bundle/main_badge"];
47 | UIGraphicsBeginImageContextWithOptions(image.size, NO, 0);
48 | CGContextRef ref = UIGraphicsGetCurrentContext();
49 | CGRect rect = CGRectMake(0, 0, image.size.width, image.size.height);
50 | CGContextClipToMask(ref, rect, image.CGImage);
51 | [badgeColor setFill];
52 | CGContextFillRect(ref, rect);
53 | image = UIGraphicsGetImageFromCurrentImageContext();
54 | UIGraphicsEndImageContext();
55 | image = [image stretchableImageWithLeftCapWidth:image.size.width * 0.5 topCapHeight:image.size.height * 0.5];
56 | [self setBackgroundImage:image forState:UIControlStateNormal];
57 | _badgeColor = badgeColor;
58 | }
59 | }
60 |
61 |
62 | - (void)layoutSubviews{
63 | [super layoutSubviews];
64 | /**
65 | * red dot remind
66 | */
67 | if ([_badgeValue isEqualToString:@"remind"]) {
68 | self.frame = CGRectMake(self.superview.frame.size.width/2+7, 4,
69 | self.currentBackgroundImage.size.width/2,
70 | self.currentBackgroundImage.size.height/2);
71 | return;
72 | }
73 |
74 | /**
75 | * number remind
76 | */
77 | if ([_badgeValue integerValue] <= 0) {
78 | _badgeValue = nil;
79 | self.hidden = YES;
80 | return;
81 | }
82 |
83 |
84 | int n = 0;
85 | self.hidden = NO;
86 | if ([_badgeValue integerValue]>999) {
87 | [self setTitle:@"···" forState:UIControlStateNormal];
88 | }
89 | else{
90 | n = [_badgeValue integerValue] > 9 ? 8 : 0; //number beyond 9 to broaden
91 | [self setTitle:_badgeValue forState:UIControlStateNormal];
92 | }
93 |
94 | self.frame = CGRectMake(self.superview.frame.size.width/2+5, 1,
95 | self.currentBackgroundImage.size.width+n,
96 | self.currentBackgroundImage.size.height);
97 | }
98 |
99 | @end
100 |
--------------------------------------------------------------------------------
/CYTabBarDemo.xcodeproj/xcuserdata/zhangchunyu.xcuserdatad/xcschemes/CYTabBarDemo.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/CYTabBarDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // CYTabBarDemo
4 | //
5 | // Created by 张春雨 on 2017/3/12.
6 | // Copyright © 2017年 张春雨. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "ViewController.h"
11 | #import "ViewController2.h"
12 | #import "CYTabBarController.h"
13 |
14 | @interface AppDelegate ()
15 |
16 | @end
17 |
18 | @implementation AppDelegate
19 |
20 |
21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
22 | self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen]bounds]];
23 | CYTabBarController * tabbar = [[CYTabBarController alloc]init];
24 |
25 | /**
26 | * style 1 (中间按钮突出 , 设为按钮 , 底部有文字 , 闲鱼)
27 | */
28 | UINavigationController *nav1 = [[UINavigationController alloc]initWithRootViewController:[ViewController new]];
29 | [tabbar addChildController:nav1 title:@"发现" imageName:@"Btn01" selectedImageName:@"SelectBtn01"];
30 | UINavigationController *nav2 = [[UINavigationController alloc]initWithRootViewController:[ViewController2 new]];
31 | [tabbar addChildController:nav2 title:@"我的" imageName:@"Btn02" selectedImageName:@"SelectBtn02"];
32 | [tabbar addCenterController:nil bulge:YES title:@"发布" imageName:@"post_normal" selectedImageName:@"bc"];
33 |
34 |
35 |
36 | /**
37 | * style 2 (中间按钮不突出 , 设为控制器 ,底部无文字 , 微博)
38 | */
39 | // UINavigationController *nav1 = [[UINavigationController alloc]initWithRootViewController:[ViewController new]];
40 | // [tabbar addChildController:nav1 title:@"消息" imageName:@"tabbar_mainframe" selectedImageName:@"tabbar_mainframeHL"];
41 | // UINavigationController *nav2 = [[UINavigationController alloc]initWithRootViewController:[ViewController new]];
42 | // [tabbar addChildController:nav2 title:@"朋友圈" imageName:@"tabbar_discover" selectedImageName:@"tabbar_discoverHL"];
43 | // [tabbar addCenterController:[ViewController2 new] bulge:NO title:nil imageName:@"tabbar_centerplus_selected" selectedImageName:@"tabbar_centerplus_selected"];
44 | // tabbar.tabbar.selectedTextColor = [UIColor colorWithRed:86/255.0 green:149/255.0 blue:216/255.0 alpha:1];
45 |
46 |
47 |
48 |
49 | /**
50 | * style 3 (无中间按钮 ,普通样式)
51 | */
52 | // UINavigationController *nav1 = [[UINavigationController alloc]initWithRootViewController:[ViewController new]];
53 | // [tabbar addChildController:nav1 title:@"消息" imageName:@"tabbar_mainframe" selectedImageName:@"tabbar_mainframeHL"];
54 | // UINavigationController *nav2 = [[UINavigationController alloc]initWithRootViewController:[ViewController new]];
55 | // [tabbar addChildController:nav2 title:@"朋友圈" imageName:@"tabbar_discover" selectedImageName:@"tabbar_discoverHL"];
56 |
57 |
58 | self.window.rootViewController = tabbar;
59 | [self.window makeKeyAndVisible];
60 | return YES;
61 | }
62 |
63 |
64 | - (void)applicationWillResignActive:(UIApplication *)application {
65 | // 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.
66 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
67 | }
68 |
69 |
70 | - (void)applicationDidEnterBackground:(UIApplication *)application {
71 | // 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.
72 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
73 | }
74 |
75 |
76 | - (void)applicationWillEnterForeground:(UIApplication *)application {
77 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
78 | }
79 |
80 |
81 | - (void)applicationDidBecomeActive:(UIApplication *)application {
82 | // 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.
83 | }
84 |
85 |
86 | - (void)applicationWillTerminate:(UIApplication *)application {
87 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
88 | }
89 |
90 |
91 | @end
92 |
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CYTabBarController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CYTabBarController.m
3 | // 蚁巢
4 | //
5 | // Created by 张春雨 on 2016/11/17.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import "CYTabBarController.h"
10 |
11 | @interface CYTabBarController ()
12 | /** center button of place ( -1:none center button >=0:contain center button) */
13 | @property(assign , nonatomic) NSInteger centerPlace;
14 | /** Whether center button to bulge */
15 | @property(assign , nonatomic,getter=is_bulge) BOOL bulge;
16 | /** items */
17 | @property (nonatomic,strong) NSMutableArray *items;
18 | @end
19 |
20 | @implementation CYTabBarController{int tabBarItemTag;BOOL firstInit;}
21 |
22 | - (void)viewDidLoad {
23 | [super viewDidLoad];
24 | self.centerPlace = -1;
25 | }
26 |
27 | /**
28 | * Initialize selected
29 | */
30 | - (void)viewWillAppear:(BOOL)animated{
31 | [super viewWillAppear:animated];
32 |
33 | if (!firstInit)
34 | {
35 | firstInit = YES;
36 | if (self.centerPlace != -1 && self.items[self.centerPlace].tag != -1){
37 | self.selectedIndex = self.centerPlace;
38 | }else{
39 | self.selectedIndex = 0;
40 | }
41 | [self.tabbar setValue:[NSNumber numberWithInteger:self.selectedIndex] forKey:@"selectButtoIndex"];
42 | }
43 | }
44 |
45 | /**
46 | * Add other button for child’s controller
47 | */
48 | - (void)addChildController:(id)Controller title:(NSString *)title imageName:(NSString *)imageName selectedImageName:(NSString *)selectedImageName{
49 | UIViewController *vc = [self findViewControllerWithobject:Controller];
50 | vc.tabBarItem.title = title;
51 | vc.tabBarItem.image = [UIImage imageNamed:imageName];
52 | vc.tabBarItem.selectedImage = [UIImage imageNamed:selectedImageName];
53 |
54 | vc.tabBarItem.tag = tabBarItemTag++;
55 | [self.items addObject:vc.tabBarItem];
56 | [self addChildViewController:Controller];
57 | }
58 |
59 | /**
60 | * Add center button
61 | */
62 | - (void)addCenterController:(id)Controller bulge:(BOOL)bulge title:(NSString *)title imageName:(NSString *)imageName selectedImageName:(NSString *)selectedImageName{
63 | _bulge = bulge;
64 | if (Controller) {
65 | [self addChildController:Controller title:title imageName:imageName selectedImageName:selectedImageName];
66 | self.centerPlace = tabBarItemTag-1;
67 | }else{
68 | UITabBarItem *item = [[UITabBarItem alloc]initWithTitle:title
69 | image:[UIImage imageNamed:imageName]
70 | selectedImage:[UIImage imageNamed:selectedImageName]];
71 | item.tag = -1;
72 | [self.items addObject:item];
73 | self.centerPlace = tabBarItemTag;
74 | }
75 | }
76 |
77 |
78 | /**
79 | * getter
80 | */
81 | - (CustomTabBar *)tabbar{
82 | if (!_tabbar && self.items.count) {
83 | _tabbar = [[CustomTabBar alloc]initWithFrame:self.tabBar.frame];
84 | [_tabbar setValue:[NSNumber numberWithBool:self.bulge] forKey:@"bulge"];
85 | [_tabbar setValue:self forKey:@"controller"];
86 | [_tabbar setValue:[NSNumber numberWithInteger:self.centerPlace] forKey:@"centerPlace"];
87 | _tabbar.items = self.items;
88 |
89 | //remove tabBar
90 | for (UIView *loop in self.tabBar.subviews) {
91 | [loop removeFromSuperview];
92 | }
93 | self.tabBar.hidden = YES;
94 | [self.tabBar removeFromSuperview];
95 | }
96 | return _tabbar;
97 | }
98 | - (NSMutableArray *)items{
99 | if(!_items){
100 | _items = [NSMutableArray array];
101 | }
102 | return _items;
103 | }
104 |
105 |
106 | /**
107 | * Update current select controller
108 | */
109 | - (void)setSelectedIndex:(NSUInteger)selectedIndex{
110 | if (selectedIndex >= self.viewControllers.count){
111 | @throw [NSException exceptionWithName:@"selectedTabbarError"
112 | reason:@"Don't have the controller can be used, index beyond the viewControllers."
113 | userInfo:nil];
114 | }
115 | [super setSelectedIndex:selectedIndex];
116 | UIViewController *viewController = [self findViewControllerWithobject:self.viewControllers[selectedIndex]];
117 | [self.tabbar removeFromSuperview];
118 | [viewController.view addSubview:self.tabbar];
119 | }
120 |
121 |
122 |
123 | /**
124 | * Catch viewController
125 | */
126 | - (UIViewController *)findViewControllerWithobject:(id)object{
127 | while ([object isKindOfClass:[UITabBarController class]] || [object isKindOfClass:[UINavigationController class]]){
128 | object = ((UITabBarController *)object).viewControllers.firstObject;
129 | }
130 | return object;
131 | }
132 |
133 | - (void)didReceiveMemoryWarning{
134 | [super didReceiveMemoryWarning];
135 | }
136 |
137 | @end
138 |
--------------------------------------------------------------------------------
/CYTabBarDemo/PublishAnimate/PlusAnimate.m:
--------------------------------------------------------------------------------
1 | //
2 | // PublishAnimate.m
3 | // ZCYTabBar
4 | //
5 | // Created by 张春雨 on 16/8/17.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import "PlusAnimate.h"
10 | #define W [UIScreen mainScreen].bounds.size.width
11 | #define H [UIScreen mainScreen].bounds.size.height
12 | #define CenterPoint CGPointMake(W/2 ,H-38.347785)
13 | #define bl [[UIScreen mainScreen]bounds].size.width/375
14 | #define Color(r, g, b , a) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
15 |
16 | @interface PlusAnimate()
17 | //center button
18 | @property (strong , nonatomic) UIButton* CenterBtn;
19 | //other function button
20 | @property (strong , nonatomic) NSMutableArray* BtnItem;
21 | @property (strong , nonatomic) NSMutableArray* BtnItemTitle;
22 | /** rect */
23 | @property (nonatomic,assign) CGRect rect;
24 | @end
25 |
26 | @implementation PlusAnimate
27 |
28 | /**
29 | * show view
30 | */
31 | + (PlusAnimate *)standardPublishAnimateWithView:(UIView *)view{
32 | PlusAnimate * animateView = [[PlusAnimate alloc]init];
33 | UIWindow *keyWindow = [UIApplication sharedApplication].keyWindow;
34 | [keyWindow addSubview:animateView];
35 | CGRect rect = [animateView convertRect:view.frame fromView:view.superview];
36 | rect.origin.y += 5;
37 | animateView.rect = rect;
38 |
39 | //Add button
40 | [animateView CrentBtnImageName:@"post_animate_camera" Title:@"拍照" tag:0];
41 | [animateView CrentBtnImageName:@"post_animate_album" Title:@"相册" tag:1];
42 | [animateView CrentBtnImageName:@"post_animate_akey" Title:@"一键转卖" tag:2];
43 | //Add center button
44 | [animateView CrentCenterBtnImageName:@"post_animate_add" tag:3];
45 | //Do animation
46 | [animateView AnimateBegin];
47 | return animateView;
48 | }
49 |
50 | - (instancetype)init{
51 | self = [super init];
52 | if (self)
53 | {
54 | self.frame = [[UIScreen mainScreen]bounds];
55 | self.backgroundColor =[[UIColor blackColor]colorWithAlphaComponent:0.2];
56 |
57 | UIBlurEffect *blurEffect=[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark];
58 | UIVisualEffectView *visualEffectView=[[UIVisualEffectView alloc]initWithEffect:blurEffect];
59 | [visualEffectView setFrame:self.bounds];
60 | [self addSubview:visualEffectView];
61 |
62 | }
63 | return self;
64 | }
65 |
66 | /**
67 | * creat button
68 | */
69 | - (void)CrentBtnImageName:(NSString *)ImageName Title:(NSString *)Title tag:(int)tag{
70 | if (_BtnItem.count >= 3) return;
71 | UIButton * btn = [[UIButton alloc]initWithFrame:self.rect];
72 | btn.tag = tag;
73 | [btn setImage:[UIImage imageNamed:ImageName] forState:UIControlStateNormal];
74 | [btn addTarget:self action:@selector(BtnClick:) forControlEvents:UIControlEventTouchUpInside];
75 |
76 | [self addSubview:btn];
77 | [self.BtnItem addObject:btn];
78 | [self.BtnItemTitle addObject:[self CrenterBtnTitle:Title]];
79 | }
80 |
81 | /**
82 | * creat center button
83 | */
84 | - (void)CrentCenterBtnImageName:(NSString *)ImageName tag:(int)tag{
85 | _CenterBtn = [[UIButton alloc]initWithFrame:self.rect];
86 | [_CenterBtn setImage:[UIImage imageNamed:ImageName] forState:UIControlStateNormal];
87 | [_CenterBtn addTarget:self action:@selector(cancelAnimation) forControlEvents:UIControlEventTouchUpInside];
88 | _CenterBtn.tag = tag;
89 | [self addSubview:_CenterBtn];
90 | }
91 |
92 | /**
93 | * getter
94 | */
95 | - (NSMutableArray *)BtnItem{
96 | if (!_BtnItem) {
97 | _BtnItem = [NSMutableArray array];
98 | }
99 | return _BtnItem;
100 | }
101 | - (NSMutableArray *)BtnItemTitle{
102 | if (!_BtnItemTitle) {
103 | _BtnItemTitle = [NSMutableArray array];
104 | }
105 | return _BtnItemTitle;
106 | }
107 | - (UILabel *)CrenterBtnTitle:(NSString *)Title{
108 | UILabel * lab = [[UILabel alloc]init];
109 | lab.textColor = Color(240, 240, 240,1);
110 | lab.font = [UIFont italicSystemFontOfSize:13.5*bl];
111 | lab.textAlignment = NSTextAlignmentCenter;
112 | lab.text = Title;
113 | [self addSubview:lab];
114 | return lab;
115 | }
116 |
117 | /**
118 | * remove view and notice the selectIndex
119 | */
120 | - (void)removeView:(UIButton*)btn{
121 | [self removeFromSuperview];
122 | [self.delegate didSelectBtnWithBtnTag:btn.tag];
123 | }
124 |
125 | /**
126 | * click other space to cancle
127 | */
128 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
129 | [self cancelAnimation];
130 | }
131 |
132 | /**
133 | * button click
134 | */
135 | - (void)BtnClick:(UIButton*)btn{
136 | NSLog(@"%ld click",(long)btn.tag);
137 | [self.delegate didSelectBtnWithBtnTag:btn.tag];
138 | [self removeFromSuperview];
139 | }
140 |
141 |
142 | /**
143 | * Do animation
144 | */
145 | - (void)AnimateBegin{
146 | //centet button rotation
147 | [UIView animateWithDuration:0.2 animations:^{
148 | _CenterBtn.transform = CGAffineTransformMakeRotation(-M_PI_4-M_LOG10E);
149 | }completion:^(BOOL finished) {
150 | [UIView animateWithDuration:0.15 animations:^{
151 | _CenterBtn.transform = CGAffineTransformMakeRotation(-M_PI_4+M_LOG10E);
152 | }completion:^(BOOL finished) {
153 | [UIView animateWithDuration:0.15 animations:^{
154 | _CenterBtn.transform = CGAffineTransformMakeRotation(-M_PI_4);
155 | }];
156 | }];
157 | }];
158 |
159 |
160 | __block int i = 0 , k = 0;
161 | for (UIView * btn in _BtnItem) {
162 | //rotation
163 | [UIView animateWithDuration:0.7 delay:i*0.14 usingSpringWithDamping:0.46 initialSpringVelocity:0 options:UIViewAnimationOptionAllowUserInteraction animations:^{
164 | btn.transform = CGAffineTransformScale(btn.transform, 1.2734*bl, 1.2734*bl);//缩放
165 | btn.center = CGPointMake((74+i++*113)*bl, self.frame.size.height-165*bl);
166 |
167 | } completion:nil];
168 |
169 | //move
170 | [UIView animateWithDuration:0.2 delay:i*0.1 options:UIViewAnimationOptionTransitionNone animations:^{
171 | btn.transform = CGAffineTransformRotate (btn.transform, -M_2_PI);
172 | } completion:^(BOOL finished) {
173 | [UIView animateWithDuration:0.15 delay:0 options:UIViewAnimationOptionTransitionNone animations:^{
174 | btn.transform = CGAffineTransformRotate (btn.transform, M_2_PI+M_LOG10E);
175 | } completion:^(BOOL finished) {
176 | [UIView animateWithDuration:0.1 delay:0 options:UIViewAnimationOptionTransitionNone animations:^{
177 | btn.transform = CGAffineTransformRotate (btn.transform, -M_LOG10E);
178 | } completion:^(BOOL finished) {
179 | UILabel * lab = (UILabel *)_BtnItemTitle[k++];
180 | lab.frame = CGRectMake(0, 0, W/3-30, 30);
181 | lab.center = CGPointMake(btn.center.x, CGRectGetMaxY(btn.frame)+20);
182 | }];
183 | }];
184 | }];
185 | }
186 |
187 |
188 | }
189 |
190 |
191 | /**
192 | * Cancle animation
193 | */
194 | - (void)cancelAnimation{
195 | //rotation
196 | [UIView animateWithDuration:0.15 animations:^{
197 | _CenterBtn.transform = CGAffineTransformIdentity;
198 | }completion:^(BOOL finished) {
199 | //move
200 | int n = (int)_BtnItem.count;
201 | for (int i = n-1; i>=0; i--){
202 | UIButton *btn = _BtnItem[i];
203 | [UIButton animateWithDuration:0.25 delay:0.1*(n-i) options:UIViewAnimationOptionTransitionCurlDown animations:^{
204 | btn.center = CGPointMake(W/2 ,H-43.052385);
205 | btn.transform = CGAffineTransformMakeScale(1, 1);
206 | btn.transform = CGAffineTransformRotate(btn.transform, -M_PI_4);
207 |
208 | UILabel * lab = (UILabel *)_BtnItemTitle[i];
209 | [lab removeFromSuperview];
210 | } completion:^(BOOL finished) {
211 | [btn removeFromSuperview];
212 | if (i==0) {
213 | [self removeFromSuperview];
214 | }
215 | }];
216 | }
217 | }];
218 |
219 | }
220 |
221 |
222 | @end
223 |
--------------------------------------------------------------------------------
/CYTabBarDemo/CYTabBar/CustomTabBar.m:
--------------------------------------------------------------------------------
1 | //
2 | // CYTabBar.m
3 | // 蚁巢
4 | //
5 | // Created by 张春雨 on 2016/11/17.
6 | // Copyright © 2016年 张春雨. All rights reserved.
7 | //
8 |
9 | #import "CustomTabBar.h"
10 | #import "CYButton.h"
11 | #import "CYCenterButton.h"
12 | #import "PlusAnimate.h"
13 |
14 | @interface CustomTabBar ()
15 | /** selctButton */
16 | @property (weak , nonatomic) CYButton *selButton;
17 | /** center button of place */
18 | @property(assign , nonatomic) NSInteger centerPlace;
19 | /** Whether center button to bulge */
20 | @property(assign , nonatomic,getter=is_bulge) BOOL bulge;
21 | /** tabBarController */
22 | @property (weak , nonatomic) UITabBarController *controller;
23 | /** border */
24 | @property (nonatomic,weak) CAShapeLayer *border;
25 | @end
26 |
27 | @implementation CustomTabBar
28 | - (instancetype)initWithFrame:(CGRect)frame
29 | {
30 | self = [super initWithFrame:frame];
31 | if (self) {
32 | self.btnArr = [NSMutableArray array];
33 | //Set backgroundColor color
34 | self.backgroundColor = [UIColor whiteColor];
35 | }
36 | return self;
37 | }
38 |
39 | /**
40 | * Set items
41 | */
42 | - (void)setItems:(NSArray *)items{
43 | _items = items;
44 | for (int i=0; i *)change context:(void *)context
221 | {
222 | if ([keyPath isEqualToString:@"badgeValue"] || [keyPath isEqualToString:@"badgeColor"]) {
223 | CYButton *btn = (__bridge CYButton *)(context);
224 | btn.item = (UITabBarItem*)object;
225 | }
226 | }
227 |
228 | /**
229 | * Remove observer
230 | */
231 | - (void)dealloc{
232 | for (int i=0; i i ? 0 : 1;
237 | i+n;});
238 | [self.items[index] removeObserver:self
239 | forKeyPath:@"badgeValue"
240 | context:(__bridge void * _Nullable)(self.btnArr[i])];
241 | [self.items[index] removeObserver:self
242 | forKeyPath:@"badgeColor"
243 | context:(__bridge void * _Nullable)(self.btnArr[i])];
244 | }
245 | }
246 |
247 | @end
248 |
--------------------------------------------------------------------------------
/CYTabBarDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 24225ADD1E75A7FC00B242A7 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 24225ADC1E75A7FC00B242A7 /* main.m */; };
11 | 24225AE01E75A7FC00B242A7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 24225ADF1E75A7FC00B242A7 /* AppDelegate.m */; };
12 | 24225AE31E75A7FC00B242A7 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24225AE21E75A7FC00B242A7 /* ViewController.m */; };
13 | 24225AE81E75A7FC00B242A7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 24225AE71E75A7FC00B242A7 /* Assets.xcassets */; };
14 | 24225AEB1E75A7FC00B242A7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 24225AE91E75A7FC00B242A7 /* LaunchScreen.storyboard */; };
15 | 24225B091E75A80500B242A7 /* PlusAnimate.m in Sources */ = {isa = PBXBuildFile; fileRef = 24225B011E75A80500B242A7 /* PlusAnimate.m */; };
16 | 24225B0D1E75A86F00B242A7 /* ViewController2.m in Sources */ = {isa = PBXBuildFile; fileRef = 24225B0B1E75A86F00B242A7 /* ViewController2.m */; };
17 | 2440AC6B1E8BA98F005FE3B2 /* show.png in Resources */ = {isa = PBXBuildFile; fileRef = 2440AC6A1E8BA98F005FE3B2 /* show.png */; };
18 | 24E92FFD1E7AAA87001EF71B /* CustomTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E92FF31E7AAA87001EF71B /* CustomTabBar.m */; };
19 | 24E92FFE1E7AAA87001EF71B /* CYBadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E92FF51E7AAA87001EF71B /* CYBadgeView.m */; };
20 | 24E92FFF1E7AAA87001EF71B /* CYButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E92FF71E7AAA87001EF71B /* CYButton.m */; };
21 | 24E930001E7AAA87001EF71B /* CYCenterButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E92FF91E7AAA87001EF71B /* CYCenterButton.m */; };
22 | 24E930011E7AAA87001EF71B /* CYTabBar.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 24E92FFA1E7AAA87001EF71B /* CYTabBar.bundle */; };
23 | 24E930021E7AAA87001EF71B /* CYTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 24E92FFC1E7AAA87001EF71B /* CYTabBarController.m */; };
24 | /* End PBXBuildFile section */
25 |
26 | /* Begin PBXFileReference section */
27 | 24225AD81E75A7FC00B242A7 /* CYTabBarDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CYTabBarDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
28 | 24225ADC1E75A7FC00B242A7 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
29 | 24225ADE1E75A7FC00B242A7 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
30 | 24225ADF1E75A7FC00B242A7 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
31 | 24225AE11E75A7FC00B242A7 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
32 | 24225AE21E75A7FC00B242A7 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
33 | 24225AE71E75A7FC00B242A7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
34 | 24225AEA1E75A7FC00B242A7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
35 | 24225AEC1E75A7FC00B242A7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
36 | 24225B001E75A80500B242A7 /* PlusAnimate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlusAnimate.h; sourceTree = ""; };
37 | 24225B011E75A80500B242A7 /* PlusAnimate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlusAnimate.m; sourceTree = ""; };
38 | 24225B0A1E75A86F00B242A7 /* ViewController2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController2.h; sourceTree = ""; };
39 | 24225B0B1E75A86F00B242A7 /* ViewController2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController2.m; sourceTree = ""; };
40 | 2440AC6A1E8BA98F005FE3B2 /* show.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = show.png; sourceTree = ""; };
41 | 24E92FF21E7AAA87001EF71B /* CustomTabBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomTabBar.h; sourceTree = ""; };
42 | 24E92FF31E7AAA87001EF71B /* CustomTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomTabBar.m; sourceTree = ""; };
43 | 24E92FF41E7AAA87001EF71B /* CYBadgeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CYBadgeView.h; sourceTree = ""; };
44 | 24E92FF51E7AAA87001EF71B /* CYBadgeView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CYBadgeView.m; sourceTree = ""; };
45 | 24E92FF61E7AAA87001EF71B /* CYButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CYButton.h; sourceTree = ""; };
46 | 24E92FF71E7AAA87001EF71B /* CYButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CYButton.m; sourceTree = ""; };
47 | 24E92FF81E7AAA87001EF71B /* CYCenterButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CYCenterButton.h; sourceTree = ""; };
48 | 24E92FF91E7AAA87001EF71B /* CYCenterButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CYCenterButton.m; sourceTree = ""; };
49 | 24E92FFA1E7AAA87001EF71B /* CYTabBar.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = CYTabBar.bundle; sourceTree = ""; };
50 | 24E92FFB1E7AAA87001EF71B /* CYTabBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CYTabBarController.h; sourceTree = ""; };
51 | 24E92FFC1E7AAA87001EF71B /* CYTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CYTabBarController.m; sourceTree = ""; };
52 | /* End PBXFileReference section */
53 |
54 | /* Begin PBXFrameworksBuildPhase section */
55 | 24225AD51E75A7FC00B242A7 /* Frameworks */ = {
56 | isa = PBXFrameworksBuildPhase;
57 | buildActionMask = 2147483647;
58 | files = (
59 | );
60 | runOnlyForDeploymentPostprocessing = 0;
61 | };
62 | /* End PBXFrameworksBuildPhase section */
63 |
64 | /* Begin PBXGroup section */
65 | 24225ACF1E75A7FC00B242A7 = {
66 | isa = PBXGroup;
67 | children = (
68 | 24225ADA1E75A7FC00B242A7 /* CYTabBarDemo */,
69 | 24225AD91E75A7FC00B242A7 /* Products */,
70 | );
71 | sourceTree = "";
72 | };
73 | 24225AD91E75A7FC00B242A7 /* Products */ = {
74 | isa = PBXGroup;
75 | children = (
76 | 24225AD81E75A7FC00B242A7 /* CYTabBarDemo.app */,
77 | );
78 | name = Products;
79 | sourceTree = "";
80 | };
81 | 24225ADA1E75A7FC00B242A7 /* CYTabBarDemo */ = {
82 | isa = PBXGroup;
83 | children = (
84 | 24E92FF11E7AAA87001EF71B /* CYTabBar */,
85 | 24225AFE1E75A80500B242A7 /* PublishAnimate */,
86 | 24225ADE1E75A7FC00B242A7 /* AppDelegate.h */,
87 | 24225ADF1E75A7FC00B242A7 /* AppDelegate.m */,
88 | 24225AE11E75A7FC00B242A7 /* ViewController.h */,
89 | 24225AE21E75A7FC00B242A7 /* ViewController.m */,
90 | 24225B0A1E75A86F00B242A7 /* ViewController2.h */,
91 | 24225B0B1E75A86F00B242A7 /* ViewController2.m */,
92 | 24225AE71E75A7FC00B242A7 /* Assets.xcassets */,
93 | 24225AE91E75A7FC00B242A7 /* LaunchScreen.storyboard */,
94 | 24225AEC1E75A7FC00B242A7 /* Info.plist */,
95 | 2440AC6A1E8BA98F005FE3B2 /* show.png */,
96 | 24225ADB1E75A7FC00B242A7 /* Supporting Files */,
97 | );
98 | path = CYTabBarDemo;
99 | sourceTree = "";
100 | };
101 | 24225ADB1E75A7FC00B242A7 /* Supporting Files */ = {
102 | isa = PBXGroup;
103 | children = (
104 | 24225ADC1E75A7FC00B242A7 /* main.m */,
105 | );
106 | name = "Supporting Files";
107 | sourceTree = "";
108 | };
109 | 24225AFE1E75A80500B242A7 /* PublishAnimate */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 24225B001E75A80500B242A7 /* PlusAnimate.h */,
113 | 24225B011E75A80500B242A7 /* PlusAnimate.m */,
114 | );
115 | path = PublishAnimate;
116 | sourceTree = "";
117 | };
118 | 24E92FF11E7AAA87001EF71B /* CYTabBar */ = {
119 | isa = PBXGroup;
120 | children = (
121 | 24E92FF21E7AAA87001EF71B /* CustomTabBar.h */,
122 | 24E92FF31E7AAA87001EF71B /* CustomTabBar.m */,
123 | 24E92FF41E7AAA87001EF71B /* CYBadgeView.h */,
124 | 24E92FF51E7AAA87001EF71B /* CYBadgeView.m */,
125 | 24E92FF61E7AAA87001EF71B /* CYButton.h */,
126 | 24E92FF71E7AAA87001EF71B /* CYButton.m */,
127 | 24E92FF81E7AAA87001EF71B /* CYCenterButton.h */,
128 | 24E92FF91E7AAA87001EF71B /* CYCenterButton.m */,
129 | 24E92FFA1E7AAA87001EF71B /* CYTabBar.bundle */,
130 | 24E92FFB1E7AAA87001EF71B /* CYTabBarController.h */,
131 | 24E92FFC1E7AAA87001EF71B /* CYTabBarController.m */,
132 | );
133 | path = CYTabBar;
134 | sourceTree = "";
135 | };
136 | /* End PBXGroup section */
137 |
138 | /* Begin PBXNativeTarget section */
139 | 24225AD71E75A7FC00B242A7 /* CYTabBarDemo */ = {
140 | isa = PBXNativeTarget;
141 | buildConfigurationList = 24225AEF1E75A7FC00B242A7 /* Build configuration list for PBXNativeTarget "CYTabBarDemo" */;
142 | buildPhases = (
143 | 24225AD41E75A7FC00B242A7 /* Sources */,
144 | 24225AD51E75A7FC00B242A7 /* Frameworks */,
145 | 24225AD61E75A7FC00B242A7 /* Resources */,
146 | );
147 | buildRules = (
148 | );
149 | dependencies = (
150 | );
151 | name = CYTabBarDemo;
152 | productName = CYTabBarDemo;
153 | productReference = 24225AD81E75A7FC00B242A7 /* CYTabBarDemo.app */;
154 | productType = "com.apple.product-type.application";
155 | };
156 | /* End PBXNativeTarget section */
157 |
158 | /* Begin PBXProject section */
159 | 24225AD01E75A7FC00B242A7 /* Project object */ = {
160 | isa = PBXProject;
161 | attributes = {
162 | LastUpgradeCheck = 0820;
163 | ORGANIZATIONNAME = "张春雨";
164 | TargetAttributes = {
165 | 24225AD71E75A7FC00B242A7 = {
166 | CreatedOnToolsVersion = 8.2.1;
167 | DevelopmentTeam = R77KAS4JTD;
168 | ProvisioningStyle = Automatic;
169 | };
170 | };
171 | };
172 | buildConfigurationList = 24225AD31E75A7FC00B242A7 /* Build configuration list for PBXProject "CYTabBarDemo" */;
173 | compatibilityVersion = "Xcode 3.2";
174 | developmentRegion = English;
175 | hasScannedForEncodings = 0;
176 | knownRegions = (
177 | en,
178 | Base,
179 | );
180 | mainGroup = 24225ACF1E75A7FC00B242A7;
181 | productRefGroup = 24225AD91E75A7FC00B242A7 /* Products */;
182 | projectDirPath = "";
183 | projectRoot = "";
184 | targets = (
185 | 24225AD71E75A7FC00B242A7 /* CYTabBarDemo */,
186 | );
187 | };
188 | /* End PBXProject section */
189 |
190 | /* Begin PBXResourcesBuildPhase section */
191 | 24225AD61E75A7FC00B242A7 /* Resources */ = {
192 | isa = PBXResourcesBuildPhase;
193 | buildActionMask = 2147483647;
194 | files = (
195 | 2440AC6B1E8BA98F005FE3B2 /* show.png in Resources */,
196 | 24225AEB1E75A7FC00B242A7 /* LaunchScreen.storyboard in Resources */,
197 | 24E930011E7AAA87001EF71B /* CYTabBar.bundle in Resources */,
198 | 24225AE81E75A7FC00B242A7 /* Assets.xcassets in Resources */,
199 | );
200 | runOnlyForDeploymentPostprocessing = 0;
201 | };
202 | /* End PBXResourcesBuildPhase section */
203 |
204 | /* Begin PBXSourcesBuildPhase section */
205 | 24225AD41E75A7FC00B242A7 /* Sources */ = {
206 | isa = PBXSourcesBuildPhase;
207 | buildActionMask = 2147483647;
208 | files = (
209 | 24225AE31E75A7FC00B242A7 /* ViewController.m in Sources */,
210 | 24225AE01E75A7FC00B242A7 /* AppDelegate.m in Sources */,
211 | 24E92FFD1E7AAA87001EF71B /* CustomTabBar.m in Sources */,
212 | 24E930001E7AAA87001EF71B /* CYCenterButton.m in Sources */,
213 | 24225ADD1E75A7FC00B242A7 /* main.m in Sources */,
214 | 24225B0D1E75A86F00B242A7 /* ViewController2.m in Sources */,
215 | 24E92FFF1E7AAA87001EF71B /* CYButton.m in Sources */,
216 | 24E930021E7AAA87001EF71B /* CYTabBarController.m in Sources */,
217 | 24225B091E75A80500B242A7 /* PlusAnimate.m in Sources */,
218 | 24E92FFE1E7AAA87001EF71B /* CYBadgeView.m in Sources */,
219 | );
220 | runOnlyForDeploymentPostprocessing = 0;
221 | };
222 | /* End PBXSourcesBuildPhase section */
223 |
224 | /* Begin PBXVariantGroup section */
225 | 24225AE91E75A7FC00B242A7 /* LaunchScreen.storyboard */ = {
226 | isa = PBXVariantGroup;
227 | children = (
228 | 24225AEA1E75A7FC00B242A7 /* Base */,
229 | );
230 | name = LaunchScreen.storyboard;
231 | sourceTree = "";
232 | };
233 | /* End PBXVariantGroup section */
234 |
235 | /* Begin XCBuildConfiguration section */
236 | 24225AED1E75A7FC00B242A7 /* Debug */ = {
237 | isa = XCBuildConfiguration;
238 | buildSettings = {
239 | ALWAYS_SEARCH_USER_PATHS = NO;
240 | CLANG_ANALYZER_NONNULL = YES;
241 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
242 | CLANG_CXX_LIBRARY = "libc++";
243 | CLANG_ENABLE_MODULES = YES;
244 | CLANG_ENABLE_OBJC_ARC = YES;
245 | CLANG_WARN_BOOL_CONVERSION = YES;
246 | CLANG_WARN_CONSTANT_CONVERSION = YES;
247 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
248 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
249 | CLANG_WARN_EMPTY_BODY = YES;
250 | CLANG_WARN_ENUM_CONVERSION = YES;
251 | CLANG_WARN_INFINITE_RECURSION = YES;
252 | CLANG_WARN_INT_CONVERSION = YES;
253 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
254 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
255 | CLANG_WARN_UNREACHABLE_CODE = YES;
256 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
257 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
258 | COPY_PHASE_STRIP = NO;
259 | DEBUG_INFORMATION_FORMAT = dwarf;
260 | ENABLE_STRICT_OBJC_MSGSEND = YES;
261 | ENABLE_TESTABILITY = YES;
262 | GCC_C_LANGUAGE_STANDARD = gnu99;
263 | GCC_DYNAMIC_NO_PIC = NO;
264 | GCC_NO_COMMON_BLOCKS = YES;
265 | GCC_OPTIMIZATION_LEVEL = 0;
266 | GCC_PREPROCESSOR_DEFINITIONS = (
267 | "DEBUG=1",
268 | "$(inherited)",
269 | );
270 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
271 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
272 | GCC_WARN_UNDECLARED_SELECTOR = YES;
273 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
274 | GCC_WARN_UNUSED_FUNCTION = YES;
275 | GCC_WARN_UNUSED_VARIABLE = YES;
276 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
277 | MTL_ENABLE_DEBUG_INFO = YES;
278 | ONLY_ACTIVE_ARCH = YES;
279 | SDKROOT = iphoneos;
280 | };
281 | name = Debug;
282 | };
283 | 24225AEE1E75A7FC00B242A7 /* Release */ = {
284 | isa = XCBuildConfiguration;
285 | buildSettings = {
286 | ALWAYS_SEARCH_USER_PATHS = NO;
287 | CLANG_ANALYZER_NONNULL = YES;
288 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
289 | CLANG_CXX_LIBRARY = "libc++";
290 | CLANG_ENABLE_MODULES = YES;
291 | CLANG_ENABLE_OBJC_ARC = YES;
292 | CLANG_WARN_BOOL_CONVERSION = YES;
293 | CLANG_WARN_CONSTANT_CONVERSION = YES;
294 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
295 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
296 | CLANG_WARN_EMPTY_BODY = YES;
297 | CLANG_WARN_ENUM_CONVERSION = YES;
298 | CLANG_WARN_INFINITE_RECURSION = YES;
299 | CLANG_WARN_INT_CONVERSION = YES;
300 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
301 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
302 | CLANG_WARN_UNREACHABLE_CODE = YES;
303 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
304 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
305 | COPY_PHASE_STRIP = NO;
306 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
307 | ENABLE_NS_ASSERTIONS = NO;
308 | ENABLE_STRICT_OBJC_MSGSEND = YES;
309 | GCC_C_LANGUAGE_STANDARD = gnu99;
310 | GCC_NO_COMMON_BLOCKS = YES;
311 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
312 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
313 | GCC_WARN_UNDECLARED_SELECTOR = YES;
314 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
315 | GCC_WARN_UNUSED_FUNCTION = YES;
316 | GCC_WARN_UNUSED_VARIABLE = YES;
317 | IPHONEOS_DEPLOYMENT_TARGET = 10.2;
318 | MTL_ENABLE_DEBUG_INFO = NO;
319 | SDKROOT = iphoneos;
320 | VALIDATE_PRODUCT = YES;
321 | };
322 | name = Release;
323 | };
324 | 24225AF01E75A7FC00B242A7 /* Debug */ = {
325 | isa = XCBuildConfiguration;
326 | buildSettings = {
327 | DEVELOPMENT_TEAM = R77KAS4JTD;
328 | INFOPLIST_FILE = CYTabBarDemo/Info.plist;
329 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
330 | PRODUCT_BUNDLE_IDENTIFIER = ChunyuZhang.CYTabBarDemo;
331 | PRODUCT_NAME = "$(TARGET_NAME)";
332 | };
333 | name = Debug;
334 | };
335 | 24225AF11E75A7FC00B242A7 /* Release */ = {
336 | isa = XCBuildConfiguration;
337 | buildSettings = {
338 | DEVELOPMENT_TEAM = R77KAS4JTD;
339 | INFOPLIST_FILE = CYTabBarDemo/Info.plist;
340 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
341 | PRODUCT_BUNDLE_IDENTIFIER = ChunyuZhang.CYTabBarDemo;
342 | PRODUCT_NAME = "$(TARGET_NAME)";
343 | };
344 | name = Release;
345 | };
346 | /* End XCBuildConfiguration section */
347 |
348 | /* Begin XCConfigurationList section */
349 | 24225AD31E75A7FC00B242A7 /* Build configuration list for PBXProject "CYTabBarDemo" */ = {
350 | isa = XCConfigurationList;
351 | buildConfigurations = (
352 | 24225AED1E75A7FC00B242A7 /* Debug */,
353 | 24225AEE1E75A7FC00B242A7 /* Release */,
354 | );
355 | defaultConfigurationIsVisible = 0;
356 | defaultConfigurationName = Release;
357 | };
358 | 24225AEF1E75A7FC00B242A7 /* Build configuration list for PBXNativeTarget "CYTabBarDemo" */ = {
359 | isa = XCConfigurationList;
360 | buildConfigurations = (
361 | 24225AF01E75A7FC00B242A7 /* Debug */,
362 | 24225AF11E75A7FC00B242A7 /* Release */,
363 | );
364 | defaultConfigurationIsVisible = 0;
365 | defaultConfigurationName = Release;
366 | };
367 | /* End XCConfigurationList section */
368 | };
369 | rootObject = 24225AD01E75A7FC00B242A7 /* Project object */;
370 | }
371 |
--------------------------------------------------------------------------------