views:

313

answers:

1

Hi,

I have Login screen and second view which will be shown after login. On second view I have UIWebview which loads the url.

After login first it shows the empty view and slowly it loads the url. I want to show login screen with wait cursor, until the uiwebview loads the url and then want show that screen.

Can any body please provide code or sample for this?

Regards, Malleswar

A: 

I cannot write your application for you, because it is a large project.

However, you might think about making your own login UIView as a child view of a UIViewController, which contains form elements:

  1. This view controller is the root view controller in a UINavigationController stack.
  2. The user enters her credentials into this form.
  3. On clicking Submit, you push another UIViewController on to the navigation stack that contains a UIView child, that itself has a UIProgressIndicatorView and a UIWebView as children views.
  4. The progress indicator view does its spinning wheel thing while the web page loads with the user's credentials entered in step 2.
  5. Once the web page finishes loading, it fires its delegate method telling you loading has finished. This delegate method tells the progress indicator view to stop spinning and hide.

I would recommend reading up on UINavigationController through Google and Apple's ample documentation and sample projects. One sample project template is included in Xcode, as well.

Alex Reynolds
Hi Alex,Thank for the reply.This solution may for UI views. But not for loading the url UIwebview. Can you please suggest me for UIwebview.Regards,Malleswar
`UIWebView` has no wait cursor or any progress indicator built into it. Therefore, you have to create a parent `UIView` and set a web view and a progress indicator view as its children views.
Alex Reynolds