Initialize NSArray with floats?

后端 未结 7 2118
你的背包
你的背包 2021-02-12 19:54

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:42

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

提交回复
热议问题