Post

Replies

Boosts

Views

Activity

Reply to How to add placeholder text to TextEditor in SwiftUI?
Here's my take on the ZStack method: ZStack(alignment: .topLeading) { TextEditor(text: $draftPreface)         .frame(height: 100)         .border(Color(uiColor: .opaqueSeparator), width: 0.5)     Text("preface").fontWeight(.light).foregroundColor(.black.opacity(0.25)).padding(8).hidden(!draftPreface.isEmpty) } I extended View with a conditional .hidden: extension View {     @ViewBuilder public func hidden(_ shouldHide: Bool) -> some View {         switch shouldHide {         case true: self.hidden()         case false: self         }     } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Jul ’21
Reply to Why does .swipeAction set editMode?
I understand now. The Done button is useful for cancelling the swipe. swipe to reveal the hidden button(s) behind the row. decide you don't want to use those buttons. A) swipe the row back B) OR interact somewhere else C) OR tap Done to have the row return to normal. The EditMode isActive is true while the row is swiped aside, but the value is not .active.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’21
Reply to How to embed List in ScrollView using SwiftUI
Notes has a Recently Deleted folder view that shows a search field and some captions above the list. The whole vertical stack is scrollable. That makes me think they're using UIKit and not SwiftUI. Video Using ForEach with a Divider won't allow .swipeActions to work, as it must be inside a List.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jun ’21
Reply to How to add placeholder text to TextEditor in SwiftUI?
Here's my take on the ZStack method: ZStack(alignment: .topLeading) { TextEditor(text: $draftPreface)         .frame(height: 100)         .border(Color(uiColor: .opaqueSeparator), width: 0.5)     Text("preface").fontWeight(.light).foregroundColor(.black.opacity(0.25)).padding(8).hidden(!draftPreface.isEmpty) } I extended View with a conditional .hidden: extension View {     @ViewBuilder public func hidden(_ shouldHide: Bool) -> some View {         switch shouldHide {         case true: self.hidden()         case false: self         }     } }
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to Why does .swipeAction set editMode?
I understand now. The Done button is useful for cancelling the swipe. swipe to reveal the hidden button(s) behind the row. decide you don't want to use those buttons. A) swipe the row back B) OR interact somewhere else C) OR tap Done to have the row return to normal. The EditMode isActive is true while the row is swiped aside, but the value is not .active.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’21
Reply to How to embed List in ScrollView using SwiftUI
Notes has a Recently Deleted folder view that shows a search field and some captions above the list. The whole vertical stack is scrollable. That makes me think they're using UIKit and not SwiftUI. Video Using ForEach with a Divider won't allow .swipeActions to work, as it must be inside a List.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to Read only yet selectable text in SwiftUI
I think you'll be happy with .textSelection(.enabled) in the next release of SwiftUI.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jun ’21
Reply to Metasync Continuation could not properly be parsed
Error found in programmer brain. I was sending the wrong token.
Replies
Boosts
Views
Activity
Jun ’21