Ios UIAlertAction处理程序是非转义的?
我只想确认UIAlertAction的处理程序是一个非转义lambda函数 我在按住ctrl键的同时单击鼠标右键并查找UIAlertAction定义,默认情况下它看起来不像是转义。这意味着我应该这么做Ios UIAlertAction处理程序是非转义的?,ios,swift,lambda,uialertaction,Ios,Swift,Lambda,Uialertaction,我只想确认UIAlertAction的处理程序是一个非转义lambda函数 我在按住ctrl键的同时单击鼠标右键并查找UIAlertAction定义,默认情况下它看起来不像是转义。这意味着我应该这么做 weak var wself = self 在所有UIAlertAction完成块中使用wself而不是self 在UIKit>UIAlertController下,我看到了 open class UIAlertAction : NSObject, NSCopying { public c
weak var wself = self
在所有UIAlertAction完成块中使用wself而不是self
在UIKit>UIAlertController下,我看到了
open class UIAlertAction : NSObject, NSCopying {
public convenience init(title: String?, style: UIAlertAction.Style, handler: ((UIAlertAction) -> Void)? = nil)
其中处理程序未显示@escapingUIAlertAction处理程序为escaping
因为可选闭包都是隐式转义的(多亏了@sweeper)它是一个转义闭包。我不知道为什么你不能从定义上看出来。可能是因为它来自Objective-C。可选闭包都隐式转义。见“谢谢你”清扫者。如果你想把这个作为答案,我会接受的。