private void ResizePriceInput(string newText) { var nsString = new NSString(newText); var attribs = new UIStringAttributes { Font = ItemPriceTextField.Font }; var size = nsString.GetSizeUsingAttributes(attribs); if (!itemPriceTextFieldXPosInitialized) { itemPriceTextFieldXPosInitialized = true; itemPriceTextFieldXPos = ItemPriceTextField.Frame.X + ItemPriceTextField.Frame.Width; } ItemPriceTextField.Frame = new CGRect(itemPriceTextFieldXPos - size.Width, ItemPriceTextField.Frame.Y, size.Width, ItemPriceTextField.Frame.Height); ItemPriceTextField.TranslatesAutoresizingMaskIntoConstraints = true; ItemPriceTextField.SetNeedsDisplay(); }
void ReleaseDesignerOutlets() { if (AddItemButton != null) { AddItemButton.Dispose(); AddItemButton = null; } if (AddPhotoButton != null) { AddPhotoButton.Dispose(); AddPhotoButton = null; } if (AddPhotoContainerView != null) { AddPhotoContainerView.Dispose(); AddPhotoContainerView = null; } if (ContentScrollView != null) { ContentScrollView.Dispose(); ContentScrollView = null; } if (ItemDescriptionLabel != null) { ItemDescriptionLabel.Dispose(); ItemDescriptionLabel = null; } if (ItemDescriptionLineView != null) { ItemDescriptionLineView.Dispose(); ItemDescriptionLineView = null; } if (ItemDescriptionTextView != null) { ItemDescriptionTextView.Dispose(); ItemDescriptionTextView = null; } if (ItemNameLabel != null) { ItemNameLabel.Dispose(); ItemNameLabel = null; } if (ItemNameLineView != null) { ItemNameLineView.Dispose(); ItemNameLineView = null; } if (ItemNameTextField != null) { ItemNameTextField.Dispose(); ItemNameTextField = null; } if (ItemPhotoView != null) { ItemPhotoView.Dispose(); ItemPhotoView = null; } if (ItemPriceLabel != null) { ItemPriceLabel.Dispose(); ItemPriceLabel = null; } if (ItemPriceTextField != null) { ItemPriceTextField.Dispose(); ItemPriceTextField = null; } if (PhotoAddedContainerView != null) { PhotoAddedContainerView.Dispose(); PhotoAddedContainerView = null; } if (RemovePhotoButton != null) { RemovePhotoButton.Dispose(); RemovePhotoButton = null; } }
private void OnTapGesture() { ItemNameTextField.ResignFirstResponder(); ItemPriceTextField.ResignFirstResponder(); ItemDescriptionTextView.ResignFirstResponder(); }