speed up settings menu loading

This commit is contained in:
TrueZhuanjia committed 2025-06-05 16:03:01 +08:00
1 parent 01e379eefe
commit b036e01afc
5 files changed
+303 -282

No files matched your search

+8 -6
View File
@@ -231,12 +231,14 @@
- (void)addSubStackView:(UIStackView *)stackView {
[CATransaction begin];
[CATransaction setDisableActions:YES];
if (![_subStackViews containsObject:stackView]) {
[_subStackViews addObject:stackView];
[_rootStackView addArrangedSubview:stackView];
[_rootStackView layoutIfNeeded];
[self updateLayout];
}
[UIView performWithoutAnimation:^{
if (![_subStackViews containsObject:stackView]) {
[_subStackViews addObject:stackView];
[_rootStackView addArrangedSubview:stackView];
//[_rootStackView layoutIfNeeded];
//[self updateLayout];
}
}];
[CATransaction commit];
// NSLog(@"rootStack height2: %f", _rootStackView.frame.size.height);
}