FrontPage

概要

目次

トランジション

struct ContentView: View {
   @State var isHidden = false
   
   var body: some View {
       VStack {
           Button("toggle") {
               withAnimation {
                   isHidden.toggle()
               }
           }
           .padding(.bottom)
           
           if !isHidden {
               Image(systemName: "globe")
                   .imageScale(.large)
                   .foregroundColor(.accentColor)
                   .transition(.opacity)
           }
           
       }
       .padding()
   }
}

説明


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS