gpt4 book ai didi

ios - 是否可能 MARK : (#pragma mark) in Localizable. 字符串文件

转载 作者:搜寻专家 更新时间:2023-11-01 06:28:50 26 4
gpt4 key购买 nike

Pragma 标记在 Localizable.strings 文件中不起作用。如果我在 Localizable.strings 中添加第二个 MARK: (#pragma mark),xcode 会出现编译时错误

error: read failed: The data couldn’t be read because it isn’t in the correct format.

见下图,当我添加第一个 pragma mark //MARK: MENU ITEMS 时,它没有显示任何错误。但是当我添加第二个标记时 //MARK: EMAIL SETTINGS 它显示了上述错误。

enter image description here

我的意图很简单,Localizable.strings 应该像下面这样组织有序。

enter image description here

This SO post没有清除我的疑问,也没有得到详细的解释,而且它也太旧了。因此,如果有人遇到过这种情况,请给出您的答案/建议。

最佳答案

是的,这是可能的。

您缺少一些必需的分号。我想它在幕后用于字符串终止或类似...

https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/LoadingResources/Strings/Strings.html

关于ios - 是否可能 MARK : (#pragma mark) in Localizable. 字符串文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50062604/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com