Is it Possible MARK: (#pragma mark) in Localizable.string file

ぃ、小莉子 提交于 2019-12-13 00:24:19

问题


Pragma mark not working in Localizable.strings file. If I add second MARK: (#pragma mark) in Localizable.strings, xcode rise compile time error

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

See below Image, When I was added the first pragma mark // MARK: MENU ITEMS, it didn't show any error. But when I add the second mark // MARK: EMAIL SETTINGS it shows the above error.

My intention is simple, Localizable.strings should be in organized ordered like below.

This SO post didn't clear my doubt and not get detail explanation and it's too old too. So if anyone experienced this, please give your answers/suggestion.


回答1:


Yes, it's possible.

You're missing a few required semi-colons. I guess it is used for string-termination or similar under the hood...

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



来源:https://stackoverflow.com/questions/50062604/is-it-possible-mark-pragma-mark-in-localizable-string-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!