我有UIViewController
一个UITableView
在里面。我UIView
在上面添加了一个子视图。当我在子视图上按下其中一个UIButton
s 时,会出现明显的滞后。我怎样才能让它更快?
观看视频:http ://www.youtube.com/watch?v=KWy6NrZUeqA&feature=youtu.be
- (IBAction)tweetThat:(id)sender {
[MBProgressHUD showHUDAddedTo:self.socialMediaView animated:YES];
dispatch_queue_t queueOne=dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0);
dispatch_sync(queueOne, ^{
NSString *tweetBody=@"BLABLABLATweet";
if ([TWTweetComposeViewController canSendTweet])
{
TWTweetComposeViewController *tweetSheet =
[[TWTweetComposeViewController alloc] init];
[tweetSheet setInitialText:tweetBody];
dispatch_async(dispatch_get_main_queue(), ^{
[MBProgressHUD hideHUDForView:self.controllerView animated:YES];
[self presentModalViewController:tweetSheet animated:YES];
});
}
});
}