上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: 1 UITextView * tv = [[UITextView alloc] init];2 3 tv.keyboardType = UIKeyboardTypePhonePad; // 设定键盘类型4 tv.keyboardType = UIKeyboardTypeURL;5 tv.returnKeyType = UIReturnKeyNext; // 设定键盘回车键类型6 tv.enablesReturnKeyAutomatically = NO; // 设定回车键无效7 tv.autocapitalizationType = UITextAutoc... 阅读全文
posted @ 2013-02-16 15:06 diablo大王 阅读(1440) 评论(0) 推荐(0) 编辑
摘要: 1 UIImage *iv = [UIImage imageNamed:@"bc.png"];2 [iv drawInRect:CGRectMake(0, 0, 100, 100)3 blendMode:kCGBlendModeColorDodge4 alpha:1.0]; // blendMode 设定图片与背景融合方式 阅读全文
posted @ 2013-02-16 14:46 diablo大王 阅读(873) 评论(0) 推荐(0) 编辑
摘要: 1 UIColor *white1 = [UIColor whiteColor]; // 白色2 UIColor *white2 = [UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]; // 白色3 UIColor *orange = [UIColor colorWithRed:1.0 green:0.5 blue:0.0 alpha:1.0]; // 橙色4 UIColor *imageColor = [UIColor colorWithPatternImage:image]; // 根据图片生成颜色5 [[... 阅读全文
posted @ 2013-02-16 14:34 diablo大王 阅读(9464) 评论(0) 推荐(0) 编辑
摘要: 1 UIFont *font1 = [UIFont systemFontOfSize:[UIFont smallSystemFontSize]]; // 系统小字体2 UIFont *font2 = [UIFont systemFontOfSize:[UIFont labelFontSize]]; // 系统标签字体3 UIFont *font3 = [UIFont boldSystemFontOfSize:20]; // 加粗字体4 UIFont *font4 = [UIFont italicSystemFontOfSize:20]; // 斜体 阅读全文
posted @ 2013-02-16 14:30 diablo大王 阅读(3452) 评论(0) 推荐(0) 编辑
摘要: 1 NSString *hang = @"test";2 CGRect zwRect = CGRectMake(0,0,200,20);3 UIFont *myFont = [UIFont systemFontOfSize:ud.readFontSize];4 [hang drawInRect:zwRect withFont:myFont]; 阅读全文
posted @ 2013-02-16 14:23 diablo大王 阅读(233) 评论(0) 推荐(0) 编辑
摘要: 1. Terms and conditions(法律与条款)1.1As a developer of applications for the App Store you are bound by the terms of theProgram License Agreement(PLA), Human Interface Guidelines (HIG), and any other licenses or contracts between you and Apple. The following rules and examples are intended to assist you 阅读全文
posted @ 2013-02-16 14:04 diablo大王 阅读(32202) 评论(0) 推荐(0) 编辑
摘要: animation.removedOnCompletion = NO; // 效果不删除animation.fillMode = kCAFillModeForwards; // 保留动画结束时的效果[layeraddAnimation:animation forKey:nil]; // 如果要保存动画后的结果,forKey必须设置为nil 阅读全文
posted @ 2013-02-14 18:17 diablo大王 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 1 [CATransaction begin];2 [CATransaction setAnimationDuration:2];3 self.layer.zPosition = 3;4 self.layer.bounds = CGRectMake(0, 0, 100, 100);5 [CATransaction commit]; 阅读全文
posted @ 2013-02-14 12:47 diablo大王 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 一、ARC与BlockBlocks 和 ARC 结合起来效果很好。实际上,ARC 使得在使用 blocks 时比从前更简单。 正如你可能知道的,blocks 最初在栈上创建。如果你想要保持一个 block 超过目前范围依然 可以被使用,你不得不把它复制到堆里通过[copy]或者 Block_copy()函数。现在 ARC 自 动实现。 1 #import <UIKit/UIKit.h> 2 typedef void (^AnimatedViewBlock)( CGContextRef context, 3 CGRect rect, CFTimeInterval totalTime, 阅读全文
posted @ 2013-02-13 19:15 diablo大王 阅读(354) 评论(0) 推荐(0) 编辑
摘要: IOS5 中最具颠覆性的变化当属自动引用计数(Automatic Reference Counting)的引入,缩写为 ARC。ARC 是新的 LLVM 3.0 编译器具备的特性之一,这项技术完全摒弃了让所有 IOS 开发者由爱生恨的手动内存管理。在你的工程中使用 ARC非常简单。你还像往常一样编程,只是不再调用 retain,release 和 autorelease 了。这基本上就是 ARC 的全部。如果开启了自动引用计数,编译器就会在你程序中的恰当位置,插入 retain,release 和 autorelease。你不必再为这个操心,因为编译器会替你搞定。 ARC 基本上是 LL... 阅读全文
posted @ 2013-02-13 13:16 diablo大王 阅读(3884) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页