一、描绘数字 CGContextRef context = UIGraphicsGetCurrentContext(); //画布 CGContextSaveGState(context); NSString* text = @"15"; NSString* fontname = @"Helvet... Read More
posted @ 2013-01-05 15:19 燕羽天空 Views(754) Comments(0) Diggs(0) Edit
当一个资源文件较大时(大量图片、视屏等),不应该直接拖进工程里,而应该使用如下方法:注:1、"Copy items into destination groups's folder(if needed)"是将所要使用的文件,同时复制到项目的resource文件中。2、"Create groups for any added folders"会为根据所有文件的目录层次生成不同层次的group,即逻辑上的文件夹。实际上这些资源将会散落在resource文件夹内,没有子文件夹。3、"Create Folder References for a Read More
posted @ 2013-01-05 14:55 燕羽天空 Views(160) Comments(0) Diggs(0) Edit
1、本地化iPhone程序显示名称:一般程序自带的是英文即en.lproj ,想支持中文就在Finder中新建一个zh_CN.lproj,然后复制一份infoPlist.strings放入该文件中,然后把该.strings拖到工程中;然后就可以在两个文件中写需要的东西了,比如:CFBundleDisplayName = "QQ";注:it.lproj为意大利语2、多语言显示在工程里新建Strings File 取名为Localizable,把它放到zh_CN.lproj文件夹里,再拖到工程里:写"WelcomeKey" = "Welcome!! Read More
posted @ 2013-01-05 14:37 燕羽天空 Views(232) Comments(0) Diggs(0) Edit
//时间换成NSString- (void)randomPickerView:(DatePickView*)randomPickerView selectDate:(NSDate*)selectDate{ //07:01// NSLog(@"ssss %@", selectDate); NSAutoreleasePool *pool = [[NSAutoreleasePoolalloc] init]; NSCalendar *calendar = [[[NSCalendaralloc] initWithCalendarIdentifier:NSGregorianCalend Read More
posted @ 2013-01-05 14:30 燕羽天空 Views(629) Comments(0) Diggs(0) Edit
contentWeb = [[UIWebViewalloc] initWithFrame:CGRectMake(10, 0, 300, 135)]; contentWeb.layer.cornerRadius = 8; contentWeb.layer.masksToBounds = Y... Read More
posted @ 2013-01-05 11:24 燕羽天空 Views(135) Comments(0) Diggs(0) Edit
#define UIColorFromRGBA(rgbValue, alphaValue) \[UIColor \ colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \ green:((float)((rgbValue & 0x00FF00) >> 8))/255.0 \ blue:((float)(rgbValue & 0x0000FF))/255.0 \ alpha:alphaValue]使用:X.backgroundColor = [UIColorFromRGBA(0x000 Read More
posted @ 2013-01-05 11:19 燕羽天空 Views(243) Comments(0) Diggs(0) Edit