ios - Accessing UIControl allTargets cause a crash when target object is not derived from NSObject -
i'm wondering if expected behavior. have uibutton has added target , selector. target pure swift object. when try access "alltargets" property, ends exc_bad_instruction:
dylib 0x000000010d10d2a0 _tfs26_forcebridgefromobjectivecurftps9anyobject_mx_x + 384", "4 libswiftfoundation.dylib 0x000000010d1152af _tfzfe10foundationvs3set26_forcebridgefromobjectivecftcso5nsset6resultrgsqgs0_x___t_u_ftp_gspv10objectivec8objcbool__t_ + 111", "5 libswiftfoundation.dylib 0x000000010d1153b4 _ttrgrxs8hashablerxfo_ip_dgspv10objectivec8objcbool___xfdcb_dps9anyobject_dgsps1____ + 164", "6 corefoundation 0x000000010a41c0ef __51-[__nssetm enumerateobjectswithoptions:usingblock:]_block_invoke + 79", "7 corefoundation 0x000000010a41c00a -[__nssetm enumerateobjectswithoptions:usingblock:] + 202", "8 libswiftfoundation.dylib 0x000000010d1161c7 _tzfe10foundationvs3set36_unconditionallybridgefromobjectivecfgsqcso5nsset_gs0_x_ + 535", "9
however when change target class in way it's superclass nsobject, works fine. problem both "addtarget" , "alltargets" require type "any", there should no requirements using nsobject target class. have had similar issue me?
Comments
Post a Comment