当前位置:网站首页>Writing a new app with swift5 requires some considerations
Writing a new app with swift5 requires some considerations
2022-07-18 14:47:00 【_ Little hehe】
1. Expand left right top bottom
7.swift similar massory masmake
4. How to rewrite TextField() Method : Online Namely init Method
6 get set
var clickEvent:clickViewEvent? {
get {
} set {
}
8. similar pch Global access variables for
14 Single case
9.swift Interface , encapsulation
10 Class method
open class func
11 How to print
print Print any object
debugPrint
Swift.Result<Swift.Optional<Foundation.Data>, Alamofire.AFError>.success(Optional(129 bytes))
12.data turn json Mutual rotation
swift json analysis JSONSerialization_ Blog passing by the train -CSDN Blog _jsonserialization
let data:Data = response.data!
do {
let ok = try JSONSerialization.jsonObject(with: data, options: .mutableContainers) as AnyObject
let stautd :NSNumber = ok["status"] as! NSNumber
if stautd.stringValue != "200000" {
print(ok)
}
success(ok as AnyObject)
} catch {
}13 bounced
15 string Sentenced to empty string It's empty How to judge
17 NSDictionary How to write empty
var paramters: [String: Any]? = nil
16 how present A page
stay viewDidAppear instead of viewWillAppear
18 label
// Open now ,
let label = UILabel()
let attrString = NSMutableAttributedString(string: " Open now ,")
label.text = " Open now ,"
label.frame = CGRect(x: 14 * 2, y: 110 * 2, width: 159.5 * 2 , height: 23 * 2)
label.numberOfLines = 0
let attr: [NSAttributedString.Key : Any] = [.font: UIFont.systemFont(ofSize: 17 * 2),.foregroundColor: UIColor(red: 1, green: 1, blue: 1,alpha:1), ]
attrString.addAttributes(attr, range: NSRange(location: 0, length: attrString.length))
label.attributedText = attrString
contentScrollow.addSubview(label)
label.alpha = 1;
19 imageview
let backgimageView :UIImageView = UIImageView.init(image: UIImage.init(named: "bg_pic"))
backgimageView.frame = self.view.frame
backgimageView.isUserInteractionEnabled = true
backgimageView.masmakeS { (make) in
// make.left = 200
}
self.view.addSubview(backgimageView)
20 Shuffling figure jxBanner
21 Load network image Kingfisher
22 Receive network array
var imageSource:Array<Any> = []
self.imageSource = json["banners"] as! Array
Take the value of the array
var imageSource:Array< [String:String] > = []
let dict = self.imageSource[index]
let ss:String = dict["url"] ?? ""
边栏推荐
- 微机原理与技术接口 实验三 循环结构
- Compilation basis CTF
- Please ask a question: does the flinkcdc need root permission to synchronize MySQL data?
- xsslabs通关
- 用swift5 新写一个app需要用到需要考虑的
- [每周一更]-(第3期):Web开发安全注意事项
- Will IO always occupy CPU? A good question about concurrent / parallel systems (turn)
- UE adds two buttons on the resource right-click menu of editor
- Codeforces Global Round 21 C. Fishingprince Plays With Array
- ViewGroup事件分发梳理
猜你喜欢

我为 TDengine “带盐”!“高价”招募出镜开发者

分库分表和 NewSQL 到底怎么选?

如何用常数时间插入、删除和获取随机元素

Thinkphp5.1.37 deserialization chain analysis

Design of Bluetooth electronic scale system based on MCU (0493)

Fleet | "background exploration" issue 4: distributed transactions

Eureka中读写锁的奇思妙想,太顶了!

4-redis architecture design to usage scenario - redis request execution process

Codeforces Global Round 21 C. Fishingprince Plays With Array

The most points on a straight line
随机推荐
What if the self incrementing ID of online MySQL is exhausted?
Nc16857 [noi1999] birthday cake
xsslabs通关
Hal firmware library
Redis报错MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist...
Design of Bluetooth electronic scale system based on MCU (0493)
IDEA集成Gerrit插件
antd a-upload 多选multiple为ture时 限制上传个数
前 K 个高频元素问题
ArraysList和LinkedList的区别
Codeforces Round #803 (Div. 2) C. 3SUM Closure
Codeforces Round #805 A - G
408 day attendance linked list insertion sorting and double bubble sorting after class exercise code
Kotlin | launch build report for kotlin compiler task
XGBoostError: [10:19:14] C:\dev\libs\xgboost\src\objective\objective.cc:23:
Codeforces Round #803 (Div. 2) B. Rising Sand
Construction binaire kubernets
Network security experiment: firewall technology
Comparison and summary of five deep learning models for time series prediction: from simulated statistical model to unsupervised model that can be pre trained
如何用常数时间插入、删除和获取随机元素