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

Building the iOS ChatView

Add a new file called ChatViewController into the Views project of the Chat.iOS project and implement the following:

 
public class ChatViewController : UIViewController, ChatPresenter.IChatView {
         #region Private Properties
         private ChatPresenter _presenter;
         private UITextField _chatField;
         private UIScrollView _scrollView;
         private int _currentTop = 20;
         private nfloat _width;
         #endregion
  
         #region Constructors
         public ChatViewController(ChatPresenter presenter)
         {
             _presenter = presenter;
         }
         #endregion
 
} 

We have multiple Private properties, one for the presenter, a local UITextField. We need this UI object to be local, as we need to extract the Text value to send through the SignalRClient, and we also need the UIScrollView to be ...

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