How to implement loader untill work in progress?

Saturday, July 5, 2014

I am new to ios Development. I need to call api to fetch information from web,in controller 2 i am calling my api to show information from web and from controller 1's button action i am calling controller 2. I implemented custom loader in controller 2 's view did load method in processing time but i don't know why it takes so much time to go controller 2 from controller 1 and i don't know how to reduce that processing time or can u please tell me can i implement loader in button action's processing time. need help.