BESUP
  • HOME
  • PRODUCT
  • CONTENT
    • Swift一覧 >
      • UIView(ビュー)
      • UILabel(ラベル)
      • UIButton(ボタン)
      • UITextField(テキストフィールド )
      • UITextFieldの編集・キーボードリターンキーを押した時
      • UITextView(テキストビュー)
      • UITextViewの編集・キーボードリターンキーを押した時
      • UITabBar(タブバー)
      • UINavigationBar(ナビゲーションバー)
      • UITableView(テーブルビュー)
      • 横スライドアニメーション
      • 手描き
  • お問い合わせ

B E S U P

ー はじまりを、より良い機能を ー

アニメーション_横スライド

【横スライドアニメーションの実装】

【画面遷移の時に横スライドで移動する方法】
navigationViewControllerを使用せずに、
別のViewControllerに画面遷移する時に横スライドのアニメーションで移動する方法になります。
​
    //移動する先のViewController
    let nextVC = NextViewController() 

    let transition = CATransition()    
    
transition.duration = 0.2
    transition.type = CATransitionType.push
    transition.subtype = CATransitionSubtype.fromRight
    
    
view.window!.layer.add(transition, forKey: kCATransition)

    //遷移後の画面をどのように表示するか(大きさ)
    nextVC.modalPresentationStyle = .fullScreen
    self.present(nextVC, animated: false, completion:  nil)​
コンテンツ一覧へ

ホーム

プライバシーポリシー

お問い合わせ

Copyright © 2020
  • HOME
  • PRODUCT
  • CONTENT
    • Swift一覧 >
      • UIView(ビュー)
      • UILabel(ラベル)
      • UIButton(ボタン)
      • UITextField(テキストフィールド )
      • UITextFieldの編集・キーボードリターンキーを押した時
      • UITextView(テキストビュー)
      • UITextViewの編集・キーボードリターンキーを押した時
      • UITabBar(タブバー)
      • UINavigationBar(ナビゲーションバー)
      • UITableView(テーブルビュー)
      • 横スライドアニメーション
      • 手描き
  • お問い合わせ