【问题标题】:unrecognied selector ... error IOS [closed]无法识别的选择器...错误IOS [关闭]
【发布时间】:2013-03-04 10:51:29
【问题描述】:

请帮我解决这个问题:

[UITabBarController setTexteAAfficher:]:无法识别的选择器发送到实例 0x7599e30

这是我的代码:

-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    if([[segue identifier] isEqualToString:@"detailSegue"])
    {

        NSInteger selectedIndex = [[self.tableView indexPathForSelectedRow] row];
        Infos *dvc = [segue destinationViewController];
       dvc.texteAAfficher= [NSString stringWithFormat:@"%@", [maListe objectAtIndex:selectedIndex]];
     }
}    `

我正在尝试将信息从 tableView 传递到 Tab Bar View

【问题讨论】:

  • 该错误描述甚至与您发布的代码无关。此外,您在任何人回答之前格式化您的帖子。
  • 可以发一下方法吗
  • 没有名为 setTexteAAfficher 的方法,但我通过在正确的文件中导入类解决了问题

标签: iphone ios objective-c uitableview uitabbarcontroller


【解决方案1】:

根据代码中的错误

[UITabBarController setTexteAAfficher:]

UITabBarController 中没有这种方法。

您是否使用名为setTexteAAfficher 的方法在 UITabBarController 上创建了一个类别(在某种与英语混合的语言中)?

如果是,您错过了#import 类别文件。

【讨论】:

  • 欢迎 :) 请告知错误是什么。
猜你喜欢
  • 1970-01-01
  • 2012-03-08
  • 1970-01-01
  • 1970-01-01
  • 2015-05-23
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多