Jed Lewison

5pods

AsyncOpKit

AsyncOpKit brings Swift generics, error handling, and closures to NSOperations with AsyncOp, a Swift-only generic NSOperation subclass for composing asynchronous code. AsyncOp supports:

  • Generic input and output
  • Closures for starting and cancelling work, handling results
  • Closures for evaluating preconditions
  • Making an AsyncOp dependent on input from another

You can subclass AsyncOp, but because it provides built-in storage for generic input and output and allows you to customize behavior with closures, in many if not most cases you can just use AsyncOp as-is.

License: MIT

  • Swift

ConstraintKit

ConstraintKit makes it easy to activate, deactivate, and update layout constraints on iOS in Swift and Objective-C. It intelligently disables translatesAutoresizingMaskIntoConstraints on views participating in auto-layout, lets you update installed constraints without storing references to them, and lets you activate individual constraints in a single line of code, but it's most powerful feature is that it lets define the layout for an entire view in just one line.

License: MIT

  • Swift

MAFActionSheetController

MAFActionSheetController manages action sheet-style view controllers on iOS 7+ using MAFOverlay to present as an overlay from a bar button item or a view.

  • Similar to UIAlertController, but with full control over layout and works with iOS 7+.
  • Default layout is similar to popover style on iPhone
  • Add custom header and footer
  • Supports vertical scrolling for long sheets
  • Choose primary and detail text attributes.
  • Supply a custom background view for each action item to completely customize appearance.
  • Uses MAFOverlay to coordinate presentations

License: MIT

  • Objective C

MAFOverlay

MAFOverlay brings popover-style overlay presentations to iPhone and iPad on iOS 7+.

  • MAFOverlay presents view controllers as overlays
  • Default setup should work for most cases—simply create a coordinator object for the presented view controller
  • Handles iOS 7 rotation—simply let the coordinator know about willanimaterotation events
  • Works well with MAFOptionActionController for customizable ActionSheet style presentations
  • Supports a subset of popover features, including presenting from Bar Button or View
  • Supports Cross Dissolve and Cover Vertical transitions, but is customizable
  • Uses UIKit's custom modal presentation API
  • Provides grain control over animation and layout through layout attributes object and datasource

License: MIT

  • Objective C

SwiftSynchronized

@synchronized for Swift, using calls to the Objective-C runtime and providing nearly identical syntax. Also provides performAndWait extension for NSLock and NSRecursiveLock.

License: MIT

  • Swift