在ios7中,iphone4下使用sharesdk,出現以下問題:
1 分享到新浪微博時,點擊取消分享,鍵盤依然不隱藏。
解決辦法: 創建一個UITextField * tfGlobal,tfGlobal.hidden = YES。在點擊取消分享的時候,調用以下語句:
// 隱藏鍵盤
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[ws hideKeyboard:nil];
});
-(void ) hideKeyboard:(id)obj{
[tfGlobal becomeFirstResponder];
[self.view endEditing:YES];
[self.view resignFirstResponder];
NSLog(@"btn click");
}