0

我使用 FB graph api 将我的 ios 应用程序与 facebook.but 集成在一起我来自哪里的屏幕。

NSString *url_string = [NSString stringWithFormat:@"https://graph.facebook.com/oauth/authorize?client_id=%@&redirect_uri=%@&scope=%@&type=user_agent&display=touch", facebookClientID, redirectUri, extended_permissions];
NSURL *url = [NSURL URLWithString:url_string];
NSURLRequest *request = [NSURLRequest requestWithURL:url];

CGRect webFrame = [super_view frame];

webFrame.origin.y = 0;
UIWebView *aWebView = [[UIWebView alloc] initWithFrame:webFrame];
[aWebView setDelegate:self];    
self.webView = aWebView;

UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
button.frame = CGRectMake(5.0, 10, 150.0, 30.0);
[button setTitle:@"My Button" forState:UIControlStateNormal];
[button addTarget:self action:@selector(myAction:) forControlEvents:UIControlEventTouchUpInside];
[self.webView addSubview:button];
[aWebView release];

[webView loadRequest:request];  
[super_view addSubview:webView];

所以我怎么能搬回来请一些身体帮助我.....

4

1 回答 1

0

myAction:方法中,删除webView

[self.webView removeFromSuperView];
于 2012-06-09T10:45:49.933 回答