HCObjectSwitch 1.1.0

HCObjectSwitch 1.1.0

TestsTested
LangLanguage Obj-CObjective C
License MIT
ReleasedLast Release Dec 2014

Maintained by Klaus-Peter Dudas.



  • By
  • Klaus-Peter Dudas

A simple way to implement object based switch-like statements in Objective-C using blocks.

Objective-C's switch statements only work on primitive types that are constant at compile time. However, many Objective-C APIs expect the developer to determine their behaviour based on identifiers passed in as NSString. To deal with this, HCObjectSwitch adds a simple syntax that is very similar to the native switch statement. In order to avoid clashing with the native syntax, all keywords start with a capital letter.

Installation

pod 'HCObjectSwitch'

Authors

Klaus-Peter Dudas

License

MIT