UIAlert Title 버튼을 눌렀을 때 TweetSheet에 텍스트를 어떻게 추가 할 수 있습니까?UIAlert가 눌려 졌을 때 TweetSheet에 텍스트 추가하기
현재이 코드를 사용하여이를 달성했지만 지금까지 실패했습니다.
- (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
NSString *title = [alertView buttonTitleAtIndex:buttonIndex];
TWTweetComposeViewController *tweetSheet = [[TWTweetComposeViewController alloc] init];
if ([title isEqualToString:@"Add custom text"]) {
UIAlertView *alert= [[UIAlertView alloc] initWithTitle:@"Add a template" message:nil delegate:self cancelButtonTitle:@"Hi it was nice meeting you" otherButtonTitles:nil, nil];
[alert show];
[alert release];
}
if ([title isEqualToString:@"Hi it was nice meeting you"]) {
[tweetSheet setInitialText:@"hey it was nice meeting you"];
}
}
아무도 나에게 무슨 문제가 있다고 말할 수 있습니까?