A simple RubyMotion wrapper for iOS 7's Dynamic Type to make it easier to set the fonts, as well as getting the information you need and notifications for responding to the layout changes.
Help support this gem by learning
The only reason I can keep making gems and keep them up to date is because lovely people like yourself support me. I run the MotionInMotion screencasts which you can purchase individually or as a bundle, I also have a school for RubyMotion development. All support, even small amounts really helps.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install motion-dynamic-type
Anything on RubyGems should be stable and fine to use, as this is early days though, the API is prone to change.
This is the available functionality so far. Eventually this will be a helpful tool for heavily simplifying all the things required for integrating Dynamic Type into your app, including responding to the size changing and working out sizing.
These methods get a font matching up the the text style. They're just a very simple wrapper around
UIFont.preferredFontForTextStyle, check out the source code.
MDT::Font.headline MDT::Font.subhead MDT::Font.body MDT::Font.caption_one MDT::Font.caption_two MDT::Font.footnote
- Fork it ( http://github.com/wndxlori/motion-dynamic-type/fork )
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request