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
Post a Comment