摘要: 一、调用顺序: 1. + (id)alloc 分配内存;2. - (id)init 方法(包括其他-(id)init...方法),只允许调用一次,并且要与 alloc方法 写在一起,在init方法中申请的内存,要在dealloc方法中释放(或者其他地方);3. - (void)awakeFromNi... 阅读全文
posted @ 2015-12-11 12:50 谢涵..Fting! 阅读(147) 评论(0) 推荐(0) 编辑
摘要: UIImageView帧动画相关属性和方法:需要播放的序列帧图片数组(里面都是UIImage对象,会按顺序显示里面的图片)@property(nonatomic,copy) NSArray *animationImages;帧动画的持续时间@property(nonatomic) NSTimeInt... 阅读全文
posted @ 2015-12-11 12:49 谢涵..Fting! 阅读(397) 评论(0) 推荐(0) 编辑
摘要: MPMoviePlayerController是通过MediaPlayer.frame引入的,可用于播放在iOS支持的所有格式的视频,用起来很简单,但是有注意的事项,实现结果如下:代码如下:-(IBAction)click:(id)sender{//通过点击按钮出发视频播放视图的加载[self pl... 阅读全文
posted @ 2015-12-11 12:47 谢涵..Fting! 阅读(1316) 评论(0) 推荐(0) 编辑
摘要: 一些零散的属性和方法 // 取得选中的那行 NSIndexPath *path = [self.tableView indexPathForSelectedRow]; // 每一行cell的高度 self.tableView.rowHeight = 50; // 每一组头部控件的... 阅读全文
posted @ 2015-12-11 12:45 谢涵..Fting! 阅读(173) 评论(0) 推荐(0) 编辑
摘要: - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. self.view.backgroundColor = [UIColor whiteCo... 阅读全文
posted @ 2015-08-25 21:45 谢涵..Fting! 阅读(641) 评论(0) 推荐(0) 编辑
摘要: /*************UITextField**************/ //实例化 UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(20, 100, 280, 40)]; ... 阅读全文
posted @ 2015-08-25 21:42 谢涵..Fting! 阅读(542) 评论(0) 推荐(0) 编辑
摘要: /***********UILabel(展示文本文字)***********/ /* 1、实例化 2、属性 3、添加到父视图上 */ //1、实例化 UILabel *label = [[UILabel alloc]initWithFrame... 阅读全文
posted @ 2015-08-24 11:45 谢涵..Fting! 阅读(407) 评论(0) 推荐(0) 编辑
摘要: /***********UIView位置及大小*************/ UIView *view = [[UIView alloc]init]; //1、frame设置位置及大小// view.frame = CGRectMake(100, 100, 100, 100)... 阅读全文
posted @ 2015-08-24 11:38 谢涵..Fting! 阅读(357) 评论(0) 推荐(0) 编辑
摘要: 1 1、UIButton->UIView 按钮 2 /************UIButton-System(文字样式)**********/ 3 //按钮实例化方式:类方法创建 4 /* 5 1、UIButtonTypeSystem=UIBu... 阅读全文
posted @ 2015-08-03 22:37 谢涵..Fting! 阅读(279) 评论(0) 推荐(0) 编辑