Search code examples
iphoneuitoolbaruiprogressview

How to add label above UIProgressView in UIToolbar?


I have a UIToolbar in which I have placed a UIProgressView successfully. However, I have seen some apps contain a small label above the UIProgressView which tells the user what the program is doing where progress is being made -- e.g. to download a file. However it seems that this cannot be done in UI Builder. Any ideas on the best way to add the label ablve the UIProgressView in the toolbar? Here is what I am interested in:

+------------------------------------------------+
|         Uploading File                         |
| ================--------------------  [CANCEL] |
+------------------------------------------------+

Solution

  • Make a custom UIView that contains a UILabel and UIProgressView as subviews. You then insert the custom UIView into the toolbar.