상속: UITextViewDelegate
예제 #1
0
        private void SetupUI()
        {
            View.BackgroundColor = UIColor.White;

            verseReference = new UITextField {
                AutocapitalizationType = UITextAutocapitalizationType.Words,
                BackgroundColor        = UIColor.Clear,
                BorderStyle            = UITextBorderStyle.None,
                Font        = FontConstants.SourceSansProBold(17),
                Frame       = new RectangleF(0, 0, View.Bounds.Size.Width, 28f),
                Placeholder = "Verse"
            };
            verseReference.BecomeFirstResponder();

            blackLine = new UIView {
                BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile(Images.BlackLine)),
                Frame           = new RectangleF(0, 28, View.Bounds.Width, 3f)
            };

            textViewDelegate = new ContentTextDelegate();
            verseComments    = new UITextView {
                Delegate           = textViewDelegate,
                Font               = FontConstants.SourceSansProBold(15),
                Frame              = new RectangleF(0, 31, View.Bounds.Width, 145f),
                KeyboardAppearance = UIKeyboardAppearance.Default,
                Text               = "Comments",
                TextAlignment      = UITextAlignment.Left,
                TextColor          = UIColor.LightGray
            };

            View.AddSubview(verseReference);
            View.AddSubview(blackLine);
            View.AddSubview(verseComments);
        }
예제 #2
0
        private void SetupUI()
        {
            View.BackgroundColor = UIColor.White;

            PrayerTitle = new UITextField {
                BackgroundColor = UIColor.Clear,
                BorderStyle     = UITextBorderStyle.None,
                Font            = FontConstants.SourceSansProBold(15),
                Frame           = new RectangleF(0, 0, View.Bounds.Size.Width, 28f),
                Placeholder     = "Title"
            };
            PrayerTitle.BecomeFirstResponder();

            BlackLine = new UIView {
                BackgroundColor = UIColor.FromPatternImage(Images.BlackLine),
                Frame           = new RectangleF(0, 28, View.Bounds.Width, 1f)
            };

            TextViewDelegate = new ContentTextDelegate();
            PrayerContent    = new UITextView {
                Delegate           = TextViewDelegate,
                Font               = FontConstants.SourceSansProBold(13),
                Frame              = new RectangleF(0, 29, View.Bounds.Width, 165f),
                KeyboardAppearance = UIKeyboardAppearance.Default,
                Text               = "Content",
                TextAlignment      = UITextAlignment.Left,
                TextColor          = UIColor.LightGray
            };

            View.AddSubview(PrayerTitle);
            View.AddSubview(BlackLine);
            View.AddSubview(PrayerContent);
        }
예제 #3
0
		private void SetupUI ()
		{
			View.BackgroundColor = UIColor.White;

			verseReference = new UITextField {
				AutocapitalizationType = UITextAutocapitalizationType.Words,
				BackgroundColor = UIColor.Clear,
				BorderStyle = UITextBorderStyle.None,
				Font = FontConstants.SourceSansProBold (17),
				Frame = new RectangleF (0, 0, View.Bounds.Size.Width, 28f),
				Placeholder = "Verse"
			};
			verseReference.BecomeFirstResponder ();

			blackLine = new UIView {
				BackgroundColor = UIColor.FromPatternImage (UIImage.FromFile (Images.BlackLine)),
				Frame = new RectangleF (0, 28, View.Bounds.Width, 3f)
			};

			textViewDelegate = new ContentTextDelegate ();
			verseComments = new UITextView {
				Delegate = textViewDelegate,
				Font = FontConstants.SourceSansProBold (15),
				Frame = new RectangleF (0, 31, View.Bounds.Width, 145f),
				KeyboardAppearance = UIKeyboardAppearance.Default,
				Text = "Comments",
				TextAlignment = UITextAlignment.Left,
				TextColor = UIColor.LightGray
			};

			View.AddSubview (verseReference);
			View.AddSubview (blackLine);
			View.AddSubview (verseComments);
		}