开发者

Display Image using object (Iphone)

开发者 https://www.devze.com 2022-12-15 03:15 出处:网络
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 fo

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

精彩评论

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

关注公众号