Thanks to visit codestin.com
Credit goes to github.com

Skip to content

triplef/BlocksKit

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Blocks in C and Objective-C are downright magical. They make coding easier and potentially quicker, not to mention faster on the front end with multithreading and Grand Central Dispatch. BlocksKit hopes to facilitate this kind of programming by removing some of the annoying - and, in some cases, impeding - limits on coding with blocks.

BlocksKit is a static library for iOS 3.2 and up. It can technically work on Mac OS X 10.6+ (with Chameleon for the UIKit stuff), but this project does not encompass that target at this time.

What's Included

  • Performing blocks on an NSObject.
  • Key-value observation (<NSKeyValueObserving>) using a block handler
  • Associated objects using an Obj-C API. (Not directly block-related.)
  • NSArray, NSSet, and NSDictionary filter utilities
  • BKMacros, for more quickly typing out the above.
  • NSInvocation creation using blocks
  • NSTimer block execution
  • UIAlertView, UIActionSheet with block callbacks
  • Block initializers for UIControl and UIBarButtonItem
  • Initializer for UIGestureRecognizer
  • On-touch utilities for UIView.

Installation

  • Clone the repository.
  • In Xcode 4, click-and-drag (or add using File > Add Files to Project) the BlocksKit XCode project into a project or workspace.
  • In the build phases of a target, add libBlocksKit.a to the "Target Dependencies" and "Link Binary with Libraries".
  • In the build settings, change "All Linker Flags" to "-ObjC -all_load" and "Header Search Paths" to "$(BUILT_PRODUCTS_DIR)".
  • In your project prefix or any other header file, insert #import <BlocksKit.h>.

Documentation

Documentation is exhaustive and done using AppleDoc.

An Xcode 4 compatible documentation set is available using this Atom link. Add it to Xcode 4's preferences and it'll download automatically.

You can also view the documentation online at my website.

Contributors

BlocksKit takes, repurposes, fiddles with, and groups together a variety of block-related code generally found here on GitHub. All of the included code is licensed either under BSD, MIT, or is in the public domain. The project itself is free for use in any and all projects and is licensed under MIT.

The following people (in alphabetical order) have their code lovingly enshrined in BlocksKit:

  • Michael Ash. @mikeash
  • Jiva DeVoe. @jivadevote
  • Corey Floyd. @coreyfloyd
  • Landon Fuller, Plausible Labs.
  • Mirko Kiefer. @mirkok
  • Robin Lu. @robin
  • Jake Marsh. @jakemarsh
  • Andy Matuschak. @andymatuschak
  • Aleks Nesterow. @nesterow
  • Kevin O'Neill. @kevinoneill
  • Jonathan Rentzch. @rentzch
  • Peter Steinberger. @steipete

About

The Objective-C block utilities you always wish you had.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors