Check out example codes for "swift wait 5 seconds". It will help you in understanding the concepts better.

Code Example 1

sleep(5). // Argument is number of seconds

Learn ReactJs, React Native from akashmittal.com