peterprokop / SwiftOverlays

SwiftOverlays is a Swift GUI library for displaying various popups and notifications
MIT License
631 stars 83 forks source link

add progress text update #13

Closed jeremy-kunzhou closed 8 years ago

jeremy-kunzhou commented 8 years ago

Just simple implement the progress text update which could use with alamofire progress update block

By invoke SwiftOverlays.updateWaitOverlayText(text:), the text in label view, which is subview of the container overlay view, will be update

BTW, this method must be called in UI thread.

peterprokop commented 8 years ago

@keane Thanks for the PR, appreciate it. But it looks like while true loop in updateOverlayText method will just run endlessly if there is no overlay view present, which is not a great design solution.

jeremy-kunzhou commented 8 years ago

That's my fault.

Thanks for your advice.

Do i need to make another pull request?

peterprokop commented 8 years ago

@keane Please take a look at eb48681. It's basically the same as your code, but now it simply does nothing if no overlay is present.

Also, it's probably better to use UIProgressView for this (which I most likely implement in the nearest future).