我有一个使用一堆PNG文件的工作应用程序;它运行没有问题。我只是从iconfinder.com下载了两个图标,并且无法将它们加载到我的应用程序中。iphone uiimage not loading
这里是我的代码:
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
是,所有这三个文件在同一目录下。是因为我从互联网上下载了图标吗?我需要标记他们安全使用或什么?
在你的模拟器或iPhone上发生问题吗? – 2012-07-21 18:53:04