Skip to content
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

Casts for XCode 10.1 version #10

Open
demensdeum opened this issue Jan 30, 2019 · 0 comments
Open

Casts for XCode 10.1 version #10

demensdeum opened this issue Jan 30, 2019 · 0 comments

Comments

@demensdeum
Copy link

demensdeum commented Jan 30, 2019

Casts for correct XCode 10.1 build:

diff --git a/RecyclingAlert/DWURecyclingAlert/DWURecyclingAlert.m b/RecyclingAlert/DWURecyclingAlert/DWURecyclingAlert.m
index 122336b..8ffcc32 100644
--- a/RecyclingAlert/DWURecyclingAlert/DWURecyclingAlert.m
+++ b/RecyclingAlert/DWURecyclingAlert/DWURecyclingAlert.m
@@ -246,7 +246,7 @@ static void dwu_swizzleDrawRectIfNotYet(CALayer *layer) {
     if (![layer.delegate isKindOfClass:[UIView class]]) {
         return;
     }
-    UIView *containerView = layer.delegate;
+    UIView *containerView = (UIView *)layer.delegate;
     if (!dwu_implementsSelector(containerView, @selector(drawRect:))) {
         return;
     }
@@ -316,7 +316,7 @@ - (void)dwu_scanLayerHierarchyRecursively {
 }
 
 - (UIView *)dwu_findCell {
-    UIView *containerView = self.delegate;
+    UIView *containerView = (UIView *) self.delegate;
     if (!containerView) {
         return nil;
     }
@@ -338,7 +338,7 @@ - (UIView *)dwu_findCell {
 
 - (void)dwu_injectLayer: (CALayer *)layer withCellDelegate:(UIView *)cellDelegate {
     if (layer.delegate && [layer.delegate isKindOfClass:[UIView class]]) {
-        UIView *containerView = layer.delegate;
+        UIView *containerView = (UIView *) layer.delegate;
         containerView.dwuCellDelegate = cellDelegate;
     }
 }
@@ -465,4 +465,4 @@ static void dwu_generateTimeLabelForUICollectionViewCell() {
         dwu_generateTimeLabelForUICollectionViewCell();
     }
 }
-#endif
\ No newline at end of file
+#endif
@demensdeum demensdeum changed the title Casts for last XCode version Casts for XCode 10.1 version Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant