I have a problem with title vertical alignment of some UIButtons that is over the central line of the button, this happened because I've used a custom font that have a wrong vertical alignment, I fixed this problem in iOS6 with titleEdgeInsets and put some pixel of inset on the top value. When I start to update my app to iOS7 I've a inverse problem now the title is under the central line and if I remove the insets the title is on the centre of the button. is there a way for fix this problem both operation system {iOS6, iOS} using the same code?

有帮助吗?

解决方案

I checked at start the app the iOS7 or iOS6 and the is set the global variable for the insets so if is iOS7 this variable have a value else have another. like that I resolve my problem.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top