Whis is right way to add activity indicator in iphone
<p>Hi I need  to show activity indicator but not able to find the right approach, what I tried is:</p>

<p>1) In ViewDidLod </p>

<p><code>[self performSelectorOnMainThread:@selector(setupActivityIndicator) withObject:nil waitUntilDone:NO];</code></p>

<p><code>[self userDataFromServer]</code>;</p>

<p><code>[self performSelectorOnMainThread:@selector(stopActivityIndicatorInMainThread) withObject:nil waitUntilDone:NO]</code></p>

<p>----OR-----</p>

<p>2) In ViewDidLod</p>

<p><code>[self startActivityIndicator];</code></p>

<p><code>[self userDataFromServer]</code>;</p>

<p><code>[self stopActivityIndicator];</code></p>

<p>Both are working in the say way which is not correct. Can any one help me how we can use activityindicator on parallel thread.</p>
