当前位置:网站首页>Keep learning swift
Keep learning swift
2022-07-03 12:34:00 【iWillook】
//
// main.swift
// Ultimate
//
// Created by Mewlan Musajan on 3/6/21.
//
import Foundation
@propertyWrapper
struct TwelveOrLess {
private var number: Int
init() {
self.number = 0
}
var wrappedValue: Int {
get {
number
}
set {
number = min(newValue, 12)
}
}
}
struct SmallRectangle {
@TwelveOrLess var height: Int
@TwelveOrLess var width: Int
}
var rectangle = SmallRectangle()
print(rectangle.width)
rectangle.height = 10
print(rectangle.height)
rectangle.width = 24
print(rectangle.width)
边栏推荐
- JVM memory model
- 2020-11_ Technical experience set
- 实现验证码验证
- (construction notes) grasp learning experience
- How to deploy web pages to Alibaba cloud
- Self made pop-up input box, input text, and click to complete the event.
- regular expression
- GCN thinking - word2vec directly calculates text classification
- 【附下载】密码获取工具LaZagne安装及使用
- C language improvement article (wchar_t) character type
猜你喜欢

LeetCode 0556. Next bigger element III - end of step 4

The future of cloud computing cloud native

With pictures and texts, summarize the basic review of C language in detail, so that all kinds of knowledge points are clear at a glance?

Cloud Computing future - native Cloud

4000 word super detailed pointer

雲計算未來 — 雲原生

剑指Offer03. 数组中重复的数字【简单】

TOGAF认证自学宝典V2.0

Wechat applet - basic content

剑指Offer10- I. 斐波那契数列
随机推荐
RedHat5 安装Socket5代理服务器
wpa_ cli
Wechat applet development - page Jump transfer parameters
257. All paths of binary tree
剑指Offer09. 用两个栈实现队列
2020-11_ Technical experience set
Sword finger offer07 Rebuild binary tree
Flutter: about monitoring on flutter applications
Official website of Unicode query
实现验证码验证
Swift5.7 扩展 some 到泛型参数
Dart: view the dill compiled code file
Apprendre à concevoir des entités logicielles réutilisables à partir de la classe, de l'API et du cadre
Dart: About zone
Recovery of website address and method of Amazon account login two-step verification failure caused by mobile phone number becoming empty
剑指Offer06. 从尾到头打印链表
QT OpenGL texture map
Slf4j log facade
node的ORM使用-Sequelize
elastic_ L04_ introduction. md