I am trying to find a way to make my font shrink from large to small in a wedge type shape. For example:
Thisfontisshrinking
The text would be aligned through the horizontal centres of the text though.
My first thought was to create a UILabel in the standard way and then distort the frame. There is no simple way of doing that though (that I know of anyway...)
You could create the content as HTML and display it in a UIWebView, but that might not do or behave the way you want and might be rough to implement if you want to show a lot of text in different places. You could use Core Text to draw it yourself but the implementation is not as simple. It's a lower level API, in C, part of Core Foundation.
What exactly are you doing with the text, where are you displaying it, for what etc.
I am creating labels for a pie chart. The text would be larger towards the edge and smaller towards the centre.
Using a UIWebView would be messy, but it may work. Writing the code to spit out the HTML wouldn't be too bad...
Maybe I will have a look at core text, but yeah, I was hoping for a simpler option.
Nope, there is no simple solution. Apple needs to add support for styled text to their frameworks. It's fairly easy to do on the Mac using NSAttributedText.
Maybe some enterprising person or people could write a styled text view using Core Text and post it on GitHub under the MIT license or similar. It would be quite a bit of work though.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
you would probably need to create a seperate uilabel for each letter which wouldn't be too hard to do.
Yep, this is the solution I am currently going for. Stack labels for each letter side by side. Simple enough to do, but it would be nice if there was a more elegant solution.
Check out this password generator app that shows various techniques including using a data container singleton object to share data between objects in your project.
It seems that label is what he is looking for then:
Quote:
TTTAttributedLabel was created to be a drop-in replacement for UILabel, that provided a simple API to styling text with NSAttributedString while remaining performant.
__________________
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.