报错
2016-09-08 10:44:08.614 ****百思不得姐****[2877:71320] -[__NSCFConstantString count]: unrecognized selector sent to instance 0x10df2e330
2016-09-08 10:44:08.618 ****百思不得姐****[2877:71320] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFConstantString count]: unrecognized selector sent to instance 0x10df2e330'
因为 我 改写了 方法, 又要在 两个 视图 中 调用。 改了一个, 另一个 视图中的 没修改。 所以, 悲剧了。
NavTitleView.h
- (void) navTitleView: (NavTitleView * ) navTitleView didClickButtonAtIndex: (NSInteger ) index withUrlString: (NSString * ) urlString;
对的
NavTitleView.h
dispatch_async( dispatch_get_main_queue() , ^{
NavTitleView * titleView = [[NavTitleView alloc ] initWithTitles: subModel.submenus rightImageName:@"navigationButtonRandomN_26x26_" rightHighlightImageName:@"navigationButtonRandomClickN_26x26_"];
# 错的
dispatch_async( dispatch_get_main_queue() , ^{
NavTitleView * titleView = [[NavTitleView alloc ] initWithTitles:titles rightImageName:@"navigationButtonRandomN_26x26_" rightHighlightImageName:@"navigationButtonRandomClickN_26x26_"];