public override void ViewDidLayoutSubviews() { base.ViewDidLayoutSubviews(); ViewModel.Tags .Select(tagsListToAttributedString.Convert) .Subscribe(TagsTextView.Rx().AttributedTextObserver()) .DisposedBy(DisposeBag); ViewModel.Tags .Select(tags => { if (tags.Any()) { return(string.Format(Resources.TagsList, string.Join(", ", tags))); } else { return(Resources.NoTags); } }) .Subscribe(TagsContainerView.Rx().AccessibilityLabel()) .DisposedBy(DisposeBag); View.ClipsToBounds |= UIDevice.CurrentDevice.UserInterfaceIdiom == UIUserInterfaceIdiom.Pad; }
public override void ViewDidLayoutSubviews() { base.ViewDidLayoutSubviews(); ViewModel.Tags .Select(tagsListToAttributedString.Convert) .Subscribe(TagsTextView.Rx().AttributedTextObserver()) .DisposedBy(DisposeBag); ViewModel.Tags .Select(tags => { if (tags.Any()) { return(string.Format(Resources.TagsList, string.Join(", ", tags))); } else { return(Resources.NoTags); } }) .Subscribe(TagsContainerView.Rx().AccessibilityLabel()) .DisposedBy(DisposeBag); View.ClipsToBounds |= TraitCollection.HorizontalSizeClass == UIUserInterfaceSizeClass.Regular; }
private void prepareViews() { DurationLabel.Font = DurationLabel.Font.GetMonospacedDigitFont(); centerTextVertically(TagsTextView); TagsTextView.TextContainer.LineFragmentPadding = 0; if (TraitCollection.HorizontalSizeClass == UIUserInterfaceSizeClass.Compact) { var bottomSafeAreaInset = UIApplication.SharedApplication.KeyWindow.SafeAreaInsets.Bottom; if (bottomSafeAreaInset >= ButtonsContainerBottomConstraint.Constant) { ButtonsContainerBottomConstraint.Constant = 0; } } DescriptionTextView.TintColor = Colors.StartTimeEntry.Cursor.ToNativeColor(); DescriptionTextView.PlaceholderText = Resources.AddDescription; TimeEntryTimes.Hidden = ViewModel.IsEditingGroup; GroupDuration.Hidden = !ViewModel.IsEditingGroup; DurationView.Hidden = ViewModel.IsEditingGroup; StartDateView.Hidden = ViewModel.IsEditingGroup; DescriptionView.InsertSeparator(); SelectProject.InsertSeparator(); TagsContainerView.InsertSeparator(); TimeEntryTimes.InsertSeparator(); DurationView.InsertSeparator(); StartDateView.InsertSeparator(); BillableView.InsertSeparator(); StartTimeView.InsertSeparator(UIRectEdge.Right); }
void ReleaseDesignerOutlets() { if (AddProjectAndTaskView != null) { AddProjectAndTaskView.Dispose(); AddProjectAndTaskView = null; } if (AddTagsView != null) { AddTagsView.Dispose(); AddTagsView = null; } if (BillableSwitch != null) { BillableSwitch.Dispose(); BillableSwitch = null; } if (BillableView != null) { BillableView.Dispose(); BillableView = null; } if (CategorizeWithProjectsBubbleView != null) { CategorizeWithProjectsBubbleView.Dispose(); CategorizeWithProjectsBubbleView = null; } if (CloseButton != null) { CloseButton.Dispose(); CloseButton = null; } if (ConfirmButton != null) { ConfirmButton.Dispose(); ConfirmButton = null; } if (ConfirmButtonBottomConstraint != null) { ConfirmButtonBottomConstraint.Dispose(); ConfirmButtonBottomConstraint = null; } if (DeleteButton != null) { DeleteButton.Dispose(); DeleteButton = null; } if (DeleteButtonBottomConstraint != null) { DeleteButtonBottomConstraint.Dispose(); DeleteButtonBottomConstraint = null; } if (DescriptionTextView != null) { DescriptionTextView.Dispose(); DescriptionTextView = null; } if (DurationLabel != null) { DurationLabel.Dispose(); DurationLabel = null; } if (DurationView != null) { DurationView.Dispose(); DurationView = null; } if (EndTimeLabel != null) { EndTimeLabel.Dispose(); EndTimeLabel = null; } if (EndTimeView != null) { EndTimeView.Dispose(); EndTimeView = null; } if (ErrorMessageLabel != null) { ErrorMessageLabel.Dispose(); ErrorMessageLabel = null; } if (ErrorView != null) { ErrorView.Dispose(); ErrorView = null; } if (ProjectTaskClientLabel != null) { ProjectTaskClientLabel.Dispose(); ProjectTaskClientLabel = null; } if (RemainingCharacterCount != null) { RemainingCharacterCount.Dispose(); RemainingCharacterCount = null; } if (ScrollView != null) { ScrollView.Dispose(); ScrollView = null; } if (ScrollViewContent != null) { ScrollViewContent.Dispose(); ScrollViewContent = null; } if (StartDateLabel != null) { StartDateLabel.Dispose(); StartDateLabel = null; } if (StartDateView != null) { StartDateView.Dispose(); StartDateView = null; } if (StartTimeLabel != null) { StartTimeLabel.Dispose(); StartTimeLabel = null; } if (StartTimeView != null) { StartTimeView.Dispose(); StartTimeView = null; } if (StopButton != null) { StopButton.Dispose(); StopButton = null; } if (TagsContainerView != null) { TagsContainerView.Dispose(); TagsContainerView = null; } if (TagsSeparator != null) { TagsSeparator.Dispose(); TagsSeparator = null; } if (TagsTextView != null) { TagsTextView.Dispose(); TagsTextView = null; } if (TitleLabel != null) { TitleLabel.Dispose(); TitleLabel = null; } if (BillableLabel != null) { BillableLabel.Dispose(); BillableLabel = null; } if (StartDateDescriptionLabel != null) { StartDateDescriptionLabel.Dispose(); StartDateDescriptionLabel = null; } if (DurationDescriptionLabel != null) { DurationDescriptionLabel.Dispose(); DurationDescriptionLabel = null; } if (StartDescriptionLabel != null) { StartDescriptionLabel.Dispose(); StartDescriptionLabel = null; } if (EndDescriptionLabel != null) { EndDescriptionLabel.Dispose(); EndDescriptionLabel = null; } if (ErrorMessageTitleLabel != null) { ErrorMessageTitleLabel.Dispose(); ErrorMessageTitleLabel = null; } if (AddProjectTaskLabel != null) { AddProjectTaskLabel.Dispose(); AddProjectTaskLabel = null; } if (CategorizeWithProjectsLabel != null) { CategorizeWithProjectsLabel.Dispose(); CategorizeWithProjectsLabel = null; } if (AddTagsLabel != null) { AddTagsLabel.Dispose(); AddTagsLabel = null; } }