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); }
private void SetupUI() { View.BackgroundColor = UIColor.White; verseReference = new UITextField { BackgroundColor = UIColor.Clear, BorderStyle = UITextBorderStyle.None, Enabled = false, Font = FontConstants.SourceSansProBold(17), Frame = new RectangleF(0, 0, View.Bounds.Size.Width, 28f), Text = verse.Title }; blackLine = new UIView { BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile(Images.BlackLine)), Frame = new RectangleF(0, 28, View.Bounds.Width, 3f) }; verseComments = new UITextView { Font = FontConstants.SourceSansProRegular(15), Frame = new RectangleF(0, 31, View.Bounds.Width, 145f), KeyboardAppearance = UIKeyboardAppearance.Default, Text = verse.Comments, TextAlignment = UITextAlignment.Left }; verseComments.BecomeFirstResponder(); View.AddSubview(verseReference); View.AddSubview(blackLine); View.AddSubview(verseComments); }
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); }
public override void EditingEnded(UITextView textView) { if (textView.Text == "") { textView.Text = "Content"; textView.TextColor = UIColor.LightGray; textView.Font = FontConstants.SourceSansProBold(13); } textView.ResignFirstResponder(); }
public PrayerCell(NSString reuseIdentifier) : base(UITableViewCellStyle.Default, reuseIdentifier) { SelectionStyle = UITableViewCellSelectionStyle.None; PrayerTitle = new UILabel { BackgroundColor = UIColor.FromPatternImage(Images.CellHeader), Font = FontConstants.SourceSansProBold(15), TextAlignment = UITextAlignment.Center, TextColor = UIColor.White }; PrayerContent = new UILabel { Font = FontConstants.SourceSansProRegular(13), Lines = 0, TextAlignment = UITextAlignment.Left, TextColor = UIColor.Black, }; ContentView.Add(PrayerTitle); ContentView.Add(PrayerContent); }
public VerseCell(string reuseIdentifier) : base(UITableViewCellStyle.Default, reuseIdentifier) { SelectionStyle = UITableViewCellSelectionStyle.None; VerseReference = new UILabel { BackgroundColor = UIColor.FromPatternImage(UIImage.FromFile(Images.CellHeader)), Font = FontConstants.SourceSansProBold(17), TextAlignment = UITextAlignment.Center, TextColor = UIColor.White, }; VerseContent = new UILabel { Font = FontConstants.SourceSansProRegular(15), LineBreakMode = UILineBreakMode.TailTruncation, Lines = 0, TextAlignment = UITextAlignment.Left, TextColor = UIColor.Black }; ContentView.Add(VerseReference); ContentView.Add(VerseContent); }