QuizChartViewDemo_移动开发_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > 移动开发 > QuizChartViewDemo

QuizChartViewDemo

 2014/11/27 17:25:30  粉粉色  程序员俱乐部  我要评论(0)
  • 摘要:效果图:工程图:需要导入的文件:QuizChartView.h,QuizChartView.m.代码:RootViewController.h#import<UIKit/UIKit.h>@classQuizChartView;@interfaceRootViewController:UIViewController{QuizChartView*m_chartView;}@endRootViewController.m-(void)viewDidLoad
  • 标签:view

效果图:

工程图:

需要导入的文件:QuizChartView.h,QuizChartView.m.

代码:

RootViewController.h

 

#import <UIKit/UIKit.h>

@class QuizChartView;
@interface RootViewController : UIViewController
{
     QuizChartView *m_chartView;
}
@end

 

RootViewController.m

 

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    
    self.title=@"饼图";
    
    
    m_chartView = [[QuizChartView alloc] initWithFrame:CGRectMake(10, 70, 300, 300)];
    m_chartView.backgroundColor = [UIColor orangeColor];
    m_chartView.m_aPercent = [NSMutableArray arrayWithObjects:@"10",@"20",@"30",@"40",nil];
    m_chartView.m_aHint = [NSMutableArray arrayWithObjects:@"早餐",@"午餐",@"晚餐",@"夜宵",nil];
   [self.view addSubview:m_chartView];
    
    

    
}

 

发表评论
用户名: 匿名