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 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])
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.