To add a scene delegate, first, create a new Swift file that you’ll call "SceneDelegate" containing a subclass of UIResponder, just like the AppDelegate, and that conforms to UIWindowSceneDelegate. As your app might supports other versions than iOS 13, make this class only available for iOS 13. This is what you should have : If you are working a project that is storyboard based, please set storyboard initial view controller SceneDelegate.swift import UIKit @available ( iOS 13.0 , *) class SceneDelegate : UIResponder , UIWindowSceneDelegate { var window : UIWindow ? func scene ( _ scene: UIScene , willConnectTo session: UISceneSession , options connectionOptions: UIScene . ConnectionOptions ) { let storyboard = UIStoryboard (name: "Main" , bundle: nil ) let initialViewController = storyboard. instantiateViewController (withIdentifier: "ViewController" ) let mainNavigationController = UINavigationControlle
Show and hide a tableView on button click
ReplyDelete@IBAction func PressRefine(sender: AnyObject) {
if sportTableView.hidden {
sportTableView.hidden = false
} else {
sportTableView.hidden = true
}
}
or
@IBAction func PressRefine(sender: AnyObject) {
sportTableView.hidden = !sportTableView.hidden
}
very good
ReplyDelete