Monday 27 March 2017

Re call function for every 5sec in iOS swift 3




override func viewDidLoad() {
        super.viewDidLoad()
var timer = Timer.scheduledTimer(timeInterval: 5, target: self, selector: #selector(self.getdata) , userInfo: nil, repeats: true);
}


    func getdata()
    {

//this function calls for every 5 seconds 

}

No comments:

Post a Comment

Remove bottom line in navigation bar

navigationController ?. navigationBar . setBackgroundImage ( UIImage (), for: . any , barMetrics: . default )          navigat...