void ReleaseDesignerOutlets() { if (BackButton != null) { BackButton.Dispose(); BackButton = null; } if (DateFormatsTableView != null) { DateFormatsTableView.Dispose(); DateFormatsTableView = null; } if (TitleLabel != null) { TitleLabel.Dispose(); TitleLabel = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); TitleLabel.Text = Resources.DateFormat; DateFormatsTableView.RegisterNibForCellReuse(DateFormatViewCell.Nib, DateFormatViewCell.Identifier); DateFormatsTableView.RowHeight = rowHeight; var source = new CustomTableViewSource <SectionModel <string, SelectableDateFormatViewModel>, string, SelectableDateFormatViewModel>( DateFormatViewCell.CellConfiguration(DateFormatViewCell.Identifier), ViewModel.DateTimeFormats ); DateFormatsTableView.Source = source; source.Rx().ModelSelected() .Subscribe(ViewModel.SelectDateFormat.Inputs) .DisposedBy(disposeBag); BackButton.Rx() .BindAction(ViewModel.Close) .DisposedBy(disposeBag); }