iOS 13 Swift Tutorial: Combine Framework - A Practical Introduction with UIKit

  Переглядів 64,613

Brian Advent

Brian Advent

День тому

Combine is a new framework by Apple introduced at WWDC 2019. You can use it for network responses, user interface events, and other types of asynchronous data. In this video you will get a practical introduction into Combine, understand how it works and how to use it together with UIKit.
🛒 GAME DEVELOPMENT COURSE - JUST $20 🛒
www.udemy.com/2d-games-with-s...
👏 Support me on Patreon: / brianadvent
➡️ Web: www.brianadvent.com
✉️ COMMENTS ✉️
If you have questions about the video or Cocoa programming, please comment below.

КОМЕНТАРІ: 60
@alimehmood8654
@alimehmood8654 8 місяців тому
still very helpful video in 2023
@dimiutube
@dimiutube 4 роки тому
Thanks for the very useful explanation. I've watched the video a few months ago and didn't understand the advantages of Combine. But now everything makes perfectly sense!
@Raptor-jv7fi
@Raptor-jv7fi 4 роки тому
I don’t even use UIKit and I understood it clearly. Awesome tutorial.
@jorgeantoniomr3526
@jorgeantoniomr3526 3 роки тому
Awesome introduction, you helped me a lot!! thanks!!!
@kelvinfok
@kelvinfok 4 роки тому
High quality video and high quality teaching! Thank you so much :)
@sebastiaanhols9103
@sebastiaanhols9103 Рік тому
This is phenomenally well explained 👌
@willasaskara
@willasaskara 3 роки тому
thanks! i was looking for this
@rogerpintot.c.1753
@rogerpintot.c.1753 3 роки тому
Super simple explanation! Really nice tutorial 👏
@roshanthapa25
@roshanthapa25 Рік тому
Awesome video for quick understanding.
@andrejkling3886
@andrejkling3886 3 роки тому
Thank you very much for Amazing lesson
@gogoqaz
@gogoqaz 4 роки тому
Great tutorial! good job
@followerOfJesus723
@followerOfJesus723 2 роки тому
I'm just now getting started with combine and reactive programming. This is a great way to get my feet wet. Thanks.
@ericcoleman2288
@ericcoleman2288 3 роки тому
Great explanation!
@pradeepkumar5359
@pradeepkumar5359 4 роки тому
Hi Brain Advent great video on combine framework where even apple docs are cumbersome about combine but you explained clearly about the necessity of framework. Can you do more videos on combine that includes debounce clasess.
@filipvabrousek6900
@filipvabrousek6900 3 роки тому
Thanks so much!
@guruitcompany
@guruitcompany 4 роки тому
Thank you 👍
@vipullal7689
@vipullal7689 3 роки тому
Great video! Thanks
@laxlyfters8695
@laxlyfters8695 4 роки тому
I have never put nutmeg into mashed potatoes. I will try it next time.
@arno.claude
@arno.claude 3 роки тому
Most important lesson learned from this video
@hollytian7576
@hollytian7576 3 роки тому
😂
@ccalderon9
@ccalderon9 3 роки тому
Came here for Combine. Stayed for the cooking tips.
@GetSwifty
@GetSwifty 3 роки тому
Super decent tutorial with plenty of graphics.
@yagniksuthar8740
@yagniksuthar8740 2 роки тому
you making such a great video can you make it more for combine framework.
@jasondhindsa6774
@jasondhindsa6774 3 роки тому
Excellent example! A bit confusing though! I thought Subscribers had to be reference types.
@Mar444_
@Mar444_ 3 роки тому
Update for the sink modifier: add receive completion parameter if compiler is showing error ---> "Referencing instance method 'sink(receiveValue:)' on 'Publisher' requires the types" 👌🏾 .sink(receiveCompletion: { _ in print("process complete") }, receiveValue: { value in print("A summer day of \(value) Celcius") })
@wongacid
@wongacid 3 роки тому
Thanks Man, finally it works after i add receivecompletion
@mattlarsen
@mattlarsen 3 роки тому
Trial-and-error showed the original code worked by changing let weatherPublisher = PassthroughSubject() into let weatherPublisher = PassthroughSubject() but I'm not wise enough to know if this is a good idea.
@TanTran-fe7rf
@TanTran-fe7rf 3 роки тому
Could you share me this slide, Brian? Thanks a lot
@setoelkahfi
@setoelkahfi 2 роки тому
Can you please add space after the variable name?
@waseemasif100
@waseemasif100 2 роки тому
very good video.I guess tutorials should be that simple and concise as you have used UIKit for your demo.Create other videos with UIKit as most of developers not switched to SwiftUI
@HarshitKumar-yn8du
@HarshitKumar-yn8du 2 роки тому
Thanks Brian, where can I get source code?
@BroNo3man
@BroNo3man 4 роки тому
Thank you for this tutorial. But : are you sure a publisher can have only one subscriber ? Cuz i tested with multiple subscribers and it seams working fine. with both sink and assign.
@MrMcSwiftface
@MrMcSwiftface 4 роки тому
Yeah I thought that too!
@Aiiboo
@Aiiboo 4 роки тому
How I can import SwiftUI in SceneKit/SpriteKit? Like a collectionView as SwiftUI
@jbee1263
@jbee1263 4 роки тому
Lemme ask maybe a kinda odd question. Why would you do this? When you could simply do sendButton.isEnabled.toggle() in the IBAction of the switch. I understand your demonstrating Combine. I get that. And maybe that is the answer, but. Beyond that, and making this a bit more real. What is the benefit of it in this case. Over doing just the one line of toggle?
@jackshephard7920
@jackshephard7920 4 роки тому
I think it's just a matter of programming style. Using combine is some kinda of declarative, however, your style is imperative.
@trentguillory9808
@trentguillory9808 4 роки тому
I too was asking myself the same question. For such a simple use-case, you wouldn't normally do this. This form of declarative programming is only useful if you know you're working on a view that has several states defined by more than one input. In that case, Combine would be great - it'd figure out how to render your view rather than you having to trust your own brain capacity to account for each case.
@chooseyourfuturebeforeitch7453
@chooseyourfuturebeforeitch7453 3 роки тому
Have problems following your code Referencing instance method 'sink(receiveValue:)' on 'Publisher' requires the types 'Publishers.Filter.Failure' (aka 'WeatherError') and 'Never' be equivalent
@mattlarsen
@mattlarsen 3 роки тому
I saw this same error on my code when I ran it and changed it to the alternate: let weatherPublisher = PassThroughSubject() ...which worked, but see comments below for a better solution.
@developerdiaries5926
@developerdiaries5926 3 роки тому
Nice, but this is something we could have done with a property observer and Notification Center observer. Is it just because the task demonstrated here was too simple to warrant the Combine framework, or is there more to it than just this?
@w0mblemania
@w0mblemania 3 роки тому
It was just an example. Combine shows its power when you need to use operators and different types of subscribers to, well, "combine" streams. e.g. setting a Label based on many different, asynchronous inputs. Such as in a Login screen, or as a result of multiple network operations.
@AliMohamed-jg6bv
@AliMohamed-jg6bv 4 роки тому
Dear friend, i need to know how to make Xcode accept more than 10 toggles per page, as when i want to add more than 10 toggle it won't allow? i need also to know how to make toggle label clickable and shows a pop up window to write inside it, is that possible ?
@trentguillory9808
@trentguillory9808 4 роки тому
I'm sure you've found an answer within the last 8 months, but a SwiftUI view only allows a max of 10 subviews. You can use Group {} to get around that. With 10 Groups of 10 Toggles each, you could easily have 100 toggles in a page.
@igor1309
@igor1309 4 роки тому
Hi Brian! What is messageLabel??
@shadykahaleh9377
@shadykahaleh9377 3 роки тому
UILabel
@rondamon4408
@rondamon4408 4 роки тому
IT seems that RxSwft will be deprecated soon with this Combine framework.
@w0mblemania
@w0mblemania 3 роки тому
A lot of companies still require iOS 12, and will do so for a few more years. For that, they need RxSwift. But yes, for greenfield projects, Combine is the way to go.
@drct
@drct 4 роки тому
Xcode 11 beta 7: .sink is only available when Failure is Never
@ZhouHaibo
@ZhouHaibo 4 роки тому
@DRCT, that error means that the 1st closure in Sink(receiveCompletion:) is not implemented.
@vamsi3877
@vamsi3877 4 роки тому
👌👌👌
@nicolasklarsfeld
@nicolasklarsfeld 3 роки тому
example with uikit begin at 11:40
@glych002
@glych002 3 роки тому
The way you did it is poor, because you would have to create a message publisher for each property on the message object.
@w0mblemania
@w0mblemania 3 роки тому
Do you have a video showing how to do it better?
@GoeHybrid
@GoeHybrid Рік тому
Really hard to follow after you switched to the actual project.
@iambenmitchell
@iambenmitchell 4 роки тому
Nutmeg in mashed potatoes? Thats new. Could you check your emails :)
@patrickclaessens9418
@patrickclaessens9418 4 роки тому
That's not new at all :-)
@user-pk3ti4es9k
@user-pk3ti4es9k 4 роки тому
Apparently no one knows how to create a list with dynamic sections And delete rows functionality. Like a list of employees sectioned by departments and still can delete rows!! Can you?!
@omgawdhax
@omgawdhax 4 роки тому
If I recall correctly, Apple showed something like that in Diffable Data Sources session. You should check that out. That doesn't use Combine though.
@w0mblemania
@w0mblemania 3 роки тому
The question is irrelevant to the video. It's just an attempt to grab free tech help.
@davidpaul3425
@davidpaul3425 3 роки тому
Thanks for the tutorial. 18:55 hope we can unsubscribe later!
How to use Lazy in Swift
9:56
Sean Allen
Переглядів 38 тис.
iOS Swift Tutorial: GraphQL with Apollo, Xcode 12 & SwiftUI
16:14
Brian Advent
Переглядів 23 тис.
You might not need useEffect() ...
21:45
Academind
Переглядів 121 тис.
Big Tech AI Is A Lie
16:56
Tina Huang
Переглядів 39 тис.
iOS 13 Swift Tutorial: SwiftUI and Core Data - Build a To-Do List App
27:36
24 Xcode Tips in 15 Minutes
15:30
Paul Hudson
Переглядів 72 тис.
Advanced Coordinators in iOS
18:55
Paul Hudson
Переглядів 40 тис.
5 Steps to Better SwiftUI Views
31:19
Paul Hudson
Переглядів 54 тис.
MVVM vs. MVI - Understand the Difference Once and for All
18:40
Philipp Lackner
Переглядів 21 тис.
Swift Framework - Create a Custom Framework in iOS
15:50
Rebeloper - Rebel Developer
Переглядів 21 тис.
The Only .NET Scheduler You Should Be Using!
16:38
Nick Chapsas
Переглядів 9 тис.
Swift - Result Type - Cleaner Network Calls
12:07
Sean Allen
Переглядів 19 тис.
14,000 Domino pieces Fail!
0:12
VIP MOTORS
Переглядів 43 млн
Wer ist euer Vorbild?
0:13
felinesammy
Переглядів 22 млн
На одной волне
0:54
Pavlov_family_
Переглядів 3,6 млн
ОБВЕШИВАЕТ покупателей на РЫНКЕ 😱 #shorts
1:00
Лаборатория Разрушителя
Переглядів 8 млн
Когда папа - ТРЕНЕР!😃 inst: psawkin
1:00
Petr Savkin
Переглядів 1,3 млн
Наступ чи відступ???!!! Така ціна договору??
9:51
Яна Пасинкова
Переглядів 184 тис.