This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct ContentView: View { | |
| static let names = ["name1", "name2", "name3", "name4", "name5", "name6"] | |
| var body: some View { | |
| List(Self.names, id: \.self) { name in | |
| Text(name) | |
| } | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct ContentView: View { | |
| let timer = Timer.publish(every: 1.6, on: .main, in: .common).autoconnect() | |
| @State var leftOffset: CGFloat = -100 | |
| @State var rightOffset: CGFloat = 100 | |
| var body: some View { | |
| ZStack { | |
| Circle() | |
| .fill(Color.blue) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct ContentView: View { | |
| @State private var shouldAnimate = false | |
| @State var leftOffset: CGFloat = -100 | |
| @State var rightOffset: CGFloat = 100 | |
| var body: some View { | |
| RoundedRectangle(cornerRadius: 10) | |
| .fill(Color.blue) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct ContentView: View { | |
| @State private var shouldAnimate = false | |
| var body: some View { | |
| HStack(alignment: .center, spacing: shouldAnimate ? 15 : 5) { | |
| Capsule(style: .continuous) | |
| .fill(Color.blue) | |
| .frame(width: 10, height: 50) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct ContentView: View { | |
| @State private var shouldAnimate = false | |
| var body: some View { | |
| HStack { | |
| Circle() | |
| .fill(Color.blue) | |
| .frame(width: 20, height: 20) | |
| .scaleEffect(shouldAnimate ? 1.0 : 0.5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| struct ContentView: View { | |
| @State private var shouldAnimate = false | |
| var body: some View { | |
| Circle() | |
| .fill(Color.blue) | |
| .frame(width: 30, height: 30) | |
| .overlay( | |
| ZStack { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| struct ContentView: View { | |
| var cornerRadius: CGFloat = 20 | |
| var body: some View { | |
| VStack { | |
| RoundedRectangle(cornerRadius: cornerRadius) | |
| .fill(Color("kMainBg")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| struct ContentView: View { | |
| var cornerRadius: CGFloat = 20 | |
| var body: some View { | |
| VStack { | |
| RoundedRectangle(cornerRadius: cornerRadius) | |
| .fill(Color("kMainBg")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| struct ContentView: View { | |
| var cornerRadius: CGFloat = 20 | |
| var body: some View { | |
| VStack { | |
| ZStack { | |
| RoundedRectangle(cornerRadius: cornerRadius) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import SwiftUI | |
| struct ContentView: View { | |
| var cornerRadius: CGFloat = 20 | |
| var body: some View { | |
| VStack { | |
| ZStack { | |
| Circle() |