开发者

Embed images in library project using Monotouch 4.2?

开发者 https://www.devze.com 2023-04-08 06:41 出处:网络
I have a library project that contains a couple of UIViewControllers that are shared across vario开发者_StackOverflowus applications that make use of the libray.

I have a library project that contains a couple of UIViewControllers that are shared across vario开发者_StackOverflowus applications that make use of the libray. One of the view controllers needs some images. They are located in my myLibrary/Controllers/TestController/Images.

Which build action do I have to specify for the images and how can I access them using UIImage.From*() methods?


You want to set a build action of "Content" on each of the images.

Then for referencing the images from code use the following (my images are in the images folder in my project):

UIImage.FromFile("images/mycoolimage.png");
0

精彩评论

暂无评论...
验证码 换一张
取 消