大家好,又见面了,我是全栈君。
- (id)initWithFrame:(CGRect)frame delegate:(id<SGFocusImageFrameDelegate>)delegate focusImageItems:(SGFocusImageItem *)firstItem, ...
{
self = [super initWithFrame:frame];
if (self) {
NSMutableArray *imageItems = [NSMutableArray array];
SGFocusImageItem *eachItem;
va_list argumentList;
if (firstItem)
{
[imageItems addObject: firstItem];
va_start(argumentList, firstItem);
while((eachItem = va_arg(argumentList, SGFocusImageItem *)))
{
[imageItems addObject: eachItem];
}
va_end(argumentList);
}
objc_setAssociatedObject(self, (const void *)SG_FOCUS_ITEM_ASS_KEY, imageItems, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
_isAutoPlay = YES;
[self setupViews];
[self setDelegate:delegate];
}
return self;
}
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/116198.html原文链接:https://javaforall.cn