2017-07-18 14 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 –

相關問題