ios - Value of type '() -> ()' can never be nil
怪我咯
怪我咯 2017-04-18 09:27:49
0
1
309

1.升级Xcode之后,之前代码报错,报 Value of type '() -> ()' can never be nil, comparison isn't allowed

2.相关代码

if (self.action == nil) {
            return;
        }

self.action == nil 报错了。

 if refreshTempAction != nil {
                    refreshStatus = .Refresh
                    self.startAnimation()
                    UIView.animateWithDuration(0.25, animations: { () -> Void in
                        if scrollView.contentInset.top == 0 {
                            scrollView.contentInset = UIEdgeInsetsMake(self.getNavigationHeight(), 0, scrollView.contentInset.bottom, 0)
                        }else{
                            scrollView.contentInset = UIEdgeInsetsMake(ZLSwithRefreshHeadViewHeight + scrollView.contentInset.top, 0, scrollView.contentInset.bottom, 0)
                        }
                        
                    })

refreshTempAcstion != nil 报错。

怪我咯
怪我咯

走同样的路,发现不同的人生

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!