Latest 0.0.2
Homepage https://github.com/yichizhang/YZIconKit
License MIT
Platforms ios 6.0, requires ARC
Frameworks Foundation, UIKit
Authors

A collection of icons created with PaintCode.

It has some funny icons. Just added some Australian animals recently.

Preview

Screenshot
Screenshot

Usage

Install

Simply use CocoaPods:

pod 'YZIconKit'

Examples

Currently, the canvas size of all the icons is 200×200.

So I feel that there is a need to resize the icons when using them at different places.

I usually use the ‘imageOf…’ method to get the 200×200 image of the icon, resize it first and then use it.

This is how I use a ‘Kangaroo’ image as a view controller’s tab bar icon image:


// Get the image from YZIconKit
UIImage *fullImg = [YZIconKit imageOfKangaroo];
// Resize it!
UIImage *resizedImg = [YZUtility scaledImage:fullImg toSize:CGSizeMake(40, 40)];

// Set the view controller's tabBarItem
vc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"Title"
                                              image:resizedImg
                                                tag:0
                  ];

Implementation for image scaling:

@implementation YZUtility

+ (UIImage *)scaledImage:(UIImage*)image toSize:(CGSize)newSize {

    UIGraphicsBeginImageContextWithOptions(newSize, NO, 0.0);
    [image drawInRect:CGRectMake(0, 0, newSize.width, newSize.height)];
    UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    return newImage;

}

@end

The icons

People
Camera
Info
Hook Turn
Koala
Emu
Kangaroo
Wild Horse
Camel
Wombat

Latest podspec

{
    "name": "YZIconKit",
    "version": "0.0.2",
    "summary": "A collection of icons created with PaintCode.",
    "homepage": "https://github.com/yichizhang/YZIconKit",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Yichi Zhang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/yichizhang/YZIconKit.git",
        "tag": "0.0.2"
    },
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "source_files": "YZIconKit/*.{h,m}",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This