【发布时间】:2015-04-24 10:58:58
【问题描述】:
我正在使用来自 Xcode 的 Instagram API,但我无法使用 \n 在文本中插入换行符。谁能帮我在 XCode 的 instagram 文本的标题/评论中添加新行?
NSString *repostText = [NSString stringWithFormat:@"#Repost %@ com #AppRepost.\r\n ・・・ \r\n", userNameStr];
【问题讨论】:
-
为什么是\r? \n 本身就足够了。
-
澄清您的问题。问题是什么?您期待什么结果?
-
我需要在 cmets Instagram 中添加断线。我把 \n 放到新行但不起作用。和 \r 如果等于 cr 但不再工作。
标签: ios objective-c string instagram-api format-string