您的位置:首页 > 产品设计 > UI/UE

iphone-common-codes-ccteam源代码 CCUINavigationBar.m

2012-01-10 09:50 302 查看
//
//  CCUINavigationBar.m
//  CCFC
//
//  Created by xichen on 11-12-16.
//  Copyright 2011年 ccteam. All rights reserved.
//

#import "CCUINavigationBar.h"
#import "CCConfig.h"

// 如果你希望可以自定义UINavigationBar的显示,那么ENABLE_UINAVIGATION_BAR_REDRAW被设置成1,否则设置成0
#if ENABLE_UINAVIGATION_BAR_REDRAW

@implementation UINavigationBar (CustomImage)

// 自定义UINavigationBar的显示
- (void)drawRect:(CGRect)rect
{
UIImage *image = [UIImage imageNamed: @"header.png"]; // header.png是对应于应用程序中显示导航栏背景的图片
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}

@end

#endif


可能有更新:

googlecode链接地址:http://code.google.com/p/iphone-common-codes-ccteam/source/browse/trunk/CCFC/files/CCUINavigationBar.m

github地址: https://github.com/cxsjabc/iphone-common-codes-ccteam/tree/master/CCFC/files/CCUINavigationBar.m
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: