1

I am using iconic font (http://zavoloklom.github.io/material-design-iconic-font/cheatsheet.html) and I am using the reply button as a button title. I was wondering how to reflect the button's title vertically. I found a lot of resources on rotating the button image (Objective C: How can you rotate text for UIButton and UILabel?), HOWEVER, I want to REFLECT, not rotate. Rotating the image 180 degrees makes the arrow upside down.

What it is currently:
enter image description here

What I need:
enter image description here

Community
  • 1
  • 1
Josh O'Connor
  • 4,694
  • 7
  • 54
  • 98

1 Answers1

3

Set a scale transform of -100% for the axis you want to flip on. You may also need to adjust the frame slightly to get the effect you want, depending on if your arrow is "on" the reflecting surface or if you want a gap.

[self.myButton.titleLabel setTransform:CGAffineTransformMakeScale(1, -1)];
Chris Slowik
  • 2,859
  • 1
  • 14
  • 27