Latest2
Homepagehttps://github.com/P0ed/RLE
LicenseMIT
Platformsios 7.0, requires ARC
FrameworksFoundation, UIKit
Authors

Literal convertibles for common obj-c types

Install via CocoaPods:

  1. Add the following line to your Podfile

    pod 'RLE', :git => 'https://github.com/P0ed/RLE.git', :branch => 'v3'
  2. Import the public header

    #import <RubyLikeExtensions.h>

Usage:

NSMutableAttributedString *string = @"Featured".localized.mutableAttributedString;
string.textColor = @(0xCC7722).rgbColor;
string.font = @(14).ptFont;
string.alignment = NSTextAlignmentCenter;

NSString *format = @"MM/dd/yyyy";
NSDate *date = @"11/27/2014".dateUsingFormat(format);
NSString *formattedDate = date.stringUsingFormat(format);

UIImage *img = @"bg_label".image;
NSURL *URL = @"https://github.com/P0ed/RLE".URL;

NSArray *array;
NSPredicate *predicate = @[@"synced = YES".predicate, @"upcoming = YES".predicate].orPredicate;
array = [array filteredArrayUsingPredicate:predicate];
array = [array sortedArrayUsingDescriptors:@[@"date".ascending]];

NSNumber *value;
value.ifTrue(^{

}).ifFalse(^{

});

Latest podspec

{
    "name": "RLE",
    "version": "2",
    "source": {
        "git": "https://github.com/P0ed/RLE.git",
        "tag": "v2"
    },
    "summary": "Literal convertibles for common obj-c types.",
    "homepage": "https://github.com/P0ed/RLE",
    "authors": {
        "Konstantin Sukharev": "[email protected]"
    },
    "social_media_url": "https://twitter.com/P0ed",
    "license": "MIT",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Source/",
    "frameworks": [
        "Foundation",
        "UIKit"
    ]
}

Pin It on Pinterest

Share This