Post

Replies

Boosts

Views

Activity

Reply to Where to put the animation
struct CardView: View {     @State var isFaceUp = false     var body: some View {         ZStack {             let shape = RoundedRectangle(cornerRadius: 20)             if isFaceUp {                 shape.fill().foregroundColor(.white)                 shape.stroke(lineWidth: 3)                 Text("😀").font(.system(size: 80))             } else {                 shape.fill()             }         }         .rotation3DEffect(Angle(degrees: isFaceUp ? 180 : 0), axis: (x: 0, y: 1, z: 0))         .animation(.spring(), value: isFaceUp)         .onTapGesture {             isFaceUp.toggle()         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to Decoding JSON
struct OpenTotal: Decodable {     var total: Double?     var overOdds: Int?     var underOdds: Int? } struct CurrentTotal: Decodable {     var total: Double?     var overOdds: Int?     var underOdds: Int? }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jan ’22
Reply to why elements don't have equal sizes?
Set horizontal hugging priority for 60 to 252 as suggested Add a equal height constraint between EDIT TIMER DURATION and ANOTHER LABEL Set vertical hugging priority for Duration to 1000 Set vertical hugging priority for Horizontal Slider to 1000
Topic: UI Frameworks SubTopic: UIKit Tags:
Nov ’21
Reply to Where to put the animation
struct CardView: View {     @State var isFaceUp = false     var body: some View {         ZStack {             let shape = RoundedRectangle(cornerRadius: 20)             if isFaceUp {                 shape.fill().foregroundColor(.white)                 shape.stroke(lineWidth: 3)                 Text("😀").font(.system(size: 80))             } else {                 shape.fill()             }         }         .rotation3DEffect(Angle(degrees: isFaceUp ? 180 : 0), axis: (x: 0, y: 1, z: 0))         .animation(.spring(), value: isFaceUp)         .onTapGesture {             isFaceUp.toggle()         }     } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to Decoding JSON
struct OpenTotal: Decodable {     var total: Double?     var overOdds: Int?     var underOdds: Int? } struct CurrentTotal: Decodable {     var total: Double?     var overOdds: Int?     var underOdds: Int? }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’22
Reply to why elements don't have equal sizes?
Set horizontal hugging priority for 60 to 252 as suggested Add a equal height constraint between EDIT TIMER DURATION and ANOTHER LABEL Set vertical hugging priority for Duration to 1000 Set vertical hugging priority for Horizontal Slider to 1000
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Nov ’21