Skip to content

Commit

Permalink
Changing framework to category
Browse files Browse the repository at this point in the history
  • Loading branch information
mattt committed Jul 14, 2014
1 parent f98a2aa commit 79fad1c
Show file tree
Hide file tree
Showing 98 changed files with 121 additions and 121 deletions.
2 changes: 1 addition & 1 deletion 2012-07-07-nsindexset.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: NSIndexSet
ref: "https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSSet_Class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 7.8
description: "NSIndexSet (and its mutable counterpart, NSMutableIndexSet) is a sorted collection of unique unsigned integers. Think of it like an NSRange that supports non-contiguous series. It has wicked fast operations for finding indexes in ranges or set intersections, and comes with all of the convenience methods you'd expect in a Foundation collection class."
---
Expand Down
2 changes: 1 addition & 1 deletion 2012-07-14-nscache.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: NSCache
ref: "https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSCache_Class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 7.5
description: "Poor NSCache, always being overshadowed by NSMutableDictionary. It's as if no one knew how it provides all of that garbage collection behavior that developers take great pains to re-implement themselves."
---
Expand Down
2 changes: 1 addition & 1 deletion 2012-07-24-nssortdescriptor.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: NSSortDescriptor
ref: "https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSSortDescriptor_Class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 8.4
description: "Sorting: it's the mainstay of Computer Science 101 exams and whiteboarding interview questions. But when was the last time you actually needed to know how to implement Quicksort yourself?"
---
Expand Down
2 changes: 1 addition & 1 deletion 2012-07-31-nsdatecomponents.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: NSDateComponents
ref: "https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSDateComponents_Class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 6.9
description: "NSDateComponents serves an important role in Foundation's date and time APIs. By itself, it's nothing impressive—just a container for information about a date (its month, year, day of month, week of year, or whether that month is a leap month). However, combined with NSCalendar, NSDateComponents becomes a remarkably convenient interchange format for calendar calculations."
---
Expand Down
6 changes: 3 additions & 3 deletions 2012-08-06-cfstringtransform.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: CFStringTransform
ref: "https://developer.apple.com/library/mac/documentation/CoreFOundation/Reference/CFMutableStringRef/Reference/reference.html#//apple_ref/doc/uid/20001504-CH201-BCIGCACA"
framework: CoreFoundation
category: CoreFoundation
rating: 9.1
description: "NSString is the crown jewel of Foundation. But as powerful as it is, one would be remiss not to mention its toll-free bridged cousin, CFMutableString—or more specifically, CFStringTransform."
---
Expand Down Expand Up @@ -113,12 +113,12 @@ For example, let's say you want to build a searchable index of movies on the dev

- First, apply the `kCFStringTransformToLatin` transform to transliterate all non-English text into a Latin alphabetic representation.

> Hello! こんにちは! สวัสดี! مرحبا! 您好! →
> Hello! こんにちは! สวัสดี! مرحبا! 您好! →
> Hello! kon'nichiha! s̄wạs̄dī! mrḥbạ! nín hǎo!
- Next, apply the `kCFStringTransformStripCombiningMarks` transform to remove any diacritics or accents.

> Hello! kon'nichiha! s̄wạs̄dī! mrḥbạ! nín hǎo! →
> Hello! kon'nichiha! s̄wạs̄dī! mrḥbạ! nín hǎo! →
> Hello! kon'nichiha! swasdi! mrhba! nin hao!
- Finally, downcase the text with `CFStringLowercase`, and split the text into tokens with [`CFStringTokenizer`](https://developer.apple.com/library/mac/#documentation/CoreFoundation/Reference/CFStringTokenizerRef/Reference/reference.html) to use as an index for the text.
Expand Down
2 changes: 1 addition & 1 deletion 2012-08-13-nsincrementalstore.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: NSIncrementalStore
ref: "https://developer.apple.com/library/mac/#documentation/CoreData/Reference/NSIncrementalStore_Class/Reference/NSIncrementalStore.html"
framework: Foundation
category: Foundation
rating: 9.5
published: true
description: Even for a blog dedicated to obscure APIs, <tt>NSIncrementalStore</tt> sets a new standard. It was introduced in iOS 5, with no more fanfare than the requisite entry in the SDK changelog. Ironically, it is arguably the most important thing to come out of iOS 5, which will completely change the way we build apps from here on out.
Expand Down
6 changes: 3 additions & 3 deletions 2012-08-20-nsoperation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
layout: post
title: NSOperation
ref: "https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSOperation_class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 9.0
description: "Everyone knows that the secret to making an app snappy and responsive is to offload computation asynchronously to the background."
---

Everyone knows that the secret to making an app snappy and responsive is to offload computation to be done asynchronously in the background.
Everyone knows that the secret to making an app snappy and responsive is to offload computation to be done asynchronously in the background.

The modern Objective-C developer has two options in this respect: [Grand Central Dispatch](http://en.wikipedia.org/wiki/Grand_Central_Dispatch) or [`NSOperation`](https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/NSOperation_class/Reference/Reference.html). Since GCD has gone pretty mainstream, let's focus on the latter, object-oriented approach.

Expand Down Expand Up @@ -41,7 +41,7 @@ Each property must be mutually exclusive from one-another in order to encode a c

It may be useful to cancel operations early to prevent needless work from being performed. Reasons for cancellation may include explicit user action, or a failure in a dependent operation.

Similar to execution state, `NSOperation` communicates changes in cancellation state through KVO on the `isCancelled` keypath. When an operation responds to the `-cancel` command, it should clean up any internal details and arrive in an appropriate final state as quickly as possible. Specifically, the values for both `isCancelled` and `isFinished` need to become `YES`, and the value of `isExecuting` to `NO`.
Similar to execution state, `NSOperation` communicates changes in cancellation state through KVO on the `isCancelled` keypath. When an operation responds to the `-cancel` command, it should clean up any internal details and arrive in an appropriate final state as quickly as possible. Specifically, the values for both `isCancelled` and `isFinished` need to become `YES`, and the value of `isExecuting` to `NO`.

One thing to definitely watch out for are the spelling peculiarities around the word "cancel". Although spelling varies across dialects, when it comes to `NSOperation`:

Expand Down
2 changes: 1 addition & 1 deletion 2012-08-27-cfbag.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: CFBag
ref: "https://developer.apple.com/library/mac/#documentation/CoreFOundation/Reference/CFMutableBagRef/Reference/reference.html"
framework: CoreFoundation
category: CoreFoundation
rating: 7.2
published: true
description: "In the pantheon of collection data types in computer science, bag doesn't really have the same clout as lists, sets, associative arrays, trees, graphs, or priority queues. In fact, it's pretty obscure. You've probably never heard of it."
Expand Down
2 changes: 1 addition & 1 deletion 2012-09-03-nslocale.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: NSLocale
ref: "https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSLocale_Class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 9.0
published: true
description: "Internationalization is like flossing: everyone knows they should do it, but probably don't."
Expand Down
2 changes: 1 addition & 1 deletion 2012-09-10-uiaccessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: UIAccessibility
ref: "http://developer.apple.com/library/ios/#documentation/uikit/reference/UIAccessibility_Protocol/Introduction/Introduction.html"
framework: UIKit
category: UIKit
rating: 10.0
published: true
description: "Accessibility, like internationalization, is one of those topics that's difficult to get developers excited about. But as you know, NSHipster is all about getting developers excited about this kind of stuff."
Expand Down
2 changes: 1 addition & 1 deletion 2012-09-17-nscharacterset.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: NSCharacterSet
ref: "http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nscharacterset_Class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 8.5
published: true
description: "Foundation boasts one of the best, most complete implementations of strings around. But a string implementation is only as good as the programmer who wields it. So this week, we're going to explore some common uses--and misuses--of an important part of the Foundation string ecosystem: NSCharacterSet."
Expand Down
16 changes: 8 additions & 8 deletions 2012-09-24-uicollectionview.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
layout: post
title: UICollectionView
ref: "https://developer.apple.com/library/ios/#documentation/UIKit/Reference/UICollectionView_class/Reference/Reference.html#//apple_ref/doc/uid/TP40012177"
framework: UIKit
category: UIKit
rating: 9.6
published: true
description: "UICollectionView single-handedly changes the way we will design and develop iOS apps from here on out. This is not to say that collection views are in any way unknown or obscure. But being an NSHipster isn't just about knowing obscure gems in the rough. Sometimes, it's about knowing about up-and-comers before they become popular and sell out."
---

`UICollectionView` is the new `UITableView`. It's that important.

This is not to say that collection views are in any way unknown or obscure--anyone who went to any of the WWDC sessions about it, or got to play with in the iOS 6 beta already know what's up.
This is not to say that collection views are in any way unknown or obscure--anyone who went to any of the WWDC sessions about it, or got to play with in the iOS 6 beta already know what's up.

Remember, being an NSHipster isn't just about knowing obscure gems in the rough. Sometimes, it's about knowing about up-and-comers before they become popular and sell out. So before everybody else finds out for themselves, here's the skinny on the next big thing:

Expand All @@ -24,7 +24,7 @@ Unlike `UITableView`, however, `UICollectionView` is not constrained to a vertic

### Cell Views

In another departure from the old-school table view way of doing things, the process of recycling views has been significantly improved.
In another departure from the old-school table view way of doing things, the process of recycling views has been significantly improved.

In `-tableView:cellForRowAtIndexPath:`, a developer had to invoke the familiar incantation:

Expand All @@ -41,7 +41,7 @@ if (!cell) {

Because collection views aren't relegated to any particular structure, the convention of "header" and "footer" views isn't really applicable. So in its place, collection views have _supplementary views_, which can be associated with each cell.

Each cell can have multiple supplementary views associated with it--one for each named "kind". As such, headers and footers are just the beginning of what can be done with supplementary views.
Each cell can have multiple supplementary views associated with it--one for each named "kind". As such, headers and footers are just the beginning of what can be done with supplementary views.

The whole point is that with supplementary views, even the most complex layout can be accomplished without compromising the semantic integrity of cells. `UITableView` hacks are to [`spacer.gif`](http://en.wikipedia.org/wiki/Spacer_GIF) as `UICollectionView` cells are to [semantic HTML](http://en.wikipedia.org/wiki/Semantic_HTML).

Expand All @@ -55,14 +55,14 @@ One thing to remember about decoration views is that they are entirely managed b

Layouts are at the heart of what makes `UICollectionView` so magical. Think of them as the CSS to your semantic HTML of collection cells from before.

`UICollectionViewLayout` is an abstract base class for positioning cell views and their supplementary and decoration views. But rather than subclass this directly, most applications will opt to use or subclass `UICollectionViewFlowLayout`. Flow layouts cover the broad class of layouts with some notion of linearity, whether that's a single row or column or a grid.
`UICollectionViewLayout` is an abstract base class for positioning cell views and their supplementary and decoration views. But rather than subclass this directly, most applications will opt to use or subclass `UICollectionViewFlowLayout`. Flow layouts cover the broad class of layouts with some notion of linearity, whether that's a single row or column or a grid.

Until you're comfortable enough to understand the limitations of flow layouts, it's generally a safe bet to just start with that.
Until you're comfortable enough to understand the limitations of flow layouts, it's generally a safe bet to just start with that.

Each cell view, supplemental view, and decoration view have layout attributes. To get an idea of how flexible layouts are, look no further than the properties of an `UICollectionViewLayoutAttributes` object:

- `frame`
- `center`
- `center`
- `size`
- `transform3D`
- `alpha`
Expand All @@ -89,7 +89,7 @@ Since the introduction of the iPad, there has been a subtle, yet lingering tensi

There are a million ways Apple could (or could not) have provided this kind of functionality, but they really knocked it out of the park with how they designed everything.

The clean, logical separation between data source and layout; the clear division between cell, supplementary, and decoration views; the extensive set of layout attributes that are automatically animated... a lot of care and wisdom has been put together with these APIs.
The clean, logical separation between data source and layout; the clear division between cell, supplementary, and decoration views; the extensive set of layout attributes that are automatically animated... a lot of care and wisdom has been put together with these APIs.

As a result, the entire landscape of iOS apps will be forever changed. With collection views, the aesthetic shift that was kicked off with the iPad will explode into an entire re-definition of how we expect apps to look and behave.

Expand Down
2 changes: 1 addition & 1 deletion 2012-10-01-pragma.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: "#pragma"
ref: "https://developer.apple.com/library/mac/#documentation/DeveloperTools/gcc-4.0.1/gcc/Pragmas.html#Pragmas"
framework: Objective-C
category: Objective-C
rating: 8.0
published: true
description: "#pragma declarations are a mark of craftsmanship in Objective-C. Although originally purposed for compiling source code across many different compilers, the modern Xcode-savvy programmer uses #pragma declarations to very different ends."
Expand Down
2 changes: 1 addition & 1 deletion 2012-10-08-at-compiler-directives.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: "@"
ref: ""
framework: Objective-C
category: Objective-C
rating: 8.7
published: true
description: "If we were to go code-watching for Objective-C, what would we look for? Square brackets, ridiculously-long method names, and <tt>@</tt>'s. \"at\" sign compiler directives are as central to understanding Objective-C's gestalt as its ancestry and underlying mechanisms. It's the sugary glue that allows Objective-C to be such a powerful, expressive language, and yet still compile all the way down to C."
Expand Down
2 changes: 1 addition & 1 deletion 2012-10-15-addressbookui.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: AddressBookUI
ref: "http://developer.apple.com/library/ios/#documentation/AddressBookUI/Reference/AddressBookUI_Framework/_index.html"
framework: AddressBookUI
category: AddressBookUI
rating: 6.2
published: true
description: "Address Book UI is an iOS framework for displaying, selecting, editing, and creating contacts in a user's Address Book. Similar to the Message UI framework, Address Book UI contains a number of controllers that can be presented modally, to provide common system functionality in a uniform interface."
Expand Down
2 changes: 1 addition & 1 deletion 2012-10-22-nslinguistictagger.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: NSLinguisticTagger
ref: "http://developer.apple.com/library/ios/#documentation/cocoa/reference/NSLinguisticTagger_Class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 9.7
published: true
description: "NSLinguisticTagger is a veritable Swiss Army Knife of linguistic functionality, with the ability to tokenize natural language strings into words, determine their part-of-speech & stem, extract names of people, places, & organizations, and tell you the languages & respective writing system used in the string."
Expand Down
2 changes: 1 addition & 1 deletion 2012-10-29-uilocalizedindexedcollation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: UILocalizedIndexedCollation
ref: "http://developer.apple.com/library/ios/#documentation/iPhone/Reference/UILocalizedIndexedCollation_Class/UILocalizedIndexedCollation.html"
framework: UIKit
category: UIKit
rating: 7.1
published: true
description: "UITableView starts to become unwieldy once it gets to a few hundred rows. If users are reduced to frantically scratching at the screen like a cat playing Fruit Ninja in order to get at what they want... you may want to rethink your UI approach."
Expand Down
2 changes: 1 addition & 1 deletion 2012-11-05-nsurlprotocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: NSURLProtocol
ref: "https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLProtocol_Class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 7.4
published: true
description: "Foundation’s URL Loading System is something that every iOS developer would do well to buddy up with. And of all of networking classes and protocols of Foundation, NSURLProtocol is perhaps the most obscure and powerful."
Expand Down
2 changes: 1 addition & 1 deletion 2012-11-12-nsvaluetransformer.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: NSValueTransformer
ref: "https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSValueTransformer_Class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 6.6
published: true
description: "Of all the Foundation classes, NSValueTransformer is perhaps the one that fared the worst in the shift from OS X to iOS. But you know what? It's ripe for a comeback. With a little bit of re-tooling and some recontextualization, this blast from the past could be the next big thing in your application."
Expand Down
2 changes: 1 addition & 1 deletion 2012-11-19-ns_enum-ns_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: "NS_ENUM & NS_OPTIONS"
ref: "https://developer.apple.com/library/mac/#releasenotes/General/APIDiffsMacOSX10_8/Foundation.html"
framework: Foundation
category: Foundation
rating: 7.0
published: true
description: "A skilled Objective-C developer is able to gracefully switch between Objective and Procedural paradigms, and use each to their own advantage."
Expand Down
2 changes: 1 addition & 1 deletion 2012-11-26-nsorderedset.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: "NSOrderedSet"
ref: "http://developer.apple.com/library/mac/#documentation/Foundation/Reference/NSOrderedSet_Class/Reference/Reference.html"
framework: Foundation
category: Foundation
rating: 6.2
published: true
description: "Why isn't NSOrderedSet a subclass of NSSet? The answer may surprise you."
Expand Down
2 changes: 1 addition & 1 deletion 2012-12-03-kvc-collection-operators.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: "KVC Collection Operators"
ref: "http://developer.apple.com/library/ios/#documentation/cocoa/conceptual/KeyValueCoding/Articles/CollectionOperators.html"
framework: Foundation
category: Foundation
rating: 7.9
published: true
description: "Rubyists laugh at Objective-C’s bloated syntax. Although we lost a few pounds over the summer with our sleek new object literals, those Red-headed bullies still taunt us with their map one-liners and their fancy Symbol#to_proc. Fortunately, Key-Value Coding has an ace up its sleeves."
Expand Down
2 changes: 1 addition & 1 deletion 2012-12-10-instancetype.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
layout: post
title: instancetype
ref: "http://clang.llvm.org/docs/LanguageExtensions.html#objc_instancetype"
framework: Foundation
category: Foundation
rating: 7.3
published: true
description: "Objective-C is a rapidly evolving language, in a way that you just don't see in established programming languages. Developments range from the mundane to paradigm-changing, but telling the difference takes practice. Because we're talking about low-level language features, it's difficult to understand what implications they may have higher up with API design."
Expand Down
Loading

0 comments on commit 79fad1c

Please sign in to comment.