iOS - loading xib from bundle in Documents directory

后端 未结 4 532
故里飘歌
故里飘歌 2021-02-06 05:38

I\'ve been working on getting \"custom skinnable\" interfaces working for my iOS app by bundling up xibs and downloading bundles, and loading the xibs in those bundles.

4条回答
  •  孤独总比滥情好
    2021-02-06 06:01

    Following the instructions here works:

    loading NSBundle files on iOS

    I was just creating the bundle incorrectly!

    You need to create the bundle in Xcode though because if you don't, it won't be loaded. To create, Add a New Target to your project, choose Framework & Library -> Bundle, and link to Core Foundation. Then add the xibs you want to upload to the web to the target. Build target, reveal it in Finder, compress, and upload!

提交回复
热议问题