GkNx GkNx - 4 months ago 31
iOS Question

how can i flip a label (get the mirror view) in swift (Xcode 6.3)

I am trying to flip (get the mirror view) a label text with CGAffineTransformMakeRotation. But still no progress.

this code flips it vertically but i could not flip it horizontally.

self.labelShowdata.transform = CGAffineTransformMakeRotation((180.0 * CGFloat(M_PI)) / 180.0)



Try this:

self.labelShowdata.transform = CGAffineTransformMakeScale(-1, 1);