-2
public class OfferObjectModel: JSONJoy {
let rank : Int?
}
offersList.sort(by: { $0.rank < $1.rank }) -->Binary operator '<' cannot be applied to two 'Int?' operands
offersList is an array of OfferObjectModel
オプションを処理します。 – vadian
オプションを処理した後に動作しませんでした。 –
[swift - オブジェクトの配列を強制的なアンラッピングなしでオプションのブール値プロパティで並べ替えることができます](https://stackoverflow.com/questions/39059248/swift-sort-an-array-of-objects-by-their- optional-boolean-property-without-forc) –