AliSoftware/OHAttributedLabel — pull request #155 by cristianbica (2013-09-13 06:02:48+00:00)
Title: Fixed iOS5 crash

When using an app with OHAttributedLabel on iOS 5 it will crash with:

```
dyld: lazy symbol binding failed: Symbol not found: _NSTextAlignmentToCTTextAlignment
Referenced from: /Users/cristi/Library/Application Support/iPhone Simulator/5.0/Applications/78925988-57FD-49D3-B088-0C9D80F462E1/OHAttributedLabelIOS5Bug.app/OHAttributedLabelIOS5Bug
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit

dyld: Symbol not found: _NSTextAlignmentToCTTextAlignment
Referenced from: /Users/cristi/Library/Application Support/iPhone Simulator/5.0/Applications/78925988-57FD-49D3-B088-0C9D80F462E1/OHAttributedLabelIOS5Bug.app/OHAttributedLabelIOS5Bug
Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk/System/Library/Frameworks/UIKit.framework/UIKit
```

That's because when using iOS6+ symbols you're checking for the base SDK
```
-#if __IPHONE_OS_VERSION_MAX_ALLOWED < 60000
```

and not for the deployment target
```
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_6_0
```

Here's an example: https://github.com/cristianbica/OHAttributedLabelIOS5Bug
To reproduce:
- run pod install
- run the app from XCode
- it will crash
- modify the Podfile to use my fork
- it won't crash

notes:
1. I've added a podspec so the example project will work
2. I've modified just in OHAttributedLabel/PrivateUtils/CoreTextUtils.m as this is where it crashed but probably we need to change this in the whole project