Created
March 23, 2013 01:13
-
-
Save amleszk/5225924 to your computer and use it in GitHub Desktop.
Hack to get around Facebook keyboard hiding, to keep compatibility for another hack to UIWindowLevel described here:(http://stackoverflow.com/questions/3753097/how-to-detect-touches-in-status-bar)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) presentShareController:(SLComposeViewController*)shareCompose | |
{ | |
if ([shareCompose.serviceType isEqualToString:SLServiceTypeFacebook]) { | |
UIWindow *window = [[UIApplication sharedApplication] keyWindow]; | |
UIWindowLevel prevWindowLevel = window.windowLevel; | |
window.windowLevel = UIWindowLevelNormal; | |
SLComposeViewControllerCompletionHandler handler = shareCompose.completionHandler; | |
shareCompose.completionHandler = ^(SLComposeViewControllerResult result){ | |
window.windowLevel = prevWindowLevel; | |
if (handler) { | |
handler(result); | |
} | |
}; | |
} | |
[self presentViewController:shareCompose | |
animated:YES | |
completion:nil]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment