DSActivityView updated to support multiple label lines, and demo of no label

This blog post has been replaced by a newer edition.

Please see blog posts on DejalActivityView.

DSActivityViewI've committed a minor update to the DSActivityView open source project for iOS. See the DSActivityView introductory post for more information, including a video demo.

This update adds support for splitting the label over multiple lines for the DSBezelActivityView variation. This change was contributed by Suleman Sidat. Thank you!

To use multiple lines for the label, simply include one or more \n sequences in the label text, e.g.

[DSBezelActivityView newActivityViewForView:self.view withLabel:@"Split over\nMultiple lines..."]

Similarly, to display an activity view with just the activity indicator, and no label, simply specify a blank label:

[DSBezelActivityView newActivityViewForView:self.view withLabel:@""]

DSActivityView is compatible with iOS 3.0 and later, including iOS 4 (and I believe iOS 5), on iPad, iPhone and iPod touch.

You can get the project from my Dejal Open Source Subversion repository via this Terminal command:

svn checkout http://dejal.svn.beanstalkapp.com/open/DSActivityView

Or browse the source directly on the web.

If you make any enhancements to DSActivityView, please contribute them back to me so I can share with other developers.

Re: DSActivityView updated to support multiple label lines, ...

This latest update really helped me out. Thanks so much for making this code available.

One question, however. The activity view in my app appears over the top of a table and scrolls with the table. Can you point me in the direction of how I can prevent the activity view from scrolling with the table?

Thanks, again!

Re: DSActivityView updated to support multiple label lines, ...

Alright, that was too simple: just set _coverNavBar to YES.

Sorry to bother you, but, hey, your code works great. Thanks for the assist.

David Sinclair's picture

Re: DSActivityView updated to support multiple label lines, ...

Yeah, that'll do it -- but the real cause was that you were probably adding the activity view to the table view itself, instead of its containing view (e.g. the navigation controller's view).