会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
酒茶白开水
博客园
首页
新随笔
联系
管理
订阅
2014年10月17日
KVC
摘要: #import "ViewController.h"#import "Student.h"#import "Book.h"#import "News.h"@interface ViewController ()@end@implementation ViewController- (void)vie...
阅读全文
posted @ 2014-10-17 21:42 酒茶白开水
阅读(166)
评论(0)
推荐(0)
2014年10月11日
NSArray方法亲测
摘要: #import NSInteger sortType(id st,id str,void *cha){ NSString *s1 = (NSString *)st; NSString *s2 = (NSString *)str; if(s1.length > s2.length) { retur...
阅读全文
posted @ 2014-10-11 21:16 酒茶白开水
阅读(163)
评论(0)
推荐(0)
2014年10月8日
协议
摘要: 接口文件1:Hunter.h#import #import "TProtocol.h"@interface Hunter : NSObject@property (nonatomic,retain) id animal;- (void) hunt;@end实现文件1:Hunter.m#import...
阅读全文
posted @ 2014-10-08 22:37 酒茶白开水
阅读(104)
评论(0)
推荐(0)
2014年10月6日
属性修饰词
摘要: 接口文件1:Animal.h#import #import "Cat.h"@interface Animal : NSObject{// NSString *_color;// NSString *_name; Cat *_cat;}@property (nonatomic,assign,readw...
阅读全文
posted @ 2014-10-06 21:56 酒茶白开水
阅读(421)
评论(0)
推荐(0)
2014年10月5日
OOP思想:封装、继承、多态(续)
摘要: 借口文件1:Bird.h#import @interface Bird : NSObject{@private int _weight; NSString *_name;}- (void)fly;@end实现文件1:Bird.m#import "Bird.h"@implementation Bird...
阅读全文
posted @ 2014-10-05 21:57 酒茶白开水
阅读(152)
评论(0)
推荐(0)
OOP思想:封装、继承、多态
摘要: 1. 构建一个动物类作为父类,猫科动物子类继承动物类,老虎子类继承猫科 动物 每个类都实现一个不同的cry方法。借口文件1:Animal.h#import @interface Animal : NSObject- (void) cry;@end实现文件1:Animal.m#import "Anim...
阅读全文
posted @ 2014-10-05 21:54 酒茶白开水
阅读(220)
评论(0)
推荐(0)
公告