Objective-C 中的 %@ 和 %ld 是什么意思?

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

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

%@%ld 是什么意思?

%@ 用于打印和格式化 Objective-c 个对象的格式说明符。

%ld 用于无符号 64 位整数。即NSInteger.

它们是格式说明符。基本上,其余参数的插入点为 stringWithFormat.

https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/Strings/Articles/formatSpecifiers.html