Call class method with argument from another class method

前端 未结 2 1195
耶瑟儿~
耶瑟儿~ 2021-01-23 11:21

In my code file MyItemVC.swift I have defined the following class and method:

class MyItemVC: UIViewController, UITextViewDelegate {

var timer          


        
2条回答
  •  迷失自我
    2021-01-23 11:37

    You need to use class function to be able to use it this way.

    class func cycleTimer(toggleOn: Bool) {
    

    However, I'm not sure about thread safety.

提交回复
热议问题