iphone - Draw graph on uiview with animation -
hello everyone,
i create similar view in attached image. can of uitableview want draw graph above of tableview. calculating data , based upon data (%), have draw graph on particular row(61-70 % etc). when graph reaches specific row, need start timer of particular row also. can draw calayer above of uitableview achieve this? or create custom uiview partition , draw graphs individually creating calayers. please suggest. thanks
create custom view , code init @implementation customview
- (id)initwithframe:(cgrect)frame numberofrows:(int)rows color:(nsarray *)colors { self = [super initwithframe:frame]; if (self) { // initialization code } int yaxis =0; for(int =0 ;i<[colors count];i++) { uiview *_v = [[uiview alloc]initwithframe:cgrectmake(0, yaxis, 320, 480/rows)]; [_v setbackgroundcolor:[colors objectatindex:i]]; [self addsubview:_v]; /* add label , timer label according need */ } return self; }
then can pass array of uicolors , number of rows.
also graph need check origin value of graph.
Comments
Post a Comment