Search code examples
iphoneiosfacebookoauthfbconnect

login window on another view controller iPhone


In Facebook API in FBDialoge.m file ,

I want that login window to open on another VC, so in FBDialoge.m file ,

I am changing this code ..

UIWindow* window = [[UIApplication sharedApplication].windows objectAtIndex:0];
[window addSubview:self];
[window addSubview:_modalBackgroundView];

to

 SettingsPopover *svp = [[SettingsPopover alloc] init];
[svp.view addSubview:self];
[svp.view addSubview:_modalBackgroundView];

but that login window is not coming on SettingsPopover , can anyone tell me what should I do here?


Solution

  • Here instance of SettingsPopover *svp is new one which will add subviews but will not take effect until this new instance is used. Where ever u added SettingsPopover in viewcontroller that the reference i m talking about.

    I mean u need original reference of SettingsPopover to take effect by adding subview.