gpt4 book ai didi

ios - tableView reloadData 崩溃包括崩溃报告

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:17:14 25 4
gpt4 key购买 nike

我使用 Crashlytics 进行崩溃管理。我最近遇到了这次崩溃,我试图了解为什么会发生这次崩溃。

enter image description here

这是我的UITableView+ReloadTransition.m:

#import "UITableView+ReloadTransition.h"

@implementation UITableView (ReloadTransition)
- (void)reloadDataWithFade:(BOOL)animated {

[UIView animateWithDuration:0.3 animations:^{
self.alpha=0.0;
} completion:^(BOOL finished) {
[self reloadData];//line 17
[UIView animateWithDuration:0.2 animations:^{
self.alpha=1.0;
}];
}];
}

强烈建议任何帮助?在崩溃报告方面,我有点像新手。

更新以包含更多信息。

enter image description here

enter image description here

enter image description here

最佳答案

尝试混合方法。这样我在重新加载时淡出 TableView ,希望这对你有帮助。

@implementation UITableView (Animation)

+(void)load
{
Method original, swizzle;

original = class_getInstanceMethod(self, @selector(reloadData));
swizzle = class_getInstanceMethod(self, @selector(swizzled_reloadData));
method_exchangeImplementations(original, swizzle);
}

-(void)swizzled_reloadData
{
[self swizzled_reloadData];

CATransition *transition = [CATransition animation];
transition.type = kCATransitionFromBottom;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn];
transition.fillMode = kCAFillModeBackwards;
transition.duration = 0.55;
transition.subtype = kCATransitionFade;
[[self layer] addAnimation:transition forKey:@"UITableViewReloadDataAnimationKey"];

}

@end

关于ios - tableView reloadData 崩溃包括崩溃报告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28898628/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com