ios 用程序绘制饼图的demo(6)
}
}
}
CLMView.m的调用方法:
[csharp]
CLMView *cv = [[CLMView alloc] initWithFrame:CGRectMake(0, 0, 320, 440)];//实例化
//指定标题数组
cv.titleArr = [NSArray arrayWithObjects:@"iphone", @"sybian", @"windowbile", @"mego",@"android",nil];
//指定数值比例数组
cv.valueArr = [NSArray arrayWithObjects:[NSNumber numberWithFloat:20],[NSNumber numberWithFloat:20],\
[NSNumber numberWithFloat:20],[NSNumber numberWithFloat:20],[NSNumber numberWithFloat:20],nil];
//指定颜色数组
cv.colorArr = [NSArray arrayWithObjects:[UIColor yellowColor], [UIColor blueColor], [UIColor brownColor], [UIColor purpleColor] , [UIColor orangeColor],nil];
[self.view addSubview: cv];
[cv release];
CLMView *cv = [[CLMView alloc] initWithFrame:CGRectMake(0, 0, 320, 440)];//实例化
//指定标题数组
cv.titleArr = [NSArray arrayWithObjects:@"iphone", @"sybian", @"windowbile", @"mego",@"android",nil];
//指定数值比例数组
cv.valueArr = [NSArray arrayWithObjects:[NSNumber numberWithFloat:20],[NSNumber numberWithFloat:20],\
[NSNumber numberWithFloat:20],[NSNumber numberWithFloat:20],[NSNumber numberWithFloat:20],nil];
//指定颜色数组
cv.colorArr = [NSArray arrayWithObjects:[UIColor yellowColor], [UIColor blueColor], [UIColor brownColor], [UIColor purpleColor] , [UIColor orangeColor],nil];
[self.view addSubview: cv];
[cv release];
相关新闻>>
- 发表评论
-
- 最新评论 更多>>