this question has answer here:
myimageview = [[uiimageview alloc] initwithimage:[imagearray objectatindex:j]]; [myimageview setuserinteractionenabled:yes]; [myimageview settag:i]; if (i==0||i==1) { [uiimageview beginanimations:nil context:null]; [uiimageview setanimationduration:1.5]; [uiimageview setanimationrepeatcount:0]; myimageview.center=cgpointmake(42+t, 220+y); [self.view addsubview:myimageview]; nslog(@"my imageviw tag %d",myimageview.tag); [myimageview release]; t=t+10; y=y+10; }
i still dont understood question..if want image file name uiimageview object not possible..
the reason uiimageview instance not store image file. stores displays uiimage instance. when make image file, this:
uiimage *picture = [uiimage imagenamed:@"myfile.png"]; once done, there no longer reference filename. uiimage instance contains data, regardless of got it. thus, uiimageview couldn't possibly know filename.
also, if could, never filename info view. breaks mvc.
shamelessly copied answer of this thread..credit him
Comments
Post a Comment