For those developers who downloaded & worked with facebook plug-in with iphone, the login process is by default is like Gowalla. Where safari appeared & u login from there.
To show login dialog do these steps:-
1) Open facebook.m.
2) In function authorizeWithFBAppAuth, hash this block of code:-
if ([device respondsToSelector:@selector(isMultitaskingSupported)] && [device isMultitaskingSupported]) {
if (tryFBAppAuth) {
NSString *fbAppUrl = [FBRequest serializeURL:kFBAppAuthURL params:params];
didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]];
}
if (trySafariAuth && !didOpenOtherApp) {
NSString *nextUrl = [NSString stringWithFormat:@"fb%@://authorize", _appId];
[params setValue:nextUrl forKey:@"redirect_uri"];
NSString *fbAppUrl = [FBRequest serializeURL:loginDialogURL params:params];
didOpenOtherApp = [[UIApplication sharedApplication] openURL:[NSURL URLWithString:fbAppUrl]];
}
}
3) Enjoy:))
Thursday, 26 May 2011
popovercontroller for iphone not shown
Of course all of u know that uipopovercontroller is not existed for iPhone..it's only for iPad.
So the solution i given thanx to PaulSolt here .
The problem faced me was in UITabBarController. So, the solution to the problem of popover not appeared is :-
1) Open WEPopOverController.m
2) In function presentPopOverFromRect, change the line [keyview addSubview:backgroundView];
to [theView addSubview:backgroundView];
3) enjoy:))
So the solution i given thanx to PaulSolt here .
The problem faced me was in UITabBarController. So, the solution to the problem of popover not appeared is :-
1) Open WEPopOverController.m
2) In function presentPopOverFromRect, change the line [keyview addSubview:backgroundView];
to [theView addSubview:backgroundView];
3) enjoy:))
Wednesday, 23 February 2011
Hide UITabBarController/UITabBar with animation.
BOOL hiddenTabBar;
UITabBarController *tabBarController;
- (void) hidetabbar {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
for(UIView *view in tabBarController.view.subviews)
{
if([view isKindOfClass:[UITabBar class]])
{
if (hiddenTabBar) {
[view setFrame:CGRectMake(view.frame.origin.x, 431, view.frame.size.width, view.frame.size.height)];
} else {
[view setFrame:CGRectMake(view.frame.origin.x, 480, view.frame.size.width, view.frame.size.height)];
}
} else {
if (hiddenTabBar) {
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, 431)];
} else {
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, 480)];
}
}
}
[UIView commitAnimations];
hiddenTabBar = !hiddenTabBar;
}
//Taken from https://sites.google.com/a/injoit.com/knowledge-base/for-developers/graphics/hide-uitabbarcontroller-uitabbar-with-animation
UITabBarController *tabBarController;
- (void) hidetabbar {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.5];
for(UIView *view in tabBarController.view.subviews)
{
if([view isKindOfClass:[UITabBar class]])
{
if (hiddenTabBar) {
[view setFrame:CGRectMake(view.frame.origin.x, 431, view.frame.size.width, view.frame.size.height)];
} else {
[view setFrame:CGRectMake(view.frame.origin.x, 480, view.frame.size.width, view.frame.size.height)];
}
} else {
if (hiddenTabBar) {
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, 431)];
} else {
[view setFrame:CGRectMake(view.frame.origin.x, view.frame.origin.y, view.frame.size.width, 480)];
}
}
}
[UIView commitAnimations];
hiddenTabBar = !hiddenTabBar;
}
//Taken from https://sites.google.com/a/injoit.com/knowledge-base/for-developers/graphics/hide-uitabbarcontroller-uitabbar-with-animation
Subscribe to:
Posts (Atom)