我有一个这样声明的属性:
@property (nonatomic, strong) UIScrollView *scroll;
然后我在viewDidLoad中:
// Create scrollview
_scroll = [[UIScrollView alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 100.0)];
// Function to add more view to _scroll
[self addStuff];
// This line makes things expensive on memory
[self.view addSubview:_scroll];
// Then if the above line is not commented out the view push lags
AViewController *aView = [[AViewController alloc] init];
[self.navigationController pushViewController:aView animated:YES];
我如何保持强大以在我的其他功能上使用但阻止推送滞后?