Rework ASTraitCollection to Fix Warnings and Remove Boilerplate (#1211)

* Clean up trait collection to fix a ton of warnings and remove code

* Support Xcode 9 (iOS 11 SDK)

* Hack harder
This commit is contained in:
Adlai Holler
2018-11-06 08:31:09 -08:00
committed by GitHub
parent 5c9815f46d
commit e392f832f4
6 changed files with 123 additions and 499 deletions

View File

@@ -63,6 +63,7 @@
#define ASDisplayNodeCAssertPositiveReal(description, num) ASDisplayNodeCAssert(num >= 0 && num <= CGFLOAT_MAX, @"%@ must be a real positive integer: %f.", description, (CGFloat)num)
#define ASDisplayNodeCAssertInfOrPositiveReal(description, num) ASDisplayNodeCAssert(isinf(num) || (num >= 0 && num <= CGFLOAT_MAX), @"%@ must be infinite or a real positive integer: %f.", description, (CGFloat)num)
#define ASDisplayNodeCAssertPermanent(object) ASDisplayNodeCAssert(CFGetRetainCount((__bridge CFTypeRef)(object)) == CFGetRetainCount(kCFNull), @"Expected %s to be a permanent object.", #object)
#define ASDisplayNodeErrorDomain @"ASDisplayNodeErrorDomain"
#define ASDisplayNodeNonFatalErrorCode 1