Unwanted Vertical Padding from iOS 6 on CATextLayer

前端 未结 5 1031
半阙折子戏
半阙折子戏 2021-02-06 15:37

Background: I started my project in iOS 5 and built out a beautiful button with layer. I added a textLayer onto the button and center it using the following cod

5条回答
  •  借酒劲吻你
    2021-02-06 15:58

    I think to support both you can create a category for text layers, in category you can code it conditionally for both versions. Same as we do for navigation bar when we change image.

    You can center your frame as you did with different frames for different ios versions

提交回复
热议问题