public override void ViewDidLoad() { base.ViewDidLoad(); TitleLabel.Text = Resources.ReviewTheTerms; AcceptButton.SetTitle(Resources.IAgree, UIControlState.Normal); PreferredContentSize = new CGSize(View.Frame.Width, View.Frame.Height); prepareTextView(); AcceptButton.Rx() .BindAction(ViewModel.Close, _ => true) .DisposedBy(DisposeBag); CloseButton.Rx() .BindAction(ViewModel.Close, _ => false) .DisposedBy(DisposeBag); }
public override void ViewDidLoad() { base.ViewDidLoad(); TitleLabel.Text = Resources.ReviewTheTerms; AcceptButton.SetTitle(Resources.IAgree, UIControlState.Normal); var height = TraitCollection.HorizontalSizeClass == UIUserInterfaceSizeClass.Regular ? 260 : View.Frame.Height; PreferredContentSize = new CGSize(View.Frame.Width, height); prepareTextView(); AcceptButton.Rx().Tap() .Subscribe(() => ViewModel.Close(true)) .DisposedBy(DisposeBag); CloseButton.Rx().Tap() .Subscribe(ViewModel.CloseWithDefaultResult) .DisposedBy(DisposeBag); }