New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Warning in XCode 7 #33
Comments
Not sure which warning flags you have set on your project, but that's absolutely right, if you target iOS 6.0 or higher. That code is just a workaround for iOS versions lower than 6.0. I guess it should be solvable with a #if defined(__IPHONE_6_0) && (__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_6_0)
CTTextAlignment alignment = NSTextAlignmentToCTTextAlignment(self.textAlignment);
#else
CTTextAlignment alignment = NSTextAlignmentToCTTextAlignment ? NSTextAlignmentToCTTextAlignment(self.textAlignment) : [self CTTextAlignmentFromNSTextAlignment:self.textAlignment];
#endif |
Yep, works fine with that new code snippet and the warning goes away. I’m not using any other warning flags that come with the default settings of XCode. |
Fixed in version 1.4.7 |
THLabel.m line 430:
CTTextAlignment alignment = NSTextAlignmentToCTTextAlignment ? NSTextAlignmentToCTTextAlignment(self.textAlignment) : [self CTTextAlignmentFromNSTextAlignment:self.textAlignment];
gives a warning "Code will never be executed".
Not really a problem, but I like to keep my code warning free, so might be worth fixing for people with similar needs.
The text was updated successfully, but these errors were encountered: