我打算用下面的代码行:localizedCaseInsensitiveCompare和caseInsensitiveCompare:有什么区别?
[[NSSortDescriptor alloc] initWithKey:@"title" ascending:YES selector:@selector(caseInsensitiveCompare:)];
“caseInsensitiveCompare”是,我已经习惯了使用上的字符串的方法。但是,所示的例子,我是从应用工作:
[[NSSortDescriptor alloc] initWithKey:@"title" ascending:YES selector:@selector(localizedCaseInsensitiveCompare:)];
(区别在于本地化的词)。这个词有什么作用 - '本地化'方法与普通方法有什么不同?
Apple开发人员文档对于这两种方法的区别并不十分丰富。
这只是一个定位法(也就是说,如果您的应用程序有多种语言,你应该使用它)。 – Emil 2012-01-08 10:37:22