我有一个 UIPopoverController,它有一个填充的 UITableView。我正在尝试将信息从 popovercontroller 传递到 superview。放置在 popovercontroller 中的 tableview 正在使用 didSelectRow 方法接收信息,但信息没有传输到放置在 superView 中的 textView。
下面是我用来尝试将所选用户放置在 textview 中的代码,下面是 Superview 代码,我在单击索引时尝试获取字符串并将其放入实际字段中。我知道我的问题是我没有告诉我的 superView 该行已被触摸并将该信息发送到该字段,但我已经搜索并没有找到有关如何尝试此操作的良好解释。
如果有人有任何建议,那就太好了!
谢谢
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
*)indexPath {
if (indexPath){
NSString *selectedUser = [(Tweet*)[Friend objectAtIndex:indexPath.row]
followingScreenName];
TwitterFollowersTimline *textBox = [[TwitterFollowersTimline alloc]
initWithNibName:@"TwitterFollowersTimeline" bundle:[NSBundle mainBundle]];
textBox.selectedFriend = selectedUser;
NSLog(@"%@", selectedUser);
[textBox release];
textBox = nil;
}
}
在我的超级视图中
selectedFriend = [[NSString alloc] init];
creatTweetText.text = [NSString stringWithFormat:@"@%@", selectedFriend];