How many maximum number of components can be there

2019-09-16 11:49发布

问题:

I was just wondering, how many components can be added to a UIPickerView?

回答1:

Technically, NSObject inherited objects can hold up to NSUIntegerMax objects (this is the largest value that can be returned from count). On a 32-bit system like the iPhone, that is a little over 4 billion. On a 64-bit system like most Macs/iPhone5S, it is many orders of magnitude higher.

I suspect you will run out of RAM before you hit this CS limit.