ios - Loading Process- Different UILabels -
in app have uibutton , when tap have uiactivityindicatorview , want add diffrent ui labels loads. not real loading process looks. how go doing this?
step 1:
create custom uiview (u can xibs if want). view should have second uiview container in it. when init view set same size viewcontroller putting in. background color transparent (or black lower alpha if want have greyed out effect). set container actual size want appear.
step 2:
put uiactivityindicatorview , uilabel in container. lay out how like.
step 3:
write label updating method uses timer. either performselector:afterdelay: or dispatch_after. have method set label text, wait period of time, change text, wait period of time, change again , on.
step 4:
write showindicator() , hideindicator() methods. view , container's hidden property should set true. when showindicator() called set hidden false , call label updating method step 3. when you've reached end of label changes set hidden = true
it should work this. view controller loads , adds view. view takes entire screen cant see because hidden default. user hits button , showindicator() method called. view become visible. although takes entire screen appears small overlay because background transparent (or alpha greyed out look) , container has smaller frame , solid color. delayed methods called , changes label, waits, changes , on. when reach end of sequence hideindicator() called , views set hidden = true. luck!!!
Comments
Post a Comment