void ReleaseDesignerOutlets () { if (ButtonStackView != null) { ButtonStackView.Dispose (); ButtonStackView = null; } if (CloseButton != null) { CloseButton.Dispose (); CloseButton = null; } if (DislikeButton != null) { DislikeButton.Dispose (); DislikeButton = null; } if (GoodButton != null) { GoodButton.Dispose (); GoodButton = null; } if (GreatButton != null) { GreatButton.Dispose (); GreatButton = null; } }
private void OnTriggerExit(Collider collision) { Debug.Log(name + " exit trigger"); if (collision.GetComponent <DislikeButton>() == dislikeButton) { dislikeButton = null; } }
public override void ViewDidLoad() { base.ViewDidLoad(); var centerButton = new CenterButton(); centerButton.TouchUpInside += (s, e) => { //TableView.ScrollRectToVisible(new CGRect(0, 0, 1, 1), false); ViewModel.StumbleCommand.ExecuteIfCan(); }; var stumbleButton = new UIBarButtonItem(centerButton) { Enabled = false }; stumbleButton.EnableIfExecutable(ViewModel.StumbleCommand.CanExecuteObservable); ToolbarItems = new [] { new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), DislikeButton, new UIBarButtonItem(UIBarButtonSystemItem.FixedSpace) { Width = 40 }, stumbleButton, new UIBarButtonItem(UIBarButtonSystemItem.FixedSpace) { Width = 40 }, LikeButton, new UIBarButtonItem(UIBarButtonSystemItem.FlexibleSpace), }; ViewModel.StumbleCommand.CanExecuteObservable.Subscribe(x => centerButton.Disabled = !x); DislikeButton.EnableIfExecutable(ViewModel.StumbleCommand.CanExecuteObservable); LikeButton.EnableIfExecutable(ViewModel.StumbleCommand.CanExecuteObservable); ViewModel.DislikeCommand.Subscribe(_ => DisplayResponse(Images.ThumbDownFilled)); ViewModel.LikeCommand.Subscribe(_ => DisplayResponse(Images.ThumbUpFilled)); ViewModel.StumbleCommand.ExecuteIfCan(); }
private void OnTriggerEnter(Collider collision) { Debug.Log(name + " entered trigger"); dislikeButton = collision.GetComponent <DislikeButton>(); }