facebookarchive / Shimmer

An easy way to add a simple, shimmering effect to any view in an iOS app.
Other
9.35k stars 1.11k forks source link

Xcode 8.3 warning #77

Open Huang-Libo opened 7 years ago

Huang-Libo commented 7 years ago

warning info: Assigning to 'id<CALayerDelegate> _Nullable' from incompatible type 'FBShimmeringLayer *const __strong'

- (void)_createMaskIfNeeded
{
  if (_shimmering && !_maskLayer) {
    _maskLayer = [FBShimmeringMaskLayer layer];
    _maskLayer.delegate = self;     // -> warning here ...
    _contentLayer.mask = _maskLayer;
    [self _updateMaskColors];
    [self _updateMaskLayout];
  }
}
otymartin commented 7 years ago

@grp @ejensen

DrBeak1 commented 7 years ago

This can be fixed easily by making the change on line 136 of FBShimmeringLayer.m:

@interface FBShimmeringLayer ()
<CALayerDelegate> // <= right here
@property (strong, nonatomic) FBShimmeringMaskLayer *maskLayer;
@end
mattbarker016 commented 7 years ago

There's another error in the FBShimmering protocol lines 39-40. Anyone know how to resolve it?

screen shot 2017-04-24 at 11 37 07 pm

Update: I just commented it out ¯_(ツ)_/¯