Skip to content

Instantly share code, notes, and snippets.

import SwiftUI
struct StartView: View {
@State var monthlySaving: String = ""
@State var yearlyReturn: String = ""
@State var savings: String = ""
@State var amountToReach: String = ""
@State var yearsSaving: String = ""
@State private var tapped = false
import SwiftUI
struct AccountView: View {
var cardViews: [NameData] = DataList.allItems
let columns = [GridItem(.adaptive(minimum: 150))]
@State private var showMoreButton = false
var body: some View {
import SwiftUI
struct BoxesLoadingView: View {
@State private var moveBoxeDown = false
@State private var moveBoxRight = false
@State private var moveBoxUp = false
@State private var moveAllBoxesLeft = false
@State private var refreshPage = false
var body: some View {
struct WithAnimationDelaysChallenge: View {
@State private var showHouse: Bool = false
@State private var showStar: Bool = false
@State private var showGlobe: Bool = false
@State private var showFlight: Bool = false
@State private var borderFill: CGFloat = 0.0
@State private var showButton: Bool = false
var body: some View {
import SwiftUI
struct SelectedButton: View {
@State var tabButtons = tabs[0]
var body: some View {
VStack {
ScrollView(.horizontal, showsIndicators: false) {
ScrollViewReader { value in
HStack(spacing: 20) {
import SwiftUI
struct SelectedButton: View {
@State var tabButtons = tabs[0]
@Namespace var animation
var body: some View {
VStack {
HStack {
ScrollView(.horizontal, showsIndicators: false) {
@allfinlir
allfinlir / gist:cfb7f60c386f8ae6b99ee712b7bd7350
Created December 15, 2022 12:20
Onboarding page example
struct OnboardingInfoViewAnimation: View {
@State private var appearHeadingObjects: Bool = false
@State private var offsetHeadingObjects: Bool = false
@State private var removeHeadingImage: Bool = false
@State private var offsetImageandText: Bool = false
@State private var appearImageandText: Bool = false
var body: some View {
ZStack {
import SwiftUI
struct AppleLoadingCursor: View {
@State private var showView: Bool = false
@State private var rotateCursor: Bool = false
var body: some View {
VStack {
ZStack {
if showView {
struct WithAnimationPaymentChallenge: View {
@State private var scalePayment: Bool = false
@State private var moveUpAndRight: Bool = false
@State private var moveDownAndRight: Bool = false
var body: some View {
VStack {
Text("Payment App")
.font(.largeTitle)
.fontWeight(.semibold)
struct AfterFiveIntroAnimation: View {
@State private var appearText = false
@State private var goLeft = false
@State private var goRight = false
@State private var showStartPageScreen = false
@Namespace var startPageAppear
var body: some View {
VStack {