UIButton setTitle:forState:UIControlStateSelected | UIControlStateFocused is not respected
| Originator: | chrispan.fb | ||
| Number: | rdar://23512892 | Date Originated: | 11/11/2015 |
| Status: | Open | Resolved: | |
| Product: | tvOS SDK | Product Version: | |
| Classification: | UI | Reproducible: | Always |
Summary: Using the combination (UIControlStateSelected | UIControlStateFocused) for setting a UIButton title does not work as expected. Steps to Reproduce: 1. Create a UIButton b and send it the following messages: b.selected = YES; [b setTitle:@"normal" forState:UIControlStateNormal]; [b setTitle:@"onlyselected" forState:UIControlStateSelected]; [b setTitle:@"selected+focused" forState:UIControlStateSelected | UIControlStateFocused]; 2. Run the app. Button title is "onlyselected". Put focus on the button. Title is "normal". Expected Results: Expected title to be "selected+focused" when button has focus Actual Results: button title is "onlyselected" Version: Xcode 7.1.1 Notes: If you add [b setTitle:@"onlyfocused" forState:UIControlStateFocused]; then the correct "selected+focused" title is used; however if you later set selected = NO; it still uses "selected+focused" for the title when it should be "onlyfocused". Configuration: Xcode 7.1.1 apple tv simulator and apple tv device on tvOS 9.0
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!