From 94dacbd0ab544b01774d687598668c7bcb7921f7 Mon Sep 17 00:00:00 2001 From: Marcin Czachursk Date: Sat, 18 Feb 2023 21:06:04 +0100 Subject: [PATCH] Small improvements. --- Vernissage.xcodeproj/project.pbxproj | 4 ++-- Vernissage/Views/ComposeView.swift | 9 ++++++++- Vernissage/Views/PhotoEditorView.swift | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Vernissage.xcodeproj/project.pbxproj b/Vernissage.xcodeproj/project.pbxproj index 3d68d34..1a65bd8 100644 --- a/Vernissage.xcodeproj/project.pbxproj +++ b/Vernissage.xcodeproj/project.pbxproj @@ -967,7 +967,7 @@ ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 8; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_ASSET_PATHS = "\"Vernissage/Preview Content\""; DEVELOPMENT_TEAM = B2U9FEKYP8; ENABLE_PREVIEWS = YES; @@ -1004,7 +1004,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 8; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_ASSET_PATHS = "\"Vernissage/Preview Content\""; DEVELOPMENT_TEAM = B2U9FEKYP8; ENABLE_PREVIEWS = YES; diff --git a/Vernissage/Views/ComposeView.swift b/Vernissage/Views/ComposeView.swift index 968a0d4..eb2d7c6 100644 --- a/Vernissage/Views/ComposeView.swift +++ b/Vernissage/Views/ComposeView.swift @@ -77,8 +77,9 @@ struct ComposeView: View { .foregroundColor(.lightGrayColor) } - TextField("Type what's on your mind", text: $text) + TextField("Type what's on your mind", text: $text, axis: .vertical) .padding(8) + .lineLimit(2...12) .focused($focusedField, equals: .content) .keyboardType(.default) .onFirstAppear { @@ -186,6 +187,12 @@ struct ComposeView: View { Button { withAnimation(.easeInOut) { self.isSensitive.toggle() + + if self.isSensitive { + self.focusedField = .spoilerText + } else { + self.focusedField = .content + } } } label: { Image(systemName: self.isSensitive ? "exclamationmark.square.fill" : "exclamationmark.square") diff --git a/Vernissage/Views/PhotoEditorView.swift b/Vernissage/Views/PhotoEditorView.swift index 2ca5d05..6415abe 100644 --- a/Vernissage/Views/PhotoEditorView.swift +++ b/Vernissage/Views/PhotoEditorView.swift @@ -33,7 +33,7 @@ struct PhotoEditorView: View { Section(header: Text("Accessibility")) { TextField("Sescription for the visually impaired", text: $description, axis: .vertical) .keyboardType(.default) - .lineLimit(2...5) + .lineLimit(3...6) .multilineTextAlignment(.leading) } }.listStyle(.grouped)