I have uipopovercontroller having uitableview and i want to start animating uiactivityindicatorview in didselectrowatindexpath method of uitableview method. here is my code.
-(IBAction)btnA_Clicked:(id)sender{
self.objuiviewCon = [[myuiviewController alloc] initWithNibName:@"myuiviewController" bundle:nil];
[self.objuiviewCon setDelegate:self];
self.ObjApopCon = [[UIPopoverController alloc] initWithContentViewController:self.objuiviewCon];
[self.ObjApopCon setPopoverContentSize:CGSizeMake(self.objuiviewCon.view.frame.size.width, self.objuiviewCon.view.frame.size.height)];
[self.ObjApopCon presentPopoverFromBarButtonItem:btnA permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
}
@interface myuiviewController : UIViewController<UITableViewDelegate,UITableViewDataSource>{
IBOutlet UITableView *tblList;
IBOutlet UIActivityIndicatorView *actiIndi;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
return [myarr count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
NSLog(@"cell called");
cell.textLabel.text = [myarr objectAtIndex:indexPath.row];
return cell;
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
NSLog(@"didSelectRowAtIndexPath called");
[actiIndi startAnimating];
}
all iboutle connected in interface builder and delegate are also set. but my problem is my didSelectRowAtIndexPath method is calling but activityindicator is not animating.
i am calling webservice when click on table view row by using protocol so i need uiactivityindicatorview to animated till get the output of webservice.
any suggestions will be appreciated.