O'Reilly logo

Xamarin Blueprints by Michael Williams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating the connection between Presenter and View

Now we move on to the user interface design and demonstrate how we set up the link between our presenters. Developing the user interface is no different to developing natively for iOS and Android; the only difference with MVP is that we initialize a view with its related presenter in the constructor.

Let's start by adding a new folder to the Chat.iOS project called Views, add in a new file called LoginViewController.cs, and implement the following:

public class LoginViewController : UIViewController, LoginPresenter.ILoginView { #region Private Properties private bool _isInProgress = false; private LoginPresenter _presenter; private UITextField _loginTextField; private UITextField _passwordTextField; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required