A small explanation about what I have:
I have a UIPickerView with more than one component (column), and all the components are filled with INTEGER_MAX rows, in order to give that "infinite loop" aspect. The content of each component comes from the NSArray of strings for that specific component. The strings (words) have different sizes, and some were being truncated (for example, "Imagination" became "Imaginat...", while "Smart" stays the same). In every row in every component, I'm using a UILabel to show the text, and I'm using
tLabel.textAlignment = NSTextAlignmentCenter;
tView.adjustsFontSizeToFitWidth = YES;
to make sure that the text fits and is aligned.
A small explanation about what I need:
I need to make all the labels (INTEGER_MAX * nr_of_components) have the same textsize. However, until the picker is populated with the labels auto-resizing the text, I can't tell which one is the smallest font.size in there.
A small explanation about what I was thinking and haven't been able to achieve:
I considered loading the picker as it was explained before, and then scan the first [arrayX count] rows to find the minimum needed fontsize for that component, then compare it against the other components, until the 'absolute' minimum fontsize needed was discovered. After that, it would be required to access ALL the labels on ALL the components and change the font.size to the one indicated as the smallest one needed.
This should be done dynamically because it won't be known if the app is being ran on an iPhone, iPod or iPad.
Well, any help is quite welcome. Thanks in advance!