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])
精彩评论