ターゲットをセレクターに設定する方法を知りたいです。この電話をかけたい >>
sortedArray = [views sortedArrayUsingSelector:@selector(compareWithUnit:)];
問題は、私のcompareWithUnit
機能がLogUnit
クラスにあることです。LogUnit
classでセレクターを探すようにコンパイラーに指示するにはどうすればよいですか?
views
配列には (UIViewControllers) オブジェクトのみが含まれており、配列を結果LogUnit
で並べ替えたいと考えています。views
[LogUnit dayTime]
- (NSComparisonResult) compareWithUnit:(LogUnit*) unit;
{
return [[self dayTime] compare:[unit dayTime]];
}