【发布时间】:2014-01-19 15:14:35
【问题描述】:
大家好,在 StackOverflow
我的图片无法显示在 SpringBoard 上
在我的 Tweak.xm SpringBoard 中,我的 UILabel 出现了,但我的 UIImage 不会出现...
对于 UIImage 我尝试关注这个问题UIImage may not respond to imageWithContentsofFile
但我不知道答案中的imageWithContents**Of**File 是什么意思,所以我仍然坚持使用这段代码:
[basePic setImage:[UIImage imageWithContentsOfFile:@"layout/private/var/stash/subject4stw/weatherspring/pic.png"]];
basePic.frame = CGRectMake(21.0,0.0,320.0,98.0);
[self.viewThing addSubview:basePic];
[basePic release];
有人可以帮我解决这个问题吗?
另外theos在编译时没有给出任何警告或错误,它编译并运行成功
我试过了
NSLog(@"%@",[UIImage imageWithContentsOfFile:@"/private/var/stash/subject4stw/weatherspring/pic.png"]);
我得到了输出,但是当我尝试让它出现在我的 SpringBoard 上时,它只是保持空白
【问题讨论】:
-
你试过[basePic setImage:[UIImage imageWithContentsOfFile:@"pic.png']吗?
-
NSLog(@"%@",[UIImage imageWithConentsOfFile:@"layout/private/var/stash/subject4stw/weatherspring/pic.png"]);这是什么意思? -
在链接的答案中,
imageWithContents**Of**File强调大写O与小写o,这不是您的代码存在的问题。 -
@nhgrif 感谢您的回答和呃...我应该在哪里看到输出?我试过 deviceconsole 但找不到它。
-
@santhu 这是一个调整,所以我必须保留那种类型的目录树
标签: ios objective-c uiimage theos cydia-substrate