Start a Project

Run your Code In Main Thread in iOS

Run your Code In Main Thread in iOS

When you are creating UIVIEW dynamically without using the storyboard then sometimes your app gets in background thread. And your application gets stuck for a few seconds to resolve this put your code in the main thread. So that your uiview run in the main thread. It will not effect the background tasks that are already running.

 

Exit mobile version