Loading code from a framework for a custom control in IBDesignable

后端 未结 1 1447
刺人心
刺人心 2021-01-03 06:18

I\'ve implemented a custom control in a OS X application that works fine. When the control is drawn it uses code from a non system Framework. The control is written in swift

相关标签:
1条回答
  • 2021-01-03 06:39

    The solutions is to set the Installation Directory build setting for the Framework target in Xcode to @rpath. Then in the Xcode project that builds the Application add to the "Runpath Search Paths" build setting of the Application target the value: @loader_path/../Frameworks.

    Using @rpath instead of @executable_path is much more flexible.

    The two blog posts that helped me work this out are:

    Using rpath by Dave Dribin

    and

    Linking and Installing by Mike Ash

    0 讨论(0)
提交回复
热议问题