Reputation: 2406
I am developing for tvOS at the moment and I have added a UISegmentedControl
, this gets focused automatically by the tvOS focus engine. When I added a UIButton
, this became the first focused item.
How I do go about setting the first focused item and being able to navigate between them?
Upvotes: 1
Views: 276
Reputation: 13333
Add a read only preferredFocusedView
property to your view controller that returns the view you would like to start focused:
override weak var preferredFocusedView: UIView? {
get {
return segmentedControl
}
}
Upvotes: 2