Giter Site home page Giter Site logo

ltgbau / blockskit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blockskit/blockskit

1.0 2.0 0.0 2.05 MB

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

Home Page: http://dizzytechnology.com/2011/05/18/say-hello-to-blockskit/

License: Other

blockskit's Introduction

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 framework andr static library for iOS 4.0+ and Mac OS X 10.6+.

What's In The Box

  • Performing blocks on an NSObject.
  • Key-value observation (<NSKeyValueObserving>) with block handlers.
  • Associated objects in an Obj-C API. (Not directly block-related.)
  • NSArray, NSSet, NSDictionary, and NSIndexSet filtering and enumeration.
  • Macros for more quickly typing out the above.
  • NSInvocation creation using a block.
  • NSTimer block execution.
  • Both delegation and block callbacks on NSURLConnection.
  • Delegate callback for NSCache.

UIKit Extensions

  • UIAlertView, UIActionSheet with block callbacks and convenience methods.
  • Block initializers for UIControl and UIBarButtonItem
  • Block-backed initializers for UIGestureRecognizer.
  • On-touch utilities for UIView.
  • Block callbacks for MFMailComposeViewController and MFMessageComposeViewController.
  • Delegate alternative for UIWebView.

Installation

BlocksKit can be added to a project using CocoaPods.

Release/Framework Build

  • Download a release of BlocksKit.
  • Move BlocksKit.framework to your project's folder. Drag it from there into your project.
  • In the build settings of your target or project, change "All Linker Flags" to -ObjC.
  • Insert #import <BlocksKit/BlocksKit.h> in any header file (including your project's prefix header).
  • Make amazing software.

Testing/Library Build

  • Clone the repository.
  • Click-and-drag the BlocksKit 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 and "Header Search Paths" to $(BUILT_PRODUCTS_DIR)/../BlocksKit/**.
  • If you are using Xcode 4.2 with the iOS 5.0 SDK on a non-ARC target, set "All Linker Flags" to -ObjC -fobjc-arc.
  • In any header file, insert #import "BlocksKit/BlocksKit.h". It is not recommended to insert the import statement in your project prefix, as it could break Xcode 4's Code Sense.

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.

License

BlocksKit is created and maintained by Zachary Waldowski under the MIT license (hello, nice to meet you). 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. You can use BlocksKit in any project, public or private, with or without attribution.

Unsure about your rights? Read more.

Contributors

BlocksKit takes, repurposes, fiddles with, and groups together a variety of block-related code generally found here on GitHub.

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

Individual credits exist in the header files and, consequently, in the documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.