object-c 队列
2019獨(dú)角獸企業(yè)重金招聘Python工程師標(biāo)準(zhǔn)>>>
[operationQueue addOperation:[AsyncOperation operationWithString:imageStr view:self order:i]]; //調(diào)用
/
@interface AsyncOperation : NSOperation
-(id)initWithString:(NSString *)imgStr view:(YHNavImageView *)view order:(NSInteger)order;
+(id)operationWithString:(NSString *)imgStr view:(YHNavImageView *)view order:(NSInteger)order;
@end
@implementation AsyncOperation
-(id)init
{
[self release];
[NSException raise:NSInternalInconsistencyException format:@"%@: must be initialized with a layer (use -initWithLayer:)", NSStringFromClass([self class])];
return nil;
}
-(id)initWithString:(NSString *)imgStr view:(YHNavImageView *)view order:(NSInteger)order {
self = [super init];
if(self != nil)
{
?//隊(duì)列中要干的事兒 ? ??
? ? ? ? ?
}
return self;
}
+(id)operationWithString:(NSString *)imgStr view:(YHNavImageView *)view order:(NSInteger)order? {
return [[[self alloc] initWithString:imgStr view:view order:order] autorelease];
}
-(void)dealloc {
[super dealloc];
}
@end
/
轉(zhuǎn)載于:https://my.oschina.net/ahuaahua/blog/33659
與50位技術(shù)專家面對(duì)面20年技術(shù)見證,附贈(zèng)技術(shù)全景圖總結(jié)
以上是生活随笔為你收集整理的object-c 队列的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: axis的对象交由spring管理的配置
- 下一篇: Servlet总结04——注意Servl