OC
Peter_AM
乐观,积极,善良
展开
-
关键帧动画
#import "CZViewController.h" @interface CZViewController () @property (nonatomic, strong) UIView *myView; @end @implementation CZViewController - (UIView *)myView { if (_myV原创 2015-11-22 23:48:11 · 522 阅读 · 0 评论 -
OC动画组
@interface CZViewController () @property (nonatomic, strong) UIView *myView; @end @implementation CZViewController /** 动画组:一组动画同时执行 动画是调出来的! */ - (UIView *)myView { if (原创 2015-11-22 23:47:09 · 497 阅读 · 0 评论 -
viewDidUnload 和 dealloc
对于iphone开发人员来说,内存管理是极为重要的技巧,哪怕程序的功能再强大,设计再漂亮,如果内存控制不好,也难逃程序莫名退出的噩运,这与网页开发是完全不同的。 内存控制里面有很多门道,在这里分析一下 viewDidUnload 和 dealloc 的区别,关于这两者的区别的文章很多,但是大都是摘抄和翻译官方文档,有的也只是简单的说两句,并没有详细说出两者具体的区别。 在了解两者之间的转载 2016-01-03 09:40:05 · 293 阅读 · 0 评论 -
在Objective-c里面使用property教程
这是在iphone上面使用objc,与内存管理有关的第三篇教程。 在第一篇教程中,我们介绍了在objective-c里面如果使用实例变量和引用计数来管理内存。 在第二篇教程中,我们介绍了如何检测内存泄露、与内存有关的易犯的错误,使用是Instruments以及其它辅助工具。 在这第三篇教程中,也是本系列的最后一篇教程,我们将谈一谈objc的property。我们将介绍转载 2016-01-03 09:49:40 · 540 阅读 · 0 评论 -
详解文本属性Attributes
1.NSKernAttributeName: @10 调整字句 kerning 字句调整 2.NSFontAttributeName : [UIFont systemFontOfSize:_fontSize] 设置字体 3.NSForegroundColorAttributeName :[UIColor redColor] 设置文字颜色 4.NSParagraphSty原创 2015-12-03 10:04:39 · 474 阅读 · 0 评论 -
设置UIImage的渲染模式
设置UIImage的渲染模式:UIImage.renderingMode 着色(Tint Color)是iOS7界面中的一个.设置UIImage的渲染模式:UIImage.renderingMode重大改变,你可以设置一个UIImage在渲染时是否使用当前视图的Tint Color。UIImage新增了一个只读属性:renderingMode,对应的还有一个新增方法:imag原创 2015-12-03 10:03:26 · 316 阅读 · 0 评论 -
多控制器的创建
//创建window self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; //初始化 tabbar controller UITabBarController * tc = [[UITabBarController alloc] init]; //创原创 2015-12-03 10:01:50 · 388 阅读 · 0 评论 -
子控制器模型
-(void)addChildViewController:(UIViewController *)childCtrl imageName:(NSString *)imageName title:(NSString *)title { // UITabBarController * homeTbc = [UITabBarController new];原创 2015-12-03 10:05:47 · 454 阅读 · 0 评论 -
UIButton状态
UIButton状态: UIControlStateNormal // 正常状态 UIControlStateHighlighted // 高亮状态 UIControlStateDisabled // 禁用状态 UIControlStateSelected // 选中状态 UIControlStateApplica原创 2015-12-03 10:07:07 · 410 阅读 · 0 评论