//
// Created by YeJian on 13-8-12.
// Copyright (c) 2013年 YeJian. All rights reserved.
//
#define SysNavbarHeight 44
#define DefaultStateBarColor [UIColor blackColor]
#define DefaultStateBarSytle UIBarStyleBlackOpaque
#import <UIKit/UIKit.h>
@interface Navbar : UINavigationBar
/**< 适用于ios7*/
@property (nonatomic,strong)UIColor *stateBarColor;/**< 默认black*/
@property (nonatomic,assign)UIBarStyle cusBarStyele;/**< 默认UIBarStyleBlackOpaque*/
- (void)setDefault;
@end
/**
* @brief 自定义barbuttonitem
*
* @param
* @return
*/
#define TitleFont 18
#define TitleColor [UIColor whiteColor]
#define BackgroundImage @"nav_bg_image.png"
#define BackItemImage @"back_bar_button.png"
#define ItemImage @"bar_button_item.png"
#define BackItemSelectedImage @"back_bar_button_s.png"
#define ItemSelectedImage @"bar_button_item_s.png"
#define BackItemOffset UIEdgeInsetsMake(0, 5, 0, 0)
#define ItemLeftMargin 10
#define ItemWidth 52
#define ItemHeight SysNavbarHeight
#define ItemTextFont 12
#define ItemTextNormalColot [UIColor whiteColor]
#define ItemTextSelectedColot [UIColor colorWithWhite:0.7 alpha:1]
typedef enum {
NavBarButtonItemTypeDefault = 0,
NavBarButtonItemTypeBack = 1
}NavBarButtonItemType;
@interface NavBarButtonItem : NSObject
@property (nonatomic,assign)NavBarButtonItemType itemType;
@property (nonatomic,strong)UIButton *button;
@property (nonatomic,strong)NSString *title;
@property (nonatomic,strong)NSString *image;
@property (nonatomic,strong)UIFont *font;
@property (nonatomic,strong)UIColor *normalColor;
@property (nonatomic,strong)UIColor *selectedColor;
@property (nonatomic,weak)id target;
@property (nonatomic,assign)SEL selector;
@property (nonatomic,assign)BOOL highlightedWhileSwitch;
- (id)initWithType:(NavBarButtonItemType)itemType;
+ (id)defauleItemWithTarget:(id)target
action:(SEL)action
title:(NSString *)title;
+ (id)defauleItemWithTarget:(id)target
action:(SEL)action
image:(NSString *)image;
+ (id)backItemWithTarget:(id)target
action:(SEL)action
title:(NSString *)title;
- (void)setTarget:(id)target withAction:(SEL)action;
@end
@interface UINavigationItem (CustomBarButtonItem)
- (void)setNewTitle:(NSString *)title;
- (void)setNewTitleImage:(UIImage *)image;
- (void)setLeftItemWithTarget:(id)target
action:(SEL)action
title:(NSString *)title;
- (void)setLeftItemWithTarget:(id)target
action:(SEL)action
image:(UIImage *)image;
- (void)setLeftItemWithButtonItem:(NavBarButtonItem *)item;
- (void)setRightItemWithTarget:(id)target
action:(SEL)action
title:(NSString *)title;
- (void)setRightItemWithTarget:(id)target
action:(SEL)action
image:(UIImage *)image;
- (void)setRightItemWithButtonItem:(NavBarButtonItem *)item;
- (void)setBackItemWithTarget:(id)target
action:(SEL)action;
- (void)setBackItemWithTarget:(id)target
action:(SEL)action
title:(NSString *)title;
@end
没有合适的资源?快使用搜索试试~ 我知道了~
IOS应用源码之ios适用于iOS 5、iOS 6和iOS 7的自定义NavigationBar.zip
共54个文件
png:15个
ds_store:8个
h:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 51 浏览量
2022-06-18
17:21:48
上传
评论
收藏 88KB ZIP 举报
温馨提示
IOS应用源码之ios适用于iOS 5、iOS 6和iOS 7的自定义NavigationBar.zip
资源推荐
资源详情
资源评论
收起资源包目录
IOS应用源码之ios适用于iOS 5、iOS 6和iOS 7的自定义NavigationBar.zip (54个子文件)
IOS应用源码之ios适用于iOS 5、iOS 6和iOS 7的自定义NavigationBar
__MACOSX
CustomNavBarTestForIOS5、6&7 2
._.DS_Store 82B
._CustomNavBarTest.xcodeproj 152B
customNavBarTest
._CustomNavBarTest.temp_caseinsensitive_rename-Prefix.pch 171B
._NavBarViewController.h 171B
._NavBarViewController.m 171B
._AppDelegate.h 171B
._.DS_Store 82B
._AppDelegate.m 171B
._ISIOS7.h 171B
Navbar
._Navbar.m 171B
._Navbar.h 171B
._.DS_Store 82B
toolbar
._.DS_Store 82B
en.lproj
._InfoPlist.strings 171B
._main.m 171B
CustomNavBarTestForIOS5、6&7 2
CustomNavBarTest.xcodeproj
project.xcworkspace
contents.xcworkspacedata 161B
xcuserdata
Jianye.xcuserdatad
WorkspaceSettings.xcsettings 332B
UserInterfaceState.xcuserstate 32KB
project.pbxproj 20KB
xcuserdata
Jianye.xcuserdatad
xcschemes
xcschememanagement.plist 488B
customNavBarTest.xcscheme 3KB
xcdebugger
Breakpoints_v2.xcbkptlist 91B
Breakpoints.xcbkptlist 91B
.DS_Store 6KB
customNavBarTest
main.m 340B
Default.png 6KB
CustomNavBarTest.temp_caseinsensitive_rename-Prefix.pch 2KB
NavBarViewController.h 231B
CustomNavBarTest.temp_caseinsensitive_rename-Info.plist 1KB
AppDelegate.h 281B
AppDelegate.m 3KB
Default-568h@2x.png 18KB
NavBarViewController.xib 12KB
.DS_Store 12KB
Default@2x.png 16KB
NavBarViewController.m 2KB
ISIOS7.h 451B
Navbar
.DS_Store 6KB
Navbar.h 3KB
toolbar
back_bar_button@2x.png 2KB
back_bar_button_s.png 833B
nav_bg_image.png 2KB
bar_button_item.png 906B
.DS_Store 6KB
bar_button_item_s.png 3KB
bar_button_item_s@2x.png 3KB
bar_button_item@2x.png 2KB
back_bar_button_s@2x.png 1KB
back_bar_button.png 911B
nav_bg_image@2x.png 1KB
more_icon.png 2KB
more_icon@2x.png 1KB
Navbar.m 11KB
en.lproj
InfoPlist.strings 45B
共 54 条
- 1
资源评论
qq_38220914
- 粉丝: 600
- 资源: 4313
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功