2017-07-18 13 views

回答

0

由键..名字一样短阵....把钥匙上你想你的短阵

这会短你的阵列升序

NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"Your Key" ascending:YES selector:@selector(localizedStandardCompare:)]; 
NSArray *shortedArray=[Your array sortedArrayUsingDescriptors:[NSArray arrayWithObjects:descriptor,nil]]; 

这将缩短您的排列

NSSortDescriptor *descriptor = [[NSSortDescriptor alloc] initWithKey:@"Your Key" ascending:NO selector:@selector(localizedStandardCompare:)]; 
NSArray *shortedArray=[Your array sortedArrayUsingDescriptors:[NSArray arrayWithObjects:descriptor,nil]]; 
+0

是的,正确的一.. ..! –

1

我用DropDown我的项目,我们可以轻松地自定义这些DropDownCell(customCell)&外观了。

您可以能通过PODS与项目整合

荚“下拉菜单”

+0

感谢您的帮助,但我的项目是在目标c ...!其他解决方案? –

+0

你可以整合Swift到Obj-c.check这个链接https://stackoverflow.com/questions/24102104/how-to-import-swift-code-to-objective-c –

相关问题