objective c - View not updating when it's properties change in custom delegate -
i have acpdownloadview instance of appdelegate. it's showing downloading progress. when update it's progress value in view controller, works fine.
appdelegate.downloadvew=[[acpdownloadview alloc] initwithframe:cgrectmake(0, 0, 30, 30)]; appdelegate.downloadvew.backgroundcolor=[uicolor clearcolor]; progressbtn= [[uibarbuttonitem alloc] initwithcustomview:appdelegate.downloadvew]; acpindeterminategooglelayer * layer = [acpindeterminategooglelayer new]; [layer updatecolor:[uicolor bluecolor]]; [appdelegate.downloadvew setindeterminatelayer:layer]; [appdelegate.downloadvew setindicatorstatus:acpdownloadstatusrunning]; [appdelegate.downloadvew setprogress:0.0 animated:no];
now, have delegate method called when progress updated.
-(void)progressaddchannel:(nsprogress *)uploadprogress{ float prog=uploadprogress.fractioncompleted; [appdelegate.downloadvew setprogress:prog animated:yes]; [appdelegate.downloadvew layoutifneeded]; nslog(@"%f",prog);
}
this code executes , show correct value of progress. progress not animating on appdelegate.downloadvew. know behavior?
since making ui changes make sure code runs on main thread.
Comments
Post a Comment