- 6
- 4 561
ShowMe
เข้าร่วมเมื่อ 2 พ.ย. 2021
วีดีโอ
XCode Swift how to use a timer when the application in running
มุมมอง 813 ปีที่แล้ว
import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() statusTimer() } func statusTimer(){ Timer.scheduledTimer(timeInterval: 2, target: self, selector: #selector(myTimer), userInfo: nil, repeats: true) } @objc func myTimer(){ let date = Date() let dateFormatter = DateFormatter() dateFormatter.dateFormat = "dd/MM/yyyy mm:hh:ss" print(dateFormatte...
XCode Swift How to get GPS location data even when the app is running the background
มุมมอง 3.7K3 ปีที่แล้ว
//Add Background Modes //NSLocationWhenInUseUsageDescription //NSLocationAlwaysAndWhenInUseUsageDescription import UIKit import CoreLocation class ViewController: UIViewController, CLLocationManagerDelegate{ private var locationManager:CLLocationManager? override func viewDidLoad() { super.viewDidLoad() getUserLocation() } func getUserLocation() { locationManager = CLLocationManager() locationM...
XCode Swift Navigate from one Story board to another One view to another view
มุมมอง 273 ปีที่แล้ว
Code as shown in the video let storyboard = UIStoryboard(name: "SecondView", bundle: nil) let vc = storyboard.instantiateViewController(withIdentifier: "SecondView") as UIViewController vc.modalPresentationStyle = .fullScreen present(vc, animated: true, completion: nil)
XCode Swift Do something upon button Onclick
มุมมอง 4893 ปีที่แล้ว
Link a button click to some code in XCode
thanks a lot.... well explained
i dont have the view controller tab, how do i find that?
hi men, you are the best
передам, виталя