摘要: #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 酒茶白开水 阅读(160) 评论(0) 推荐(0) 编辑
摘要: #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 酒茶白开水 阅读(156) 评论(0) 推荐(0) 编辑
摘要: 接口文件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 酒茶白开水 阅读(98) 评论(0) 推荐(0) 编辑
摘要: 接口文件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 酒茶白开水 阅读(414) 评论(0) 推荐(0) 编辑
摘要: 借口文件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 酒茶白开水 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 1. 构建一个动物类作为父类,猫科动物子类继承动物类,老虎子类继承猫科 动物 每个类都实现一个不同的cry方法。借口文件1:Animal.h#import @interface Animal : NSObject- (void) cry;@end实现文件1:Animal.m#import "Anim... 阅读全文
posted @ 2014-10-05 21:54 酒茶白开水 阅读(214) 评论(0) 推荐(0) 编辑