Yesterday I ran into an issue where a UITableView would not display until some remote data was loaded into a local array, even though I was loading this data in a seperate thread.
[self doInitialLoad];
}
- (void)doInitialLoad {
[self showActivityViewer]; // shows a screen activity indicator overlay
[self laadJSONTabel]; // loads the actual data into the tableview
[self.recentTable reloadData]; // reloads the tableview so data shows up
[self hideActivityViewer]; // hides the activity indicator overlay
}
It turns out that visual stuff gets queued to the end run of the loop, this resulted in a very sloppy interface which would react very slow to a change to another UIViewController due to remote data being downloaded first.
An easy fix for this, is using a performSelector on the function with a 0.0 delay, that will give it a zero delay but move loading the data to the next run-loop so all other stuff gets properly executed first. This results in an interface which feels a lot snappier and a proper UIActivityIndicatorView being displayed on screen while the data is loading:
[self showActivityViewer];
}
- (void)viewDidAppear:(BOOL)animated {
[self performSelector:@selector(doInitialLoad) withObject:NULL afterDelay:0.0];
}
- (void)doInitialLoad {
[self laadJSONTabel];
[self.recentTable reloadData];
[self hideActivityViewer];
}
Congratulations
Your first AWS Elastic Beanstalk Node.js application is now running on your own dedicated environment in the AWS Cloud
This environment is launched with Elastic Beanstalk Node.js Platform
What’s Next?
- AWS Elastic Beanstalk overview
- AWS Elastic Beanstalk concepts
- Deploy an Express Application to AWS Elastic Beanstalk
- Deploy an Express Application with Amazon ElastiCache to AWS Elastic Beanstalk
- Deploy a Geddy Application with Amazon ElastiCache to AWS Elastic Beanstalk
- Customizing and Configuring a Node.js Container
- Working with Logs