ios - Why is the text upside down? -


i implemented coreplot xcode project. i'm trying add legend enter image description here cell.

i'm able add legend cell, when that, text upside down.

here code:

- (void)configurelegend {     cptgraph *graph = self.hostview.hostedgraph;     cptlegend *thelegend = [cptlegend legendwithgraph:graph];      // add legend graph     graph.legend = thelegend;     graph.legendanchor = cptrectanchorright;     cgfloat legendpadding = - (self.chartview.bounds.size.width / 8);     graph.legenddisplacement = cgpointmake(legendpadding, 0.0);      uitableviewcell *cell = [self.tableview cellforrowatindexpath:[nsindexpath indexpathforrow:2 insection:0]];     [cell.layer addsublayer:graph.legend]; 

this tried:

    thelegend.transform = catransform3dmakerotation(m_pi / 180.0f, 0, 1, 0); } 

that didn't anything. results same. why happening, , how can text show normally, not upside down?

edit

this how shows when add sublayer:enter image description here (it says: "first", "second".)

core plot applies flip transform on ios can use same drawing code on both mac , ios. transform uses:

self.layer.sublayertransform = catransform3dmakescale( cptfloat(1.0), cptfloat(-1.0), cptfloat(1.0) );