This is the simplest way of integrating the login function in iOS 7. The best example to get started learning with login example iOS.
It’ll consist of 2 views. One is login and other is after login screen.
Login button will check if userName and Password is correct or not. If correct then shift to after login.
Start a new project. Name it and after it loads:
Make 2 views and place 2 text fields one button and in he other view just create a simple label that says login successful.
here we have used our class name that is after login view controller and gave it a name purchaseContr you can use any name here but class name should be same.
after that close this section and write the else code
so as a whole your login button function will look like this below
thats it. Run the app and it’ll work just fine. i made this example because you can now put the text that you wrote all by yourself from different server or extract it from a variable etc. It’s just a basic flow of how things will word.