DZNEmptyDataSet
DZNEmptyDataSet copied to clipboard
Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior
Hello,
I am using Xcode 10 and just added this library to test in my project (current version 1.8.1). I am still getting the warning: Block implicitly retains 'self'; explicitly mention 'self' to indicate this is intended behavior in file UIScrollView+EmptyDataSet.m at line void(^fadeInBlock)(void) = ^{_contentView.alpha = 1.0;};
Any idea how to fix it ? Thank you
You can ignore this warning. If you have obsessive-compulsive disorder, you can do this:
__weak typeof(self) weakSelf = self;
void(^fadeInBlock)(void) = ^{
__strong typeof(weakSelf) strongSelf = weakSelf;
strongSelf -> _contentView.alpha = 1.0;
};