Friday, December 20, 2013

I asked a question baffled experts to help out

This is something that everyone on the micro-blog of
- (Void) viewDidLoad
{
[Super viewDidLoad];
self.renren = [Renren sharedRenren];
self.renren.renrenDelegate = self;
NSHTTPCookieStorage * cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage];
NSArray * graphCookies = [cookies cookiesForURL:
[NSURL URLWithString: @ "http://graph.renren.com"]];

for (NSHTTPCookie * cookie in graphCookies) {
[Cookies deleteCookie: cookie];
}
NSArray * widgetCookies = [cookies cookiesForURL: [NSURL URLWithString: @ "http://widget.renren.com"]];

for (NSHTTPCookie * cookie in widgetCookies) {
[Cookies deleteCookie: cookie];
}
[Self.renren authorizationWithPermisson: nil andDelegate: self];
}

Such direct write everyone's OAuth 2.0 interface does not come out


If so write

- (Void) mainShow {
NSHTTPCookieStorage * cookies = [NSHTTPCookieStorage sharedHTTPCookieStorage];
NSArray * graphCookies = [cookies cookiesForURL:
[NSURL URLWithString: @ "http://graph.renren.com"]];

for (NSHTTPCookie * cookie in graphCookies) {
[Cookies deleteCookie: cookie];
}
NSArray * widgetCookies = [cookies cookiesForURL: [NSURL URLWithString: @ "http://widget.renren.com"]];

for (NSHTTPCookie * cookie in widgetCookies) {
[Cookies deleteCookie: cookie];
}
[Self.renren authorizationWithPermisson: nil andDelegate: self];

}

- (Void) viewDidLoad
{
[Super viewDidLoad];
self.renren = [Renren sharedRenren];
self.renren.renrenDelegate = self;

UIButton * test = [[UIButton alloc] initWithFrame: CGRectMake (400, 200, 100, 100)];
test.backgroundColor = [UIColor yellowColor];
[Test addTarget: self action: @ selector (mainShow) forControlEvents: UIControlEventTouchUpInside];
[Self.view addSubview: test];
}

Everyone wrote the OAuth 2.0 interface you can come out firmly difference between the two is out with a click of a button directly out
Why would cause such a situation?
If it does not click I want to come out how to solve it?

http://www.cocoachina.com/bbs/read.php?tid=77033&page=e & # a

This is my link address code can be downloaded hope you help
Reply:
Looked at your code, when in fact he executed authorizationWithPermisson approach is to view the display in the key window.

If you pop up a dialog window so now the key window on the show at the top, so you are now looking to.

Why did you add in viewDidload not see it, in fact it is your rootView blocked, so you can hide the current view, you can see it.

- (Void) viewDidLoad
{
...
[Self performSelector: @ selector (mainShow)];
[Self.view setHidden: YES];
}

No comments:

Post a Comment