Why does instantiating a UIFont in an iphone unit test cause a crash?

前端 未结 6 986
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-08 05:18

I\'m trying to unit test some iphone code that instantiates fonts. I\'ve narrowed it down to the following crashing unit test:

#import \"test.h\"
#import &l         


        
6条回答
  •  隐瞒了意图╮
    2020-12-08 05:52

    Select your Unit Test target in the "Targets" section from the projects/targets list and under the "General" section choose your Host app as the main app, which has the fonts.

    That solved the issue for me.

提交回复
热议问题