Many files were referencing macros defined by TargetConditionals before
including it.
Also updates one macro from the deprecated TARGET_IPHONE_SIMULATOR to
TARGET_OS_SIMULATOR.
- After #706, a layout pass is forced on an ASM-enabled node that enters preload state to make sure that its subnodes can start preloading as well. However, when the node is visible, a (coalesced, thus more efficient) layout pass will be triggered by CA soon anyways, so rely on it instead.
* [ASTraitCollection] Add missing properties to ASTraitCollection
* ASTraitCollection now completely reflects UITraitCollection
* Add ASContentSizeCategory enum that corresponds to
UIContentSizeCategory and can be used inside a struct.
* * Remove enum ASContentSizeCategory.
* Use __unsafe_unretained UIContentSizeCategory instead of the enum.
* Added ASPrimitiveTraitCollection lifetime test
* Changes requested at code review:
* Restore one of the ASTraitCollection constructors with a deprecation notice.
* Clean up API by the separation of tvOS-specific interfaces.
* Use [NSString -isEqualToString:] for ASPrimitiveContentSizeCategory equality tests for better readability.
* Encapsulate fallback logic for UIContentSizeCategoryUnspecified.
* Fix failing test
Lots of the classes the framework exposes publicly offer convenience class methods for their instantiation. Unfortunately those class methods don’t create instances of their respective instancetype as declared, but create instances of hardcoded classes.
This means subclasses cannot take advantage of those convenience methods without introducing bugs. When using an instance that is expected to inherit from the subclass but does in fact inherit from the superclass, calling methods of the subclass will throw an exception. Furthermore, it’s not possible to add variables to those instances without causing a buffer overflow.
While it is possible to work around this using the Objective-C runtime, it would cause unnecessary overhead. As the return type of those class methods is declared as instancetype, it is expected that they return an instance of the current class, self.
* Add "ASGraphicsContext" to skip copying our rendered images
* Zero the buffer before making a context
* Update license header
* Update dangerfile
* Make it a runtime flag
* Restore GState for good measure
* Free buffer if end without image
* Enable the experiment, and cut out the middle-man
* Fix typo