在向UIView里面添加一个UILabel的时候遇到了[__NSCFNumber length]: unrecognized selector sent to instance的问题,在stackoverflow上搜了一下,发现是因为在设置label的text的时候,传入的参数不是NSString而是integer,然后就把设置label.text的语句改成了labelName.text = [NSString stringWithFormat: @"%@", valueString];,问题就解决了。
问题解答来自http://stackoverflow.com/questions/21846792/nscfnumber-length-unrecognized-selector-sent-to-instance-uitableview