已结束。此问题需要
debugging details .它目前不接受答案。
Best Answer-推荐答案 strong>
如果 object
有时是 NSDictionary 有时是 NSString 你可以检查它并以不同的方式处理它:
+(CGFloat)heightForViewWithObjectid)object inColumnWidthCGFloat)columnWidth {
NSString *titleText = [object isKindOfClass:[NSDictionary class] ] ? [object objectForKey"title"] : object;
}
(BOOL)isKindOfClassClass)aClass
Returns a Boolean value that indicates whether the receiver is an instance of given
class or an instance of any class that inherits from that class.
关于ios - [__NSCFString objectForKey :]: unrecognized selector sent to instance,我们在Stack Overflow上找到一个类似的问题:
https://stackoverflow.com/questions/24651136/
欢迎光临 OStack程序员社区-中国程序员成长平台 (https://ostack.cn/) |
Powered by Discuz! X3.4 |