开发者

Display Image using object (Iphone)

Here is what I have:


 smallURL:(@"bundle://image.jpg")

this line will display me a picture store in the local path, no problem everything works fine. Now I'm using an object because the name for my开发者_Go百科 picture will be store in my database, so I want to use the line like that:


 smallURL:(@"bundle://%s", [visuel lpath])

My problem is "%s" its not working do I have to use %@, %i... can someone help me and explain all the diference..

Thanks,


  smallURL:([NSString stringWithFormat:@"bundle://%@", [visuel lpath]])


If lpath is of type NSString then you should use %@. It is used every time you need to convert a Cocoa object (or any other descendant of NSObject) into its string representation.

smallURL:(@"bundle://%@", [visuel lpath])
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜