宏定义

#define DLOG( s, … ) NSLog(@"< %@: (%d) > %@",[[NSString stringWithUTF8String:FILE] lastPathComponent], LINE, [NSString stringWithFormat:(s), ##VA_ARGS])这个宏定义是用来在打印log的时候,调试使用,可以显示当前log所在的controlle……

阅读全文

Objective-c NSClassFromString 使用方法

NSClassFromString 是一个很有用的东西,尤其在进行 iPhone toolchain 的开发上。 正常来说, 和 是一样的。但是,如果你的程序中并不存在 MySpecialClass 这个类,下面的写法会出错,而上面的写法只是……

阅读全文

Objective-c NSClassFromString 使用方法

NSClassFromString 是一个很有用的东西,尤其在进行 iPhone toolchain 的开发上。 正常来说, id myObj = [[NSClassFromString(@"MySpecialClass") alloc] init]; 和 id myObj = [[MySpecialClass alloc] init]; 是一样的。但是,如果你的程序中并不存在 MySpecialClass 这个类,下面的写法……

阅读全文

NSDate和时间戳互转

iOS 将时间NSDate转化为毫秒时间戳 对于将NSDate类型转换为时间戳,相信大家肯定都会,这样的示例代码,在百度等搜索引擎上面一搜索就是一大……

阅读全文

Unknown Class **** in Interface Builder file

I added a UIView xib file using the root class of MyView. I created it in the wrong place and so moved it in the project. Same project just a different folder/group. I then had a problem when running saying… Unknown Class MyView in Interface Builder file I couldn't work out what was wrong so I have now deleted the files both from the project and from the directory. I've……

阅读全文

文字上添加删除线

NSString * str = @"ABCDEFG HIJKLMN"; UILabel * aLab = [[UILabel alloc]initWithFrame:CGRectMake(10, 100, 300, 300)]; aLab.text = str;NSMutableAttributedString * testAttriString = [[NSMutableAttributedString alloc] initWithString:str]; [testAttriString addAttribute:NSStrikethroughStyleAttributeName value:[NSNumber numberWithInt:NSUnderlineStyleSingle] range:NSMakeRange(0, testAttriString.length)]; aLab.attributedText = testAttriString;[self.view addSubview:aLab];……

阅读全文

App Store上架前的准备

一、制作ipa发布包 1、所需装备 1)一个distribution发布版证书 2)Xcode,iTunes,完成的项目,这都不用说了 开始配置Xc……

阅读全文

sqlite3的使用

新建数据库sqlite3 databasefilename检查databasefilename是否存在,如果不存在就创建并进入数据库(如果直接……

阅读全文

text/html & text/plain的区别

需要了解的概念 Content-Type:用于定义用户的浏览器或相关设备如何显示将要加载的数据,或者如何处理将要加载的数据 MIME:MIME类……

阅读全文