SkillAgentSearch skills...

DWLogUnicode

处理在Objective-C中,NSArray、DSDictionary、NSSet在打印日志的时候对于Unicode编码不能正常显示中文的问题。

Install / Use

/learn @dev-wqq/DWLogUnicode
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

为了方便在Xcode控制台打印log,处理了NSArray、NSDictionary、NSSet在控制打印出来的是中文是Unicode的问题,这里使用的是Method swizzling 改变一个已经存在的 selector 的实现。这项技术使得在运行时通过改变 selector 在类的消息分发列表中的映射从而改变方法的掉用成为可能。

参考: http://stackoverflow.com/questions/21436956/objc-ios-how-to-retrieve-unicode-hex-code-for-character http://stackoverflow.com/questions/34542316/does-method-load-need-to-call-super-load

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated5y ago
Forks0

Languages

Objective-C

Security Score

55/100

Audited on Mar 29, 2021

No findings