ObjectiveCInlines 0.1.0

ObjectiveCInlines 0.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Unclaimed.


Downloads

Total22
Week0
Month0

Installs

Apps4
powered by Segment

GitHub

Stars9
Watchers2
Forks0
Issues0
Contributors1
Pull Requests0

Code

Files5
LOCLines of Code 79


  • By
  • Austin David Brown

Objective C Inlines

Fun, fast inline functions for Objective C.

Installation

  1. Manually add the 'ObjectiveCInlines' folder into your Xcode project.
  2. Install via CocoaPods
pod "ObjectiveCInlines", "~> 0.1.0"

Usage

NSArray

  #import <ObjectiveCInlines/NSArrayInlines.h>

  NSArrayEach(arr, ^(id obj) {
  });

  NSArrayMap(arr, ^id*(id obj) {
    return obj;
  });

  NSArrayReduce(arr, memo, ^id(id memo, id obj) {
    return memo;
  });

  NSArrayFind(numsArr, ^bool(id obj) {
    return true;
  });

NSDictionary

  #import <ObjectiveCInlines/NSDictionaryInlines.h>

  NSDictionaryEach(dict, ^(NSString *key, id obj) {
  });

  NSDictionaryMap(dict, ^id(NSString *key, id obj) {
    return obj;
  });

NSJSON

  #import <ObjectiveCInlines/NSJSONInlines.h>

  NSJSONObjectWithData(stringDictData, NSJSONReadingAllowFragments, nil);
  NSJSONDataWithObject(stringDict, NSJSONWritingPrettyPrinted, nil);

  NSJSONStringWithObject(dict, NSJSONWritingPrettyPrinted, nil);
  NSJSONObjectWithString(@"{}", NSJSONReadingAllowFragments, nil);

GCDAsync

  #import <ObjectiveCInlines/GCDInlines.h>

  GCDAsync(^{
    // background
  });

  GCDAsyncMain(^{
    // main thread
  });

Contributing

See CONTRIBUTING

License

See LICENSE

Team