Adding UIActivityIndicator to UITableView

后端 未结 2 1615
情歌与酒
情歌与酒 2021-01-27 23:28

I need to load some data in a table view and while this is going on in the background I want to add an activity indicator in order to show that there is a process going on and w

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-27 23:53

    Depends, whether you want to block your user or not and also how important is the activity indication.

    If you don't want to block user, use Application.networkActivityIndicatorVisible, if you want to have larger activity indicator and still not to block user, animate UIView with text and UIActivityIndicator below the table view (tableview.height -= activityview.height) and then hide on complete or if you would like to block user, use blocking activity indicator.

    • http://www.dejal.com/developer/?q=developer/dsactivityview
    • https://github.com/jdg/MBProgressHUD (I was using MBProgressHUD personally and it's easy to learn and use)

提交回复
热议问题