- 博客(7)
- 收藏
- 关注
原创 MD5 加密 Objective C
在Objective C中如何进行MD5加密,代码如下:#import "MyExtensions.h"#import // Need to import for CC_MD5 access@implementation NSString (MyExtensions)- (NSString *) md5{ const char *cStr = [self UTF8Strin
2012-05-25 17:07:35 5684
原创 自定义UINavigationBar的背景图片
对于iOS5.0以下可以使用以下办法:UINavigationBar+CustomImage.h#import @interface UINavigationBar (CustomImage)- (void)drawRect:(CGRect)rect;@endUINavigationBar+CustomImage.m#import "UINavigationBar+Cust
2012-05-14 09:08:08 2580
原创 关闭UITableView cell的被选中效果
可以使用以下任意一种办法cell.selectionStyle = UITableViewCellSelectionStyleNone;[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
2012-05-14 09:04:34 23586
原创 如何判断NSString是数值类型
#import intmain(int argc, char* argv[]){ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSLocale *l_en = [[NSLocale alloc] initWithLocaleIdentifier: @"en_US"]; NSLocale *l
2012-05-09 10:46:35 1502 1
原创 auto release pool 应该用release还是drain
文档里是这么说的:drainIn a reference-counted environment, releases and pops the receiver; in a garbage-collected environment, triggers garbage collection if the memory allocated since the last collect
2012-05-04 17:18:25 1736
原创 在[super dealloc]前释放对象
如题正确做法:- (void)dealloc { [viewController release]; [window release]; [super dealloc];}错误做法- (void)dealloc { [super dealloc]; [viewController release]; [window releas
2012-05-03 13:29:51 2528
原创 assign, copy, retain - 仔细看看怎么回事
用@property不就完了么,为啥要自己写Getter和Setter?有些时候需要在getter和setter方法中加入些特别的操作。最简单的getter和setter- (SomeVariable)someValue{ return someValue;}- (void)setSomeValue:(SomeVariable)aSomeVariableVa
2012-05-02 20:50:58 1842
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人