views:

129

answers:

1

Hi,

i have to add activity indicator to UITableViewController view since table view height can wary as number of rows increases its not possible to activity indicator display at center. So i think to add it as subview to window and bring it front but when i try

[[self view] window] it giving nil, i tried even

[[[self view] superView] window] then also it giving nil only.

how to overcome this...

A: 

UIWindow *win =[[[UIApplication sharedApplication] delegate] window]; this will give application window add your activity indicator to this window as subview.

[win addSubview:self.activityIndicator];

and bring it front to make visible. [win bringSubviewToFront:elf.activityIndicator];

this is the solution...

jeeva