Formatting string with %@ in Swift
You neglected to provide any details about the crash but one obvious problem is the use of the %@
format specifier with an Int
. You need to use %d
with Int
.
You need to replace %@ with %d. ImageCount is Int
value. so use %d instead of %@.
Format specifier:
%d - int Value
%f - float value
%ld - long value
%@ - string value and for many more.
For see all Format Specifiers see Apple Doc Format Specifiers