Brian Gesiak

11pods

Kiwi

A Behavior Driven Development library for iOS and OS X.

License: MIT

  • Objective C

MDCDamerauLevenshtein

MDCDamerauLevenshtein includes two algorithms for calculating the edit distance between NSString objects:

  1. Levenshtein distance calculates the number of insertions, deletions, and substitions necessary in order to convert one string into the other.
  2. Damerau-Levenshtein improves upon Levenshtein to include the transposition of two adjacent characters. Damerau states that some combination of the four operations make up for 80% of all human spelling errors.

Potential applications for this library:

  • Don't just use -[NSString compare:options:] to filter search results, display terms with small edit distances.
  • ...and many more!

License: MIT

  • Objective C

MDCFocusView

Apply a "tutorial screen" overlay to your application window.

License: MIT

  • Objective C

MDCParallaxView

Create a parallax effect using a custom container view, much like the top view of Path's timeline.

License: MIT

  • Objective C

MDCQuickSelect

Categories to quickly select the "n-th most" element, or the "n most" elements (unsorted) in an array.

For example, if you need to find the tenth smallest number in an array of 100,000:

```objc

import

// 79% faster than sorting the numbers and accessing -objectAtIndex:10 NSNumber *tenth = [numbers mdc_objectAtIndex:10 inSortedArrayUsingComparator:^NSComparisonResult(NSNumber *left, NSNumber *right) { return [left compare: right]; }]; ```

Or to find the ten smallest numbers in an array of 100,000:

objc // 71% faster than sorting the numbers and accessing -subarrayWithRange:NSMakeRange(0, 10) [numbers mdc_subarrayWithRange:NSMakeRange(0, 10) inSortedArrayUsingComparator:^NSComparisonResult(NSNumber *left, NSNumber *right){ return [left.numberOfFriends compare:right.numberOfFriends]; }];

The improved performance is achieved by using the quickselect algorithm, developed by Tony Hoare, inventor of quicksort.

Performance is infinitesimally worse when array size is less than 150 elements. For arrays larger than 150 elements, MDCQuickSelect outperforms the naive approach, sometimes by vast margins. Run the benchmarking tests and see for yourself!

License: MIT

  • Objective C

MDCScrollBarLabel

Like Path's timestamp scrollbar label.

License: MIT

  • Objective C

MDCShineEffect

Add a "shine" effect to any view.

License: MIT

  • Objective C

MDCSwipeToChoose

Swipe to "like" or "dislike" any view, just like Tinder.app. Build a flashcard app, a photo viewer, and more, in minutes, not hours!

License: MIT

  • Objective C

Nimble

Use Nimble to express the expected outcomes of Swift or Objective-C expressions. Inspired by Cedar.

License: Apache-2.0

  • Swift

Quick

Quick is a behavior-driven development framework for Swift and Objective-C. Inspired by RSpec, Specta, and Ginkgo.

License: Apache-2.0

  • Swift

UIView+MDCBlink

HTML for iOS.

License: MIT

  • Objective C