xcode - How to access image files in a today notification widget -



xcode - How to access image files in a today notification widget -

is there kind of restriction when accessing image through widgets extension? have image within widget extension supporting files grouping called pocket.png

i want utilize image through widget custom view controller , usual wrote code

var pocketimage:uiimage = uiimage(named: "pocket")

to surprise code returns blank. tried pocket.png same problem.

now tried image path , below code returns nil

let pathx = nsbundle.mainbundle().pathforresource("pocket", oftype: "png")

so how access local available image? note: same code works fine when utilize in main application local image.

there issue xcode didn't re-create images properly. had delete , re-create them 1 time again prepare issue.

xcode swift widget ios8-today-widget

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -