1.自己写#import "HttpManager.h"static HttpManager *httpManager=nil;@implementation HttpManager+(instancetype )shareManager{ //单例对象为空的时候创建 if (httpManag.....
分类:
其他好文 时间:
2015-11-06 17:41:26
阅读次数:
167
对象方法:(1)对象方法的实现只能写在@implementation...@end中,对象方法的声明只能写在 @interface...@end中间(2)对象方法都以-号开头,类方法都以+号开头(3)对象方法只能由对象来调用,类方法只能由类来调用,不能当做函数一样调用(4)函数属于整个文件,可以写在...
分类:
其他好文 时间:
2015-11-06 14:49:27
阅读次数:
148
原文public class HashMapextends AbstractMapimplements Map, Cloneable, Serializable1.Hash table based implementation of theMapinterface. This implementat...
分类:
编程语言 时间:
2015-11-06 07:05:41
阅读次数:
302
#import "ViewController.h" @interface ViewController () @property(nonatomic,strong)NSOperationQueue *queue;//在使用conn异步连接时的队列 @end @implementation View...
分类:
移动开发 时间:
2015-11-05 18:23:20
阅读次数:
194
#import "RootViewController.h"@interface RootViewController ()@end@implementation RootViewController- (void)viewDidLoad { [super viewDidLoad]; UIBu...
分类:
其他好文 时间:
2015-11-04 09:19:28
阅读次数:
145
监听者模式方便的监听所需要的值得变化@implementation ViewController- (IBAction)Buton:(id)sender { self.view.backgroundColor=[UIColor redColor]; }- (void)viewDidLoad { .....
分类:
其他好文 时间:
2015-11-03 21:17:16
阅读次数:
231
实现新英雄的放置功能首先我们需要一个变量来保持我们当前移动英雄的引用,因此我们将添加一个私有实例变量.修改MainScene.m中的代码.用:@implementation MainScene {
// this is the section to place private instance variables!
CCSprite *currentHero;
}替换原来的代码:@i...
分类:
其他好文 时间:
2015-11-02 12:13:17
阅读次数:
155
#import?"NSString+WJ.h"
@implementation?NSString?(WJ)
-?(instancetype)cacheDir
{
????//1.获取Caches目录
????NSString?*path?=?[NSSearchPathForDirectoriesInDomains(NSCachesDirectory,...
分类:
其他好文 时间:
2015-11-01 22:58:17
阅读次数:
394
#import "RootViewController.h"@interface RootViewController (){ CAGradientLayer *gradientLayer; NSTimer *timer;}@end@implementation RootViewControll.....
分类:
其他好文 时间:
2015-11-01 11:26:58
阅读次数:
189
#import "HMViewController.h"@interface HMViewController ()@property (weak, nonatomic) IBOutlet UIImageView *imageView;@end@implementation HMViewContro...
分类:
编程语言 时间:
2015-10-30 20:32:32
阅读次数:
190