通過 IKImage 視圖預覽圖像 (Previewg images via IKImage View)


問題描述

通過 IKImage 視圖預覽圖像 (Previewg images via IKImage View)

I need help ,I am pressed by time and I am blocked. Ihave a table view containing a directory's files (icon, name, size, date) . Tha table is filled via an arraycontroller. The table view just displays the image files and pdf files.When I select a row I want to preview the content in an IKImage view which isjust under the table. But I can't preview the content. Can you help me and give me some documentation , tutorials or commands on how to preview them and how to use ikimage view? I guess the ikimage view is the best solution. What do you think about that? 


參考解法

方法 1:


    I guess that you have come up with the solution but a referral for others who might come here.    read apple example  its simple to start with.   In your case you can use 
 - (void)setImage:(CGImageRef)image imageProperties:(NSDictionary *)metaData 
 where your file properties can go in as dictionary object. 
   In the apple's example you can check out how to get CGImageRef from filepath, or you can use setImageWithURL

(by WaelVacca)

參考文件

  1. Previewg images via IKImage View (CC BY-SA 3.0/4.0)

#cocoa #objective-c #nsfilemanager #nstableview #ikimageview






相關問題

為什麼 NSWindow 或 NSView 實例處理它自己的鍵事件,而不是它的委託? (Why does an NSWindow or NSView instance handle its own key events, and not its delegate?)

通過 IKImage 視圖預覽圖像 (Previewg images via IKImage View)

Gaya Jendela Kustom di Kakao (Custom Window Style in Cocoa)

Apakah NSURLConnections termasuk dalam model atau pengontrol saya? (Do NSURLConnections belong in my model or controller?)

Эквівалент ключа NMenuItem не працуе, калі меню схавана (NSMenuItem Key Equivalent not working when menu is hidden)

透明窗口中的圓形 NSView (Rounded NSView in a Transparent Window)

單元格中不可見的 UITextField 已將 userInteractionEnabled 設置為 No (UITextField in cell that is not visible has userInteractionEnabled set to No)

如何為自定義 NSImageRep 子類實現 -draw (How to implement -draw for custom NSImageRep subclass)

從 Objective-C 中的核心數據元素獲取和設置值? (Getting and Setting values from Core Data elements in Objective-C?)

來自 URL 編碼問題的 NSArray (NSArray from URL encoding problem)

停靠欄下的窗口化opengl遊戲中的雙光標 (Double cursor in windowed opengl game under dock)

在特定的 NSTableview 單元格中對角線繪製線條 (Draw Lines Diagonally in a particular NSTableview cell)







留言討論