您好我正在尝试绘制一些存储在沙箱中的 .png 图像并在 UIView 中输出文本。我的代码是:
-(void)setItemDetails:(ItemShow *)itmShow
{
if(theItem!=itmShow)
{
[theItem release];
theItem=itmShow;
[theItem retain];
}
UIImage *rImage=[UIImage imageNamed:@"years"];
[[UIColor blackColor] set];
[rImage drawInRect:CGRectMake(55.0, 22.0, 17.0, 17.0)];
[[UIColor brownColor] set];
[theItem.itemYear drawAtPoint:CGPointMake(7.0,19.0)
forWidth:100
withFont:[UIFont systemFontOfSize:17.0]
minFontSize:17.0
actualFontSize:NULL
lineBreakMode:UILineBreakModeTailTruncation
baselineAdjustment:UIBaselineAdjustmentAlignBaselines];
}
在我在 viewDidLoad 中调用这个方法之后。没发生什么事。我在 UIView 的画布上看不到任何图像和文本。这里有什么问题?