2016年11月9日

Day 1:自定义tableview cell xib版

摘要: tableview 是最常见的控件,今天练一个tableview小项目。 链接 https://git.oschina.net/junmiao.huang/tableviewcell.git 如有错误,敬请指教,如有问题,尽快回答。 阅读全文

posted @ 2016-11-09 19:26 小|晄 阅读(76) 评论(0) 推荐(0) 编辑

新的目标

摘要: 从4月份起,一直在埋头苦学,现在终于开始工作了,严重意识到自己非常不足,技术提升到越来越慢,随着ios10,xcode8,swift3.0,微信小程序的出现,感觉自己回到了起点,那个懵懂的大叔,所以今天重登这里,定下目标,每日抽时间完成一个项目,如有特殊情况,周末补上,今天开始!加油大叔。 阅读全文

posted @ 2016-11-09 18:56 小|晄 阅读(80) 评论(0) 推荐(0) 编辑

2016年4月16日

NSArray,文件路径的字符串截取

摘要: #import <Foundation/Foundation.h> #include <string.h> int main(int argc, const char * argv[]) { @autoreleasepool { //1.创建一个字符串 "OCWith/OCWithProperty/ 阅读全文

posted @ 2016-04-16 15:45 小|晄 阅读(108) 评论(0) 推荐(0) 编辑

property 实例

摘要: //创建一个动物model类,用属性设置它的name,age,weight,并设置初始化方法 #import <Foundation/Foundation.h> @interface Animal : NSObject  #pragma mark 动物名称 @property (nonatomic 阅读全文

posted @ 2016-04-16 15:40 小|晄 阅读(167) 评论(0) 推荐(0) 编辑

property,nonatomic,readwrite / readonly,strong/assign/retain/copy/weak 用法

摘要: #import <Foundation/Foundation.h> @interface People : NSObject { @public int height; //成员变量 } //@property 属性参数分为: //1.nonatomic / atomic // nonatomic  阅读全文

posted @ 2016-04-16 15:27 小|晄 阅读(131) 评论(0) 推荐(0) 编辑

面向对象—多态练练

摘要: //有一个父亲。开了一个厂,这个厂在他手里赚了100W,但是过了几年,传到他儿子手里,经过重新装修,改良了技术后,赚了2个亿。 #import <Foundation/Foundation.h> #import "Father.h" #import "Sub.h" int main(int argc 阅读全文

posted @ 2016-04-16 15:22 小|晄 阅读(86) 评论(0) 推荐(0) 编辑

oc面向对象之 多态

摘要: //多态 - 在编译时和运行时所代表的对象类型是不一样的 //体现:1.只存在于继承当中 // 2.在代码中的体现是 父类指向子类的实例 // 3.好处:无视参数传递时类型的转换 // 4.super 代表当前类的实例 //oc 是一种运行时语言 //编译时 - 针对于编写代码的时候,编译工具会进行 阅读全文

posted @ 2016-04-16 15:15 小|晄 阅读(61) 评论(0) 推荐(0) 编辑

oc继承,方法重写

摘要: #import <Foundation/Foundation.h> #import "Dog.h" #import "Cat.h" int main(int argc, const char * argv[]) { //面向对象三大特性 - 封装 继承 多态 //封装 - 在代码中的体现:将属性隐藏 阅读全文

posted @ 2016-04-16 14:56 小|晄 阅读(287) 评论(0) 推荐(0) 编辑

initWithFormat。。。stringWithFormat

摘要: 1、initWithFormat是实例办法只能经由过程 NSString* str = [[NSString alloc] initWithFormat:@"%@",@"Hello World"] 调用,然则必须手动release来开释内存资料2、stringWithFormat是类办法 常见的输出 阅读全文

posted @ 2016-04-16 14:15 小|晄 阅读(54) 评论(0) 推荐(0) 编辑

自定义构造函数 重写类描述,可以people *peoA=[[people alloc]init];直接输出NSLog(@"%@",peoA);

摘要: #import <Foundation/Foundation.h> //自定义构造函数 @interface People : NSObject { #pragma mark 人类年龄 NSInteger age; #pragma mark 人类姓名 NSString *name; #pragma 阅读全文

posted @ 2016-04-16 14:10 小|晄 阅读(91) 评论(0) 推荐(0) 编辑

导航