private void KeyboardManagerOnKeyboardWillShow(object sender, KeyboardNotificationManager.KeyboardNotificationEventArgs args) { UIView.Animate( args.Duration.TotalSeconds, () => { this.constBottomConstraint.Constant = ConstraintDefaultValue + args.KeyboardSize.Height; this.View.LayoutIfNeeded(); }); }
private void KeyboardManagerOnKeyboardWillHide(object sender, KeyboardNotificationManager.KeyboardNotificationEventArgs args) { UIView.Animate( args.Duration.TotalSeconds, () => { this.constBottomConstraint.Constant = ConstraintDefaultValue; if (this.shouldHide) { this.imgLogo.Alpha = 1; } this.View.LayoutIfNeeded(); }); }
private void KeyboardManagerOnKeyboardWillShow(object sender, KeyboardNotificationManager.KeyboardNotificationEventArgs args) { this.shouldHide = this.txtEmail.Frame.Top - args.KeyboardSize.Height < this.imgLogo.Frame.Bottom; UIView.Animate( args.Duration.TotalSeconds, () => { this.constBottomConstraint.Constant = ConstraintDefaultValue + args.KeyboardSize.Height; if (this.shouldHide) { this.imgLogo.Alpha = 0; } this.View.LayoutIfNeeded(); }); }