Initialize NSArray with floats?

后端 未结 7 1686
情歌与酒
情歌与酒 2021-02-12 20:05

Is this a valid way to initalize an NSArray with float objects?

NSArray *fatArray = [NSArray arrayWithObjects:
                    [NSNumber numberWithFloat:6.9]         


        
7条回答
  •  鱼传尺愫
    2021-02-12 20:50

    As far as I know, this is a perfectly valid way of putting floats in an NSArray.

提交回复
热议问题