dslkfjsdlfjl
dslkfjsdlfjl

Reputation: 145

How to Hide a UIProgressView in Swift IOS

I have a progress view that is initialized in the following code:

@IBOutlet weak var progressView: UIProgressView!

I am trying to figure out how to hide this progress view. I looked through Apples documentation at: https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIProgressView_Class/ but it does not directly state any function to hide the UIProgressView. Is it possible to hide an UIProgressView and if so, how can I do this?

Upvotes: 0

Views: 2941

Answers (2)

Tinus Guichelaar
Tinus Guichelaar

Reputation: 541

In Swift 3 use:

progressView.isHidden = true

Upvotes: 5

atomoil
atomoil

Reputation: 404

UIProgressView inherits from UIView, so this should do the trick:

progressView.hidden = true

See here for more details: https://developer.apple.com/Library/ios/documentation/UIKit/Reference/UIView_Class/index.html#//apple_ref/occ/instp/UIView/hidden

Upvotes: 1

Related Questions