Post

Replies

Boosts

Views

Activity

How to implement search controller on search view controller with side menu in appletvos
class SearchController: UISearchController { override func viewDidLoad() { super.viewDidLoad() } override func viewWillDisappear(_ animated: Bool) { let appDelegate = UIApplication.shared.delegate as! AppDelegate AppDelegate.searchFlag = true DispatchQueue.main.async(execute: { self.searchBar.text = "abc" }) } override func viewWillAppear(_ animated: Bool) { self.view.frame.origin.y = 400 self.view.frame.origin.x = 400 } } how to add this SearchController on search view controller because when use this code self.present(appDelegate.searchController, animated: true, completion: nil) it is showing full width screen
0
0
421
Nov ’23
tvos: change focused color of UIButton
How to change default white color of tvos swift UIButton focus selection? override func didUpdateFocus(in context: UIFocusUpdateContext, with coordinator: UIFocusAnimationCoordinator) { if let nextFocusedView = context.nextFocusedView { playAllOutlet.backgroundColor = UIColor.red shuffleBtnOutlet.backgroundColor = UIColor.green } if let previousFocusView = context.previouslyFocusedView { playAllOutlet.backgroundColor = UIColor.red shuffleBtnOutlet.backgroundColor = UIColor.green } } But background when button is focused is still white
1
1
1.1k
Nov ’23