How to show the loading indicator in the top status bar

后端 未结 8 2034
借酒劲吻你
借酒劲吻你 2020-12-04 06:37

I have noticed that some apps like Safari and Mail show a loading indicator in the status bar (the bar at the very top of the phone) when they are accessing the network. Is

8条回答
  •  再見小時候
    2020-12-04 07:20

    You need to take care of hiding the activity indicator also once your network call is done.

    If you use AFNetworking, then you don't need to do much.

    Do following changes in AppDelegate Class:

    1. Import AFNetworking/AFNetworkActivityIndicatorManager.h

    2. Put this in didFinishLaunchingWithOptions:

    [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]

提交回复
热议问题