What do %@ and %ld mean in Objective-C?

| | August 5, 2015

NSString *expectedURL = [NSString stringWithFormat:@"https://%@:%ld/%@"];

What do the %@ and %ld mean?

2 Responses to “What do %@ and %ld mean in Objective-C?”

  1. %@ format specifier used for printing and formatting Objective-c Objects.

    %ld used for Unsigned 64-bit integer .i.e. NSInteger.

  2. They are format specifiers. Basically, insertion points for the rest of the parameters to stringWithFormat.


Leave a Reply