Latest 0.0.2
Homepage https://github.com/hons82/UILabel-PinchZoom
License MIT
Platforms ios 4.3, requires ARC
Authors

Pod Version
Pod Platform
Pod License

Simple pinch-zoom category for UILabel.

This clearly inspired by UITextView-PinchZoom who is the real author of the category.
I just made some adaptions to have it working on UILabel and a sample program to show how it can be implemented using storyboard

Installation

CocoaPods

Install with CocoaPods by adding the following to your Podfile:

platform :ios, '4.3'
pod 'UILabel+PinchZoom', '~> 0.0.2'

Note: We follow http://semver.org for versioning the public API.

Manually

Or copy the UILabel-PinchZoom/ directory from this repo into your project.

Usage

This is how you can create it:

#import "UILabel+PinchZoom.h"

//...

UILabel *label = [[UILabel alloc] initWithFrame:self.view.frame];
[self.view addSubview:label];
label.zoomEnabled = YES;
label.minFontSize = 10;
label.maxFontSize = 40;

Usually you’ll nest it into a UIScrollview which will force you to do something like this in most cases

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
    [self.commentLabel setNeedsLayout];
}

Have a look at the Example Project for more details

Contributions

…are really welcome. If you have an idea just fork the library change it and if its useful for others and not affecting the functionality of the library for other users I’ll insert it

License

Source code of this project is available under the standard MIT license. Please see the license file.

Latest podspec

{
    "name": "UILabel+PinchZoom",
    "version": "0.0.2",
    "summary": "Simple pinch-zoom category for UILabel",
    "homepage": "https://github.com/hons82/UILabel-PinchZoom",
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "Hannes Tribus": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hons82/UILabel-PinchZoom.git",
        "tag": "v0.0.2"
    },
    "platforms": {
        "ios": "4.3"
    },
    "requires_arc": true,
    "source_files": "UILabel-PinchZoom/*.{h,m}"
}

Pin It on Pinterest

Share This