主要代码是这样得:
ReportScrollView.h文件
NumberView *scoresView;//总分数View.NumberView是自定义控件ReportScrollView.m文件
-(void)initData
{
//加入分数
scoresView = [[NumberView alloc]initWithFrame:CGRectMake(0,0,100,100)];
[scoresView setNum:90];
[self addSubview:scoresView];
}
//数据释放
-(void)dealloc
{
if(scoresView != nil)
[scoresView release];
[super dealloc];
}NumberView.m- (void)dealloc {
[super dealloc];//运行到这里,出现EXC_BAD_ACCESS错误,求解答,谢了!
}
ReportScrollView.h文件
NumberView *scoresView;//总分数View.NumberView是自定义控件ReportScrollView.m文件
-(void)initData
{
//加入分数
scoresView = [[NumberView alloc]initWithFrame:CGRectMake(0,0,100,100)];
[scoresView setNum:90];
[self addSubview:scoresView];
}
//数据释放
-(void)dealloc
{
if(scoresView != nil)
[scoresView release];
[super dealloc];
}NumberView.m- (void)dealloc {
[super dealloc];//运行到这里,出现EXC_BAD_ACCESS错误,求解答,谢了!
}
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货