I am trying to show a webview on top of the uitableview, I designed the view in Nib, but I am doing something seriously wrong and it does not work at all..
In the uitableview controller I do this;
modalWebView *webUIViewController = [[modalWebView alloc] init];
NSArray* s=[[NSBundle mainBundle] loadNibNamed:@"modalWebView" owner:webUIViewController options:nil];
UIView* v= [s objectAtIndex:0];
[self showModal:v];
And this is the method;
- (void) showModal:(UIView*) modalView {
UIWindow* mainWindow = (((AppDelegate_iPhone*) [UIApplication sharedApplication].delegate).window);
CGSize offSize = [UIScreen mainScreen].bounds.size;
CGPoint offScreenCenter = CGPointMake(offSize.width / 2.0, offSize.height * 1.5);
modalView.center = offScreenCenter; // we start off-screen
[mainWindow addSubview:modalView];
modalView.center=middleCenter;
}