How to use compare on a version number where theres less parts in one number in Objective-C?

前端 未结 9 687
感情败类
感情败类 2021-01-22 02:30

I\'ve found the following code at http://snipplr.com/view/2771

Which is pretty good, almost exactly what I was looking for, but if I use the values @\"1.4.5\", @

9条回答
  •  独厮守ぢ
    2021-01-22 02:51

    it's simple with VersionComparator Class

    https://github.com/danhanly/VersionComparator

    BOOL greater = [VersionComparator isVersion:@"2.0.0" greaterThanVersion:@"1.1.0"];

提交回复
热议问题