Latest 0.0.1
Homepage https://github.com/cyrilchandelier/SpacingLabel
License MIT
Platforms ios 7.0, requires ARC
Authors

Subclass of UILabel enabling better compliance with graphic charts in terms of space between text and other elements

Introduction

Did you ever notice that a label vertically centered in a view is not perfectly in the middle of the view? That’s because text is drawn relying on UIFont’s information, especially the leading space and the descender of it. Removing this space from the top and the bottom of your label allows you to have more control on your layout; you can add a 20pts vertical constraints between two label and be sure that this space will be respected. This is why the SpacingLabel has been created.

SpacingLabel
Using standard UILabel components

SpacingLabel
Using SpacingLabel components

SpacingLabel
This highlight the drawing zone while the content size fits the text

How does it work?

The SpacingLabel simply retrieve the font of the first line of text and the font of the last line of text to remove extra space on top of the first font cap height and the last font descender.

Latest podspec

{
    "name": "SpacingLabel",
    "version": "0.0.1",
    "summary": "Subclass of UILabel enabling better compliance with graphic charts in terms of space between text and other elements",
    "description": "                   The SpacingLabel simply retrieve the font of the first line of text and the font of the last line of text to remove extra space on top of the first font cap height and the last font descender.n",
    "homepage": "https://github.com/cyrilchandelier/SpacingLabel",
    "screenshots": "https://raw.githubusercontent.com/cyrilchandelier/SpacingLabel/master/Assets/with_spacing_label.png",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Cyril Chandelier": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/cyrilchandelier/SpacingLabel.git",
        "tag": "0.0.1"
    },
    "source_files": "*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This