How to show UIView only when i received all data f

2019-08-09 12:42发布

I am getting data from server in my application. Currently I making this using NSUrlConnection and getting data in connectionDidFinishLoading. Mean while i am showing an alertView to user. but that time my view is not updated with data.

I can only show while whole response is came form server and refreshing the view later.

Can i restrict view to shown up only when whole response is acquired or can i make the that dark effect of uialertview more dark which make containing view disable???

EDIT:

From all answers i would like to know that can i make gray effect of UIAlertView more dark or may i change it with other color ? or can someone explain me how its shown up ??

2条回答
放荡不羁爱自由
2楼-- · 2019-08-09 12:51

1)In viewDidLoad method you can add another temporary view with dark gray background color.

2)Add activity indicator in this temporary view & start that indicator and set user interaction disable for self view.

3)In connectionDidFinishLoading stop the indicator & remove temporary view and enable user interaction of self view.

查看更多
走好不送
3楼-- · 2019-08-09 13:12

You can add a overlay of darker color and an UIActivityIndicator, make the userInteraction disabled for that period for time

查看更多
登录 后发表回答