Picker text wrapping

I have written an app where the user can select a golf course from a picker list. In the simulator the list of courses is displayed as expected with one course name per line however when I run the app on my phone the course names are being wrapped onto a second line. e.g.

simulator Collier Park Lakes Pines

iPhone Collier Park Lakes Pines

I'm new to app development so I apologise if the answer is obvious but how can I get the iPhone behaviour to be the same as the simulator (iPhone 17 Pro Max in both cases).

Thanks in advance for any suggestions. XCODE 26

Could you show the code where you populate the picker ? And screenshots ?

Maybe you have to set the cell explicitly as here:

 func pickerView(pickerView: UIPickerView, viewForRow row: Int, forComponent component: Int, reusingView view: UIView!) -> UIView {
    var label : UILabel
    if view == nil {
        label = UILabel(frame: CGRect(x: 0, y: 0, width: 0, height: UIFont.systemFontOfSize(UIFont.systemFontSize()).lineHeight * 2 * UIScreen.mainScreen().scale))
        label.textAlignment = NSTextAlignment.Center
        label.numberOfLines = 2  // For you should be 1
        label.lineBreakMode = NSLineBreakMode.ByWordWrapping
        label.autoresizingMask = UIViewAutoresizing.FlexibleWidth
    } else {
        label = view as UILabel
    }
    label.text = line1 + "\n" + line2
    return label;
}

Get details here: https://stackoverflow.com/questions/1865002/uipickerview-with-multiline-uilabel

Hello @AdrianSim

Yes, please share your code here as well as in a feedback report filed through Feedback Assistant. Once you file the report reply with the feedback number here, so I can share that report with the relevant engineering team.

Some things worth investigating:

iOS provides a wide range of text sizes for the user to select from. When using default text styles, your app will automatically respond to the user's preferred text size.

Confirm that your physical device has the same settings in Settings > Accessibility > Display & Text Size on both devices.

I'm also curious if the physical device has the same Language and Region settings located in General > Location & Region, which could also have an effect here.

For more information see Typography and Font.

 Travis

Picker text wrapping
 
 
Q