2009-09-11 68 views
1

根據NSPasteboard.h(在Xcode SDK標準雪豹複製線294),它規定:pboard類型將被棄用

/* Use of pboard types should be replaced with use of UTIs. 
Pboard types will be deprecated in a future release. */ 

我試圖找到使用尿路感染作爲替代樣本Pboard類型,但我無法找到任何地方演示如何做到這一點。

有沒有人有任何示例代碼顯示如何用UTI替換板類型?

謝謝

回答

4

你剛纔使用的UTI以前你會使用Pboard類型。

有關UTI的更多信息,請參閱Uniform Type Identifiers Overview

+0

鏈接不工作了 – Jankeesvw 2012-07-18 09:21:40

+0

,我認爲這是新的鏈接:https://developer.apple。 com/library/mac /#documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html – Jankeesvw 2012-07-18 09:22:13

+0

@Jankeesvw:現在修復。謝謝。 – 2012-07-18 19:10:22

0

這是爲我工作:

[self.tableView registerForDraggedTypes:@[(NSString *)kUTTypeUTF8PlainText]]; 

在UTCoreTypes.h

看看