Skip to content

Robbe92/TiDynamicTypeUtils

 
 

Repository files navigation

TiDynamicTypeUtils

Use Dynamic Type, introduced by iOS 7, in your Titanium SDK application!

Example

To see a complete example have a look at example/app.js.

var dynamictype = require('it.smc.dynamictypeutils')

var label = Ti.UI.createLabel({
	font: {
		fontSize: dynamictype.getFontSize(Ti.UI.TEXT_STYLE_SUBHEADLINE)
	}
});

Remember: when you use Dynamic Type, the interface does not update automatically if has already been created and the user changes the system font size. This is the expected behaviour on iOS 7.

Support for Android

In Android you do not need this module, nor any module at all, just use the 'sp' unit.

Credits

Humbly made by the spry ladies and gents at SMC.

License

This library, TiDynamicTypeUtils, is free software ("Licensed Software"); you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; including but not limited to, the implied warranty of MERCHANTABILITY, NONINFRINGEMENT, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

About

TiDynamicTypeUtils gives you access to dynamic system font sizes (iOS 7)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 60.2%
  • Objective-C 35.7%
  • JavaScript 3.0%
  • Shell 1.1%