ming1016's recent timeline updates
ming1016

ming1016

一个人走得快,一群人走的远
V2EX member #652, joined on 2010-07-19 12:12:09 +08:00
极客时间《iOS开发高手课》和纸书《跟戴铭学iOS编程》作者。个人博客:戴铭的博客。微信公共号:starming-weixin。微博:@戴铭
Per ming1016's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
ming1016's recent replies
Sep 19, 2024
Replied to a topic by James369 iDev 还有没有必要学习 SwiftUI?
声明式写页面,数据流驱动,简化了很多。从前端转 OC 再转 SwiftUI ,感觉是个轮回。
现在可以直接下载 dmg 了
@mrbruce516 社区 @powenn 做了 Github action workflow 编译,无需在本地操作、也无需开启 Xcode 设置个人开发帐号就可以生成应用了
@mrbruce516 会有,已在 todo 里
SwiftUI+(Combine or Concurrency),视图和业务逻辑可以和 iOS 还有 iPad 共享
@EvanLuo42 +1 SwiftUI 要 Star 下
@xtinput
Dec 8, 2021
Replied to a topic by Livid Swift Alamofire 和 URLSession 的一个对比例子
可以搭配着 Combine 来用,assign 给 ViewModel 的数据属性和 SwiftUI 绑定在一起,响应式交互。
```swift
URLSession.shared.dataTaskPublisher(for: req)
.map { data, res in
print(String(decoding: data, as: UTF8.self))
return data
}
.mapError { _ in
APISevError.resError
}
.decode(type: Request.Res.self, decoder: de)
.mapError(APISevError.parseError)
.receive(on: RunLoop.main)
.eraseToAnyPublisher()
```
绑定部分代码
```swift
repStream = resSubject
.map {
$0.items
}
.assign(to: \.repos, on: self)
```
感谢 @victor 和 @xuyuanme 我用你们的方法找到了。
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1052 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 19ms · UTC 22:46 · PVG 06:46 · LAX 15:46 · JFK 18:46
♥ Do have faith in what you're doing.