Question

I have a NavigationController that hold ViewControllers, but I want that to access to some ViewControllers an authentification via an UIAlertView. (Some ViewControllers content need a authentification).

That UIAlertView will send data to a Webservice to check first if the login and password are correct and then receive back the datas + a token to store in the Iphone (like that you need to authenticate only once).

I'm going to check on each ViewControllers before access it, if the user already authenticate, by checking if the token is registered in the Iphone.

But I don't really know how can I figure out everything, I mean especially the architecture to make all the things working : UIAlertView, NSCredential, storing light data in the Iphone, etc...

Can anyone clear my mind ?

Was it helpful?

Solution

Here is the link fullfilling your requirement

http://knowledgetransferinobjectivec.blogspot.in/2012/01/customized-uialertview-to-input.html

&

http://harikanangi.blogspot.in/2011/09/uialertview-extended-to-allow-users-to.html

The following link creates a custom alertview and allows the user to fill credentials . Using the didSelectButtonAtIndex delegate of UIAlertView you can catch the event when the user press ok or submit button . Hope it helps you

OTHER TIPS

Lookup UIAlertView delegate methods. You will be checking the button index that was pressed from those methods to fire a method of your choice. Don't forget to add the delegate.

UIViewController <UIAlertViewDelegate> 

UIAlertView usage

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top