摘要:
使用Category需要注意的点:(1) Category的方法不一定非要在@implementation中实现,也可以在其他位置实现,但是当调用Category的方法时,依据继承树没有找到该方法的实现,程序则会崩溃。(2) Category理论上不能添加变量,但是可以使用@dynamic来弥补这种... 阅读全文
摘要:
#import "ViewController.h"#define kURL @"http://avatar.csdn.net/2/C/D/1_totogo2010.jpg"@interface ViewController ()@end@implementation ViewController-... 阅读全文
摘要:
- (void)viewDidLoad { [super viewDidLoad]; //启动线程,downloadImage为线程执行的方法,url为传入参数 NSURL *url ; [NSThread detachNewThreadSelector:@s... 阅读全文