objective c - Iphone : How to Display Document Directory images in Image View? -



objective c - Iphone : How to Display Document Directory images in Image View? -

in app images stored in document directory folder,

i wanted particular image display in image view,

how image display in image view document directory ?

sample code:

- (nsstring *)applicationdocumentsdirectory { homecoming [nssearchpathfordirectoriesindomains(nsdocumentdirectory, nsuserdomainmask, yes) lastobject]; } -(void)loadimage{ nsstring *workspacepath=[[self applicationdocumentsdirectory] stringbyappendingpathcomponent:@"your image-name"]; uiimageview *myimage=[uiimageview alloc] initwithframe:cgrectmake(0,0,20,20)]; myimage.image=[uiimage imagewithdata:[nsdata datawithcontentsoffile:workspacepath]]; [self.view addsubview:myimage]; [myimage release]; }

tnq

iphone objective-c cocoa-touch ios4

Comments

Popular posts from this blog

c# - Move local mssql database to webhosted MYSQL -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -

java - How to pass parameters between Request-Scoped Controllers? -