objective c - How to set multiple Image Well? -
i new cocoa , wish set multiple image image well.
here code snippet:
//--------------show rank 1 image-------------// int rank1 = rank_fst5[0]; nsstring *rank1_path = [nsstring stringwithformat:@"/users/desktop/gallery/%d.png",rank1]; nsimage *image1 = [[nsimage alloc] initwithcontentsoffile:rank1_path]; [imagerank1 setimage:image1]; //--------------show rank 2 image-------------// int rank2 = rank_fst5[1]; nsstring *rank2_path = [nsstring stringwithformat:@"/users/desktop/gallery/%d.png",rank2]; nsimage *image2 = [[nsimage alloc] initwithcontentsoffile:rank2_path]; [imagerank2 setimage:image2];
the result shows first image in "imagerank1".
, if comment first show image code, can second 1 on show. 2 images cannot show concurrently.
could me? thanks.
Comments
Post a Comment