当我通过分析器测试我的代码时,得到:
'self' 未设置为 [(super or self) init...] 的结果时使用的实例变量
我的代码:
self = [super init];//initWithFrame:frame];
if (self)
{
tickerSymbol = [object valueForKey:@"TickerSymbol"];
url = [object valueForKey:@"URL"];
rssFeed = [object valueForKey:@"RSSFeed"];
NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"ClientInfoView"
owner:nil
options:nil];
for (id currentObject in topLevelObjects)
{
if ([currentObject isKindOfClass:[ClientInfoView class]])
{
self = (ClientInfoView *)currentObject;
break;
}
}
[self.clientNameLabel setText:[clientObject valueForKey:@"Name"]];
[self.symbolLabel setText:[object valueForKey:@"TickerSymbol"]];
//[self loadHistoricalInfo];
self.getStock = [GetStockValue stockValueWithDelegate:self];
[self loadInfo:object clientObject:clientObject];
[self layoutLabels];
}
return self;