我有一个使用一堆 PNG 文件的工作应用程序;它运行没有问题。我刚刚从 iconfinder.com 下载了另外两个图标,但无法将它们加载到我的应用程序中。
这是我的代码:
showKeyboardImage = [UIImage imageNamed:@"Bonjour.png"];
printf("Bonjour %p %g %g\n", showKeyboardImage, showKeyboardImage.size.width, showKeyboardImage.size.height);
// http://www.iconfinder.com/icondetails/36137/32/add_keyboard_icon
showKeyboardImage = [UIImage imageNamed:@"1342878368_keyboard_add.png"];
printf("showKeyboardImage %p %g %g\n", showKeyboardImage, showKeyboardImage.size.width, showKeyboardImage.size.height);
// http://www.iconfinder.com/icondetails/36138/32/delete_keyboard_icon
hideKeyboardImage = [UIImage imageNamed:@"1342878356_keyboard_delete.png"];
printf("hideKeyboardImage %p %g %g\n", hideKeyboardImage, hideKeyboardImage.size.width, hideKeyboardImage.size.height);
这是输出:
Bonjour 0xbd33f70 32 32
showKeyboardImage 0x0 0 0
hideKeyboardImage 0x0 0 0
是的,所有三个文件都在同一个目录中。是不是因为我从网上下载了这些图标?我需要将它们标记为可以安全使用吗?