Exemple #1
0
        /// <summary>
        /// Resize the view to take into account the keyboard position
        /// </summary>
        /// <param name="notification"></param>
        void HandleKeyboardDidShow(NSNotification notification)
        {
            ChatApplication.ClearInputLine();

            NSObject value         = notification.UserInfo[UIKeyboard.FrameEndUserInfoKey];
            CGRect   keyboardFrame = ((NSValue)value).RectangleFValue;

            ChatView.Frame = new CGRect(ChatView.Frame.X, ChatView.Frame.Y, ChatView.Frame.Width, ChatView.Frame.Height - keyboardFrame.Height);
            CGPoint bottomOffset = new CGPoint(0, ChatHistory.ContentSize.Height - ChatHistory.Bounds.Size.Height);

            ChatHistory.SetContentOffset(bottomOffset, true);
        }