ios - How can I draw a line from one cell to another cell when using UITableViewCell -


i need draw chart 1 cell has line link cell, how can in uitableviewcell? below:

enter image description here

something this?

nsindexpath *ipathcellfrom = [nsindexpath indexpathforrow:0 insection:0]; nsindexpath *ipathcellto = [nsindexpath indexpathforrow:0 insection:0]; cgrect = [self.mytableview rectforrowatindexpath:ipathcellfrom]; cgrect = [self.mytableview rectforrowatindexpath:ipathcellto]; cgpoint fromcenter = cgpointmake(from.origin.x + from.size.width/2, from.origin.y + from.size.height/2); cgpoint tocenter = cgpointmake(to.origin.x + to.size.width/2, to.origin.y + to.size.height/2);  cgcontextref context = uigraphicsgetcurrentcontext(); cgcontextsavegstate(context); cgcontextsetstrokecolorwithcolor(context, [[uicolor blackcolor]cgcolor]); cgcontextsetlinewidth(context, 1.0); cgcontextmovetopoint(context, fromcenter.x, fromcenter.y); cgcontextaddlinetopoint(context, tocenter.x, tocenter.y); cgcontextstrokepath(context); cgcontextrestoregstate(context); 

context code taken here


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -