Ray's playground

 

Strategy(Chapter 19 of Pro Objective-C Design Patterns for iOS)

A class uses multiple conditional statements in its operations to define many behaviors. You can move related conditional branches into their own strategy class.
You need different variants of an algorithm.
You need to avoid exposing complex and algorithm-specific data structures to clients.

posted on 2012-05-14 14:39  Ray Z  阅读(273)  评论(0编辑  收藏  举报

导航