<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          ShapeAnimation-SwiftSwift 矢量動畫框架

          聯合創(chuàng)作 · 2023-09-27 05:52

          iOS上使用Swift實現的矢量圖形動畫框架,可動畫繪圖。

          特點是可寫少量代碼實現常見的CoreAnimation層動畫,利用閉包定制動畫特性。

          目前已支持下列動畫函數:

          • opacityAnimation, flashAnimation 透明度、閃爍

          • scaleAnimation 放縮

          • rotate360Degrees, rotationAnimation 旋轉

          • shakeAnimation 左右搖晃

          • moveAnimation, moveOnPathAnimation 沿路徑移動

          • slideToRight 向右滑動

          • strokeEndAnimation 沿線描繪

            strokeColorAnimation, lineWidthAnimation, dashPhaseAnimation 線條顏色、線寬動畫,虛線動畫可用于亮顯選擇

          • switchPathAnimation 切換圖形

          • animationGroup 一個層多個動畫同時進行

          • applyAnimations 多個層同步動畫

          滾動六邊形

          該框架還在不斷更新中,歡迎Fork、點贊,歡迎動手和提建議。

          代碼示例:

          let layer1 = addLinesLayer(view, points:[(10.0,20.0),(150.0,40.0),(120.0,320.0)])
          layer1.strokeEndAnimation().apply() {
              layer1.shakeAnimation().apply()
          }
          let la2 = self.addLinesLayer(view, points:points2, color: UIColor.blueColor())
          lla2.scaleAnimation(from:1, to:1.1, repeatCount:3).apply(duration:0.3)
          let la3 = self.addLinesLayer(view, points:points3, color: UIColor.greenColor())
          la3.flashAnimation(repeatCount:6).apply()
          let la4 = addLinesLayer(view, points:[(10.0,20.0), (150.0,40.0), (120.0,120.0)])
          let a1 = la4.moveOnPathAnimation(path).set {$0.duration=1.6}
          let a2 = la4.rotate360Degrees().set {$0.repeatCount=2}
          animationGroup([a1, a2]).set {$0.autoreverses=true}.apply()


          瀏覽 31
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          評論
          圖片
          表情
          推薦
          點贊
          評論
          收藏
          分享

          手機掃一掃分享

          編輯 分享
          舉報
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  亚洲人体视频在线观看 | 一区二区无码区 | 美女福利视频网 | 亚洲精品酒店在线观看视频成人电影 | 国产女人18毛片水真多果冻 |