We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lazy
lazy属性
lazy属性就是初始值直到第一次使用的时候才执行计算的属性 注意:lazy属性必须是变量(var修饰符),因为常量属性(let修饰符)必须在初始化之前就有值,所以常量属性不能定义为lazy。
var修饰符
延迟加载主要有以下两个使用的场景:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
lazy
修饰符,lazy属性
lazy
方法, 集合的一个方法延迟加载主要有以下两个使用的场景:
The text was updated successfully, but these errors were encountered: