Crash when snapshot
Bluelich opened this issue · comments
Code:
- (UIImage *)screenShotRect:(CGRect)aRect
// Use this method to render a snapshot of the view hierarchy into the current context.
Returns NO if the snapshot is missing image data, YES if the snapshot is complete.
Calling this method from layoutSubviews while the current transaction is committing
will capture what is currently displayed regardless if afterUpdates is YES.
- (BOOL)drawViewHierarchyInRect:(CGRect)rect afterScreenUpdates:(BOOL)afterUpdates NS_AVAILABLE_IOS(7_0);
如果在截图的过程中,视图层级中的某个view被释放掉,这个方法可能会导致崩溃
目前仅在iOS 11.0 (15A5318g)上遇到过2次,希望能尽快修复!