iphone - Activity Indicator show and hide in splash Image & UITableView -
i want add activity indicator & show @ when select didselectrowatindexpath , hide @ while detailview page displayed...plz anyone.... , give sample code.
-(void)showactivityviewer { self.activityview = [[[uiview alloc] initwithframe: cgrectmake(0, 0, self.view.window.bounds.size.width, self.view.window.bounds.size.height)] autorelease]; activityview.backgroundcolor = [uicolor blackcolor]; activityview.alpha = 0.5; self.activitywheel = [[[uiactivityindicatorview alloc] initwithframe: cgrectmake(self.view.window.bounds.size.width / 2 - 12, self.view.window.bounds.size.height / 2 - 12, 24, 24)] autorelease]; activitywheel.activityindicatorviewstyle = uiactivityindicatorviewstylewhitelarge; activitywheel.autoresizingmask = (uiviewautoresizingflexibleleftmargin | uiviewautoresizingflexiblerightmargin | uiviewautoresizingflexibletopmargin | uiviewautoresizingflexiblebottommargin); [activityview addsubview:activitywheel]; [self.view.window addsubview: activityview]; [[[activityview subviews] objectatindex:0] startanimating]; } -(void)removeactivityviewer { [activitywheel removefromsuperview]; [activityview removefromsuperview]; self.activitywheel = nil; self.activityview = nil; }
Comments
Post a Comment