2011-07-13 20 views
0

下面我就Three20 ..我用兩個圖像源加載image..That指從本地folder.ie從應用程序文件夾 其他圖像的如何加載和Three20顯示本地圖像

一個Type從網址.. 我的問題是我不知道如何加載本地folder..and圖像顯示它...下面

我的代碼被賦予...

BOOL fileExists = [[NSFileManager defaultManager] fileExistsAtPath:mpngPath]; 
    if(fileExists==YES) 
    { 

     NSLog(@"image is present"); 

     //load and display?? 


    } 


    else { 
     NSLog(@"image is not present"); 
       } 

回答

0

像這樣:

[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"filename" ofType:@"png"]]; 
0

將URL替換爲您的照片路徑。我假設你將你的圖像保存在文檔目錄中。

[NSString stringWithFormat:@"documents://%@",yourPhotoName]; 
相關問題