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
Post a Comment