Is there a constant for the maximum CGFloat value?

前端 未结 8 789
滥情空心
滥情空心 2021-02-02 05:09

I need to create a CGSize to compute text height of an arbitrary text with arbitrary length. UIKit has this nice method -sizeWithFont:constrainedToSize: and my text is only cons

8条回答
  •  长发绾君心
    2021-02-02 05:51

    CGSize size = CGSizeMake(CGFLOAT_MIN, CGFLOAT_MAX);
    

    width = 0.0000000000000000000000000000000000000117549435, height = 3.40282347E+38

提交回复
热议问题