ios - Swift - UIProgressView fills diagonally -


so set uiprogressview fill after 3 seconds increasing height of bar bit. when fills up, fills diagonally opposed filling 1 side other. bar starts in top right corner , expands fill progress view before ends.

this code using:

import uikit  class loadingscreen: uiviewcontroller {       @iboutlet weak var progressview: uiprogressview!       override func viewdidload() {         super.viewdidload()          uiview.animatewithduration(3, animations: { () -> void in             self.progressview.setprogress(1.0, animated: true)         })          progressview.transform = cgaffinetransformscale(progressview.transform, 1, 10)  }   } 

here screenshots:

enter image description here enter image description here enter image description here

coming rather late experienced , fixed changing progressview style .bar. hope helps!

let progressview = uiprogressview(progressviewstyle: .bar) 

Comments