摘要: #import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; NSArray *arra... 阅读全文
posted @ 2014-10-16 21:15 汪伟 阅读(134) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; /*_________... 阅读全文
posted @ 2014-10-15 20:16 汪伟 阅读(667) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"@interface ViewController () //保包括这个viewdelegat协议 @property (weak, nonatomic) IBOutlet UITextField *search; //这是... 阅读全文
posted @ 2014-10-13 21:00 汪伟 阅读(264) 评论(0) 推荐(0) 编辑
摘要: copy和copyWithZone@interface Animal :NSObject //在后面包含NSCOPYING协议 在M文件中复制ANimal类中的对象.- (id)copyWithZone:(NSZone *)zone //copy使用... 阅读全文
posted @ 2014-10-10 21:53 汪伟 阅读(559) 评论(0) 推荐(0) 编辑
摘要: 更改协议成block,运行,设置一个头文件person.h#import @interface Person : NSObject@property (nonatomic, copy) void (^brak)(void); //声明void类返回void的block类型的brak,@propert... 阅读全文
posted @ 2014-10-09 21:25 汪伟 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 声明一个协议头文件#ifndef Dog_Play_h#define Dog_Play_h@protocol Play @required- (void)brak;- (void)tail;- (void)go;@end#endif定一个persons类.#import #import "Play.... 阅读全文
posted @ 2014-10-08 19:35 汪伟 阅读(174) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"#import "Fish.h"#import "Cat.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super v... 阅读全文
posted @ 2014-10-08 19:25 汪伟 阅读(130) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h"#import "Tiger.h"#import "Lorry.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [su... 阅读全文
posted @ 2014-10-05 21:17 汪伟 阅读(325) 评论(0) 推荐(0) 编辑
摘要: int main(){ FILE *fp=fopen("/Users/apple/Desktop/link2.c","r"); FILE *fp1=fopen("/Users/apple/Desktop/link3.c","w"); char ch[]={}; if (fp!... 阅读全文
posted @ 2014-09-26 09:54 汪伟 阅读(265) 评论(0) 推荐(0) 编辑
摘要: int main(){ FILE *fp,*fp1; char ch[]={}; if ((fp=fopen("/User/Apple/Desktop/text.1","r"))==NULL) { printf("cannot open file\n"); ... 阅读全文
posted @ 2014-09-26 09:28 汪伟 阅读(247) 评论(0) 推荐(0) 编辑