标签:
1
-(id)initWithFrame:(CGRect )frame ImagesAndStringsOfObject:(id )image,... { self=[super initWithFrame:frame]; if(self) { va_list arguments; id each; if(image) { self._arrObjects=[[NSMutableArray alloc]initWithObjects:image, nil]; va_start(arguments,image); while ((each =va_arg(arguments, id))) { [self._arrObjects addObject:each]; } va_end(arguments); for (int i=0; i<self._arrObjects.count/2; i++) { if([self._arrObjects objectAtIndex:i*2]) { if (![[self._arrObjects objectAtIndex:i*2] isKindOfClass:[UIImage class]]) { NSAssert(NO, @"参数错误"); } } if ([self._arrObjects objectAtIndex:i*2+1]) { if (![[self._arrObjects objectAtIndex:i*2+1] isKindOfClass:[NSString class]]) { NSAssert(NO, @"参数错误"); } } } } } [self viewForMain]; return self; }
标签:
原文地址:http://www.cnblogs.com/lvchenhao/p/4378049.html