ios - Interpolate a double into a Swift string -


i trying create nspredicate format:

var apredicate = nspredicate(format: "latitude >= %d , latitude <= %d , longitude >= %d , longitude <= %d", latitudegreater, latitudelesser, longitudegreater, longitudelesser) 

the tutorial had been following using dates , used %@, , getting error because latitude >= nil wouldn't work. when realized needed different interpolation format, tried correct way use double, can't seem find information on this. %d have in code gives me latitude >= 0 0s rest. how go getting whole double go space?

per apple's string format specifiers,

%f | 64-bit floating-point number (double).

%d | signed 32-bit integer (int).


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -