简体   繁体   中英

UISegmentedControl works on iPhone but not iPad?

I use a UISegmentedControl, with 2 segments that spans the width of the screen. 在此处输入图片说明

This works as expected on iPhone. Tapping cat mode switches the highlight to cat mode, and the appropriate functions take place. However, on iPad, tapping Cat Mode does nothing. No highlight switch, no functions. If I start the highlight on Cat Mode, the same thing happens in reverse (all good on iPhone, Dog Mode can't be selected on iPad).

I use obviously one storyboard for both iPhone and iPad with Autolayout, and I'm not varying anything related to this segmented control for traits, so I have no clue what's going on. All other functions perform properly on iPhone and iPad.

Please let me know if I can provide additional info to help solve this question.

Thanks!

There was a Google Ad Banner blocking it. View debugger helped me see that. Thanks @matt for the suggestion to try it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM