Latest 0.1.0
License MIT
Platforms ios 5.0, requires ARC

Small library with a few helpers that I use daily to save up some code.


instead of:

CGRect frame = view.frame;
frame.size.width -= 20;
view.frame = frame;

you can write:

view.frame.width -= 20;

Categories provided

  • UIImage.width and UIImage.height
  • UIView:
    • CGFloat x
    • CGFloat y
    • CGFloat width
    • CGFloat height
    • CGFloat boundsX
    • CGFloat boundsY
    • CGFloat boundsWidth
    • CGFloat boundsHeight
    • CGPoint origin
    • CGPoint boundsOrigin
    • CGSize size
    • CGSize boundsSize
  • UIButton
    • UIImage *image
    • UIImage *backgroundImage
    • UIImage *selectedImage
    • UIImage *selectedBackgroundImage
    • NSString *title
    • NSString *selectedTitle

Other helpers:

  • Device helpers

    BOOL IsRetinaScreen();
    BOOL IsRetina4Screen();
    CGFloat iOSVersion();
    BOOL iOSVersionIsAtLeast(CGFloat version);
    BOOL iOSVersionIsAtMost(CGFloat version);
    BOOL iOSVersionIsGreatherThan(CGFloat version);
    BOOL iOSVersionIsLessThan(CGFloat version);
  • Notification helpers (I tried to make notifications as easy and flexible as possible, so there are a lot of optional parameters)

    On(NSString *event[, id object], NotificationBlock block);
    On(NSString *event[, id object], id target, NSString *selectorName);
    Off(NSString *event[, NotificationBlock block]);
    Off(NSString *event[, id target, NSString *selectorName]);
    Trigger([id sender,] NSString *event [, NSDictionary *userInfo]);
    • Clarifying notification parameters:
      The second On method could be originally written as:
    [[NSNotificationCenter defaultCenter] addObserver:target

    Alternatively you may substitute the target and selector for a block…

Latest podspec

    "name": "TZShortKit",
    "version": "0.1.0",
    "summary": "iOS library of shortcuts for long properties",
    "description": "                    ObjC library of shortcuts for long propertiesn                    TZShortKit shortens things as `self.view.frame.size.width` -> `self.view.width`n",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Tadeu Zagallo": "[email protected]"
    "source": {
        "git": "",
        "tag": "v0.1.0"
    "platforms": {
        "ios": "5.0"
    "requires_arc": true,
    "source_files": "TZShortKit/**/*.{h,m}"

Pin It on Pinterest

Share This