0
I使用AES算法对图像进行加密。当我在IKImageBrowserView
中使用这些图像时,它会正确显示图像,但我无法将图像拖放到粘贴板。 我已经设置图像表示对IKImageBrowserView
图像对象这样拖放不在IKImageBrowserView中工作
- (NSString *) imageRepresentationType
{
return IKImageBrowserNSDataRepresentationType;
}
- (id) imageRepresentation
{
return [[NSData dataWithContentsOfFile:path]decryptWithString:PASS];
}
但它的工作时,我给这样的
- (NSString *) imageRepresentationType
{
return IKImageBrowserPathRepresentationType;
}
- (id) imageRepresentation
{
return path;
}
上面的代码工作,因为当我从IKImageBrowserView
拖动图像将返回 图像的路径。
现在我需要做的是将IKImageBrowserView
中的加密图像拖放到Pasteboard。