WeakTimer
@available(watchOS 3.0, tvOS 10.0, macOS 10.12, iOS 10.0, *)
public class WeakTimer
Convenience wrapper around Timer that auto-invalidates when the parent is released. (Providing you don’t capture the parent in the block!)
-
Undocumented
Declaration
Swift
public class func scheduledTimer(withTimeInterval interval: TimeInterval, repeats: Bool, block: @escaping (Timer) -> Void) -> WeakTimer