From c4cb9c9aa8bf245bcbf270335f02ac440a3f72a3 Mon Sep 17 00:00:00 2001 From: Oliver Drobnik Date: Mon, 22 Mar 2021 09:58:00 +0100 Subject: [PATCH] Fixed missing weak for DTAccessibilityElement and view proxy #1230 --- Core/Source/DTAccessibilityElement.m | 4 +++- Core/Source/DTAccessibilityViewProxy.h | 3 ++- Core/Source/DTWeakSupport.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Core/Source/DTAccessibilityElement.m b/Core/Source/DTAccessibilityElement.m index cd5b97829..ae0ff97a1 100644 --- a/Core/Source/DTAccessibilityElement.m +++ b/Core/Source/DTAccessibilityElement.m @@ -10,10 +10,12 @@ #if TARGET_OS_IPHONE && !TARGET_OS_WATCH +#import "DTWeakSupport.h" + static const CGPoint DTAccessibilityElementNullActivationPoint = {CGFLOAT_MAX, CGFLOAT_MAX}; @interface DTAccessibilityElement() -@property (nonatomic, unsafe_unretained) UIView *parentView; +@property (nonatomic, DT_WEAK_PROPERTY) UIView *parentView; @end @implementation DTAccessibilityElement diff --git a/Core/Source/DTAccessibilityViewProxy.h b/Core/Source/DTAccessibilityViewProxy.h index 6494154d2..1a7b12c34 100644 --- a/Core/Source/DTAccessibilityViewProxy.h +++ b/Core/Source/DTAccessibilityViewProxy.h @@ -12,6 +12,7 @@ #if TARGET_OS_IPHONE && !TARGET_OS_WATCH #import "DTTextAttachment.h" +#import "DTWeakSupport.h" @protocol DTAccessibilityViewProxyDelegate; @@ -23,7 +24,7 @@ /** The delegate for the proxy */ -@property (nonatomic, unsafe_unretained, readonly) id delegate; +@property (nonatomic, DT_WEAK_PROPERTY, readonly) id delegate; /** The text attachment represented by the proxy diff --git a/Core/Source/DTWeakSupport.h b/Core/Source/DTWeakSupport.h index b3631d212..da662b1da 100644 --- a/Core/Source/DTWeakSupport.h +++ b/Core/Source/DTWeakSupport.h @@ -30,4 +30,4 @@ #define DT_WEAK_VARIABLE #define DT_WEAK_PROPERTY assign -#endif \ No newline at end of file +#endif