初见

RN经验(二)

2020-03-06  本文已影响0人  OnceWhite
1.从2020年4月开始,所有使⽤ iOS13 SDK的 App将必须提供 LaunchScreen,LaunchImage即将退出历史舞台。
+ (void)hide {
    if (waiting) {
        dispatch_async(dispatch_get_main_queue(), ^{
            waiting = false;
        });
    } else {
        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
              // 原方法
              //  [loadingView removeFromSuperview];
              // 改为淡出缩放动画
            [UIView animateWithDuration:1.0f delay:0.5f options:UIViewAnimationOptionBeginFromCurrentState animations:^{
                loadingView.alpha = 0.0f;
                loadingView.layer.transform = CATransform3DScale(CATransform3DIdentity, 2.0f, 2.0f, 1.0f);
            } completion:^(BOOL finished) {
                [loadingView removeFromSuperview];
            }];
        });
    }
}
2. pod install error: JSON::ParserError - 767: unexpected token at ''
gem list --local | grep cocoapods
sudo gem uninstall (all the items in the list)
sudo rm -rf ~/.cocoapods
sudo gem install cocoapods -v 1.9.1
cd (PROJECT DIRECTORY)
pod init
(put cocoapod in podfile)
pod install
rm -rf ~/.cocoapods/repos/trunk/
pod cache clean --all
pod install
上一篇 下一篇

猜你喜欢

热点阅读