Mã của tôi đang hoạt động như dự kiến mà tôi cần phải loại bỏ thông báo cảnh báo này. TWTeetComposeViewController không được chấp nhận trong IOS6. Bất kỳ sự thay thế nào cho bộ điều khiển xem tích hợp này trong ios6?TWTweetComposeViewController không được chấp nhận trong IOS6
Đây là mã mẫu của tôi.
if ([TWTweetComposeViewController canSendTweet]) {
// Initialize Tweet Compose View Controller
TWTweetComposeViewController *vc = [[TWTweetComposeViewController alloc] init];
// Settin The Initial Text
[vc setInitialText:@"This tweet was sent using the new Twitter framework available in iOS 5."];
// Adding an Image
UIImage *image = [UIImage imageNamed:@"sample.jpg"];
[vc addImage:image];
// Adding a URL
NSURL *url = [NSURL URLWithString:@"http://mobile.tutsplus.com"];
[vc addURL:url];
// Setting a Completing Handler
[vc setCompletionHandler:^(TWTweetComposeViewControllerResult result) {
[self dismissModalViewControllerAnimated:YES];
}];
// Display Tweet Compose View Controller Modally
[self presentViewController:vc animated:YES completion:nil];
} else {
// Show Alert View When The Application Cannot Send Tweets
NSString *message = @"The application cannot send a tweet at the moment. This is because it cannot reach Twitter or you don't have a Twitter account associated with this device.";
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Oops" message:message delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
[alertView show];
}
cậu thấy rằng TWTeetComposeViewController ở đâu ?? http://developer.apple.com/library/ios/#documentation/Twitter/Reference/TWTweetSheetViewControllerClassRef/Reference/Reference.html – Martin