摘要: 大家都知道在分类里,可以间接的添加属性,运用runtime关联对象。 如下图,只是声明了btnClickedCount的set, get方法而已 并没有生成_btnClickedCount 成员变量,以及set,get方法的实现。 有人会自己添加_btnClickedCount 成员变量,但编译一下 阅读全文
posted @ 2019-12-19 16:11 热血博 阅读(264) 评论(0) 推荐(0) 编辑
摘要: //通过imageView播放动画 //1.创建一个imageView UIImageView *imageView = [[UIImageView alloc] init]; imageView.frame = CGRectMake(0, 0, 320, 480); ... 阅读全文
posted @ 2015-05-16 22:37 热血博 阅读(265) 评论(0) 推荐(0) 编辑
摘要: UILabel *left = [[UILabel alloc] init]; left.text = @" Sent when the application is about to move from active to inactive state."; left.... 阅读全文
posted @ 2015-05-13 23:19 热血博 阅读(143) 评论(0) 推荐(0) 编辑
摘要: UILabel *label = [[UILabel alloc] init]; //根据内容动态计算label的高度 label.text = @"Sent when the application is about to move from active to ina... 阅读全文
posted @ 2015-05-11 23:59 热血博 阅读(509) 评论(0) 推荐(0) 编辑
摘要: CGFloat width = 40; CGFloat height = 40; //获取屏幕宽高 //获取屏幕对象 UIScreen *screen = [UIScreen mainScreen]; //获取屏幕大小 CGRect screenF... 阅读全文
posted @ 2015-05-11 23:45 热血博 阅读(231) 评论(0) 推荐(0) 编辑
摘要: #import "QFAppDelegate.h"@implementation QFAppDelegate//最后一个执行的初始化函数//主要做一些启动之前的初始化操作- (BOOL)application:(UIApplication *)application didFinishLaunchi... 阅读全文
posted @ 2015-05-11 23:24 热血博 阅读(154) 评论(0) 推荐(0) 编辑