ios - Loading image from folder using NSBundle and plist -
trying display load image folder present on mac desktop using path (/users/sai/desktop/images/aaa.jpg) created in plist file called data.plist @ item0. im using nsbundle diaplying image path not loading image desktop .i have done lots of research still couldn't find solution .plz me .here code
nsstring *path=[[nsbundle mainbundle]pathforresource:@"data" oftype:@"plist"]; nsdata *plistxml = [[nsfilemanager defaultmanager] contentsatpath:path]; nsstring *errordesc = nil; nspropertylistformat format; nsdictionary *temp = (nsdictionary *)[nspropertylistserialization propertylistfromdata:plistxml mutabilityoption:nspropertylistmutablecontainersandleaves format:&format errordescription:&errordesc]; nsarray *array=[nsarray arraywitharray:[temp objectforkey:@"images"]]; nsstring *object=[array objectatindex:0]; nslog(@"object @ index %@",[object lastpathcomponent]); nsstring *image=[object lastpathcomponent]; mimageview.image=[uiimage imagenamed:image]; [self.view addsubview:mimageview];
here screen shot of data.plist
simple , short answer : not possible image mac desktop, please better stop fighting :)
it different mobile (iphone application) , desktop (mac application), why want ?? know ios application install in apple iphone ???? if application related ios ? how connect mac os ??
best , simple way put image in application bundle or application's document directory , it.
Comments
Post a Comment