[__NSCFNumber rangeOfCharacterFromSet:]:无法识别的选择器发送到实例0x7c2125a0

时间:2017-06-22 04:21:57

标签: ios objective-c

有谁可以解释为什么我会收到此错误?

  

[__ NSCFNumber rangeOfCharacterFromSet:]:发送到无法识别的选择器   实例0x7c2125a0

dispatch_async(dispatch_get_main_queue(), ^{

        [imageHolderForMainView removeFromSuperview];

        [self.navigationController setNavigationBarHidden:NO];   // iam getting the above mentioned error here

        [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;

    });

1 个答案:

答案 0 :(得分:0)

你正在使用NSString但它是一个NSNumber。检查你的对象是字符串还是数字。您可以从以下代码中检查您的对象

$list=mysql_query("SELECT id FROM table_name");
$count=1;
while($row=mysql_fetch_array($list))
{
    if($count==50)
    {
        $found_id=$row['id'];
    }
    $count++;
}
echo "id of 50 number row is ".$found_id;