我正在尝试为 UIDocumentMenuViewController 添加自定义图标,但唯一出现的是蓝色方块。我也尝试过使用不同的文件。
@IBAction func importAction(sender: UIButton) {
let importMenu: UIDocumentMenuViewController = UIDocumentMenuViewController(documentTypes: ["public.audio"], inMode: .Import)
let img = UIImage(named: "MusicIcon.png")!
importMenu.addOptionWithTitle("Music Library", image: img, order: UIDocumentMenuOrder.First, handler:{ self.musicPicker()})
importMenu.delegate = self
self.presentViewController(importMenu, animated: true, completion: nil)
}
我也尝试过img.imageWithRenderingMode(UIImageRenderingMode.AlwaysOriginal)
,但这也无济于事。
知道如何解决这个问题吗?