ios 7.1 Crash when tap on More button on tab bar -
i got crash bug on when tap on more button on tabbar. happened on ios 7.1.
i created class (moretableviewdelegate) override uitableviewdelegate of more table view
morenavigationcontroller uiviewcontroller *moreviewcontroller = tabbarcontroller.morenavigationcontroller.topviewcontroller; uitableview *moretableview = (uitableview*)moreviewcontroller.view; moretableviewdelegate *objmoredelegate=[[moretableviewdelegate alloc]initwithdelegate:moretableview.delegate]; moretableview.delegate=objmoredelegate; this detail of moretableviewdelegate:
-(moretableviewdelegate *) initwithdelegate:(id<uitableviewdelegate>) delegate { originaldelegate=delegate; [super init]; return self; } - (cgfloat)tableview:(uitableview *)tableview heightforrowatindexpath:(nsindexpath *)indexpath { if(ispoweredbymobicart==yes) { return 50; } else { return 60; } } - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { return [originaldelegate tableview:tableview didselectrowatindexpath:indexpath]; } but when tap on more button @ tab bar, it's crashed , log:
-[moretableviewdelegate _layoutcells]: unrecognized selector sent instance 0xce7f300 2014-03-25 11:03:12.360 foreverint[961:90b] *** terminating app due uncaught exception 'nsinvalidargumentexception', reason: '-[moretableviewdelegate _layoutcells]: unrecognized selector sent instance 0xce7f300' *** first throw call stack: ( 0 corefoundation 0x0336b1e4 __exceptionpreprocess + 180 1 libobjc.a.dylib 0x02ee18e5 objc_exception_throw + 44 2 corefoundation 0x03408243 -[nsobject(nsobject) doesnotrecognizeselector:] + 275 3 corefoundation 0x0335b50b ___forwarding___ + 1019 4 corefoundation 0x0335b0ee _cf_forwarding_prep_0 + 14 5 uikit 0x00bcc785 -[_uimorelisttableview didmovetowindow] + 108 6 uikit 0x00adb478 -[uiview(internal) _didmovefromwindow:towindow:] + 1642 7 uikit 0x00aed68b -[uiscrollview _didmovefromwindow:towindow:] + 65 8 uikit 0x00adb109 -[uiview(internal) _didmovefromwindow:towindow:] + 763 9 uikit 0x00ad296f __45-[uiview(hierarchy) _postmovedfromsuperview:]_block_invoke + 158 10 uikit 0x00ad27fb -[uiview(hierarchy) _postmovedfromsuperview:] + 260 11 uikit 0x00adddd4 -[uiview(internal) _addsubview:positioned:relativeto:] + 1875 12 uikit 0x00ad0dba -[uiview(hierarchy) addsubview:] + 56 13 uikit 0x00db6c5b -[uinavigationtransitionview transition:fromview:toview:] + 501 14 uikit 0x00db6a5e -[uinavigationtransitionview transition:toview:] + 55 15 uikit 0x00bb7577 -[uinavigationcontroller _starttransition:fromviewcontroller:toviewcontroller:] + 3186 16 uikit 0x00bb78cc -[uinavigationcontroller _startdeferredtransitionifneeded:] + 645 17 uikit 0x00bb84e9 -[uinavigationcontroller __viewwilllayoutsubviews] + 57 18 uikit 0x00cf90d1 -[uilayoutcontainerview layoutsubviews] + 213 19 uikit 0x00ae0964 -[uiview(calayerdelegate) layoutsublayersoflayer:] + 355 20 libobjc.a.dylib 0x02ef382b -[nsobject performselector:withobject:] + 70 21 quartzcore 0x01d9d45a -[calayer layoutsublayers] + 148 22 quartzcore 0x01d91244 _zn2ca5layer16layout_if_neededepns_11transactione + 380 23 quartzcore 0x01d910b0 _zn2ca5layer28layout_and_display_if_neededepns_11transactione + 26 24 quartzcore 0x01cf77fa _zn2ca7context18commit_transactionepns_11transactione + 294 25 quartzcore 0x01cf8b85 _zn2ca11transaction6commitev + 393 26 quartzcore 0x01db65b0 +[catransaction flush] + 52 27 uikit 0x00a6f9bb _uiapplicationhandleeventqueue + 13095 28 corefoundation 0x032f477f __cfrunloop_is_calling_out_to_a_source0_perform_function__ + 15 29 corefoundation 0x032f410b __cfrunloopdosources0 + 235 30 corefoundation 0x033111ae __cfrunlooprun + 910 31 corefoundation 0x033109d3 cfrunlooprunspecific + 467 32 corefoundation 0x033107eb cfrunloopruninmode + 123 33 graphicsservices 0x035c85ee gseventrunmodal + 192 34 graphicsservices 0x035c842b gseventrun + 104 35 uikit 0x00a71f9b uiapplicationmain + 1225 36 foreverint 0x00086b9d main + 125 37 foreverint 0x000030d5 start + 53 ) libc++abi.dylib: terminating uncaught exception of type nsexception
how solve issue ? please me.
Comments
Post a Comment