This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Combine | |
extension Notification.Name { | |
static let newEvent = Notification.Name("new_event") | |
} | |
struct Event { | |
let title: String | |
let scheduledOn: Date |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let theEventTitleLabel = UILabel() | |
/* | |
let newEventLabelSubscriber = Subscribers.Assign(object: theEventTitleLabel, keyPath: \.text) | |
eventPublisher.subscribe(newEventLabelSubscriber) | |
*/ | |
eventPublisher.assign(to: \.text, on: theEventTitleLabel) // <-- [new code line] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Combine | |
import Foundation | |
import PlaygroundSupport | |
let subscription = Timer.publish(every: 1, on: .main, in: .common) | |
.autoconnect() | |
.sink { output in | |
print("finished stream with : \(output)") | |
} receiveValue: { value in | |
print("receive value: \(value)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Combine | |
import Foundation | |
import PlaygroundSupport | |
let subscription = Timer.publish(every: 1, on: .main, in: .common) | |
.autoconnect() | |
.print("data stream") | |
.sink { output in | |
print("finished stream with : \(output)") | |
} receiveValue: { value in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Combine | |
import Foundation | |
import PlaygroundSupport | |
var subscription: Cancellable? = Timer.publish(every: 1, on: .main, in: .common) | |
.autoconnect() | |
.print("data stream") | |
.sink { output in | |
print("finished stream with : \(output)") | |
} receiveValue: { value in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AgreementFormVC: UIViewController { | |
@Published var isNextEnabled: Bool = false | |
@IBOutlet private weak var acceptAgreementSwitch: UISwitch! | |
@IBOutlet private weak var nextButton: UIButton! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
$isNextEnabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AgreementFormVC: UIViewController { | |
@Published var isNextEnabled: Bool = false | |
private var switchSubscriber: AnyCancellable? | |
@IBOutlet private weak var acceptAgreementSwitch: UISwitch! | |
@IBOutlet private weak var nextButton: UIButton! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AgreementFormVC: UIViewController { | |
@Published var isNextEnabled: Bool = false | |
// private var switchSubscriber: AnyCancellable? | |
private var subscribers = Set<AnyCancellable>() // ← set of all subscriptions | |
@IBOutlet private weak var acceptAgreementSwitch: UISwitch! | |
@IBOutlet private weak var nextButton: UIButton! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basics": { | |
"name": "Minhaz Panara", | |
"label": "iOS Software Engineer at Proximity Works", | |
"picture": "", | |
"email": "minhaz.p@proximity.tech", | |
"phone": "+918460374441", | |
"website": "", | |
"summary": "10 years of experience as an iOS Software Development Engineer with diff domains like Fitness Tracking, FinTech, Health Monitoring, OTT platforms, Games, etc. \n\nI am currently working as a Senior Software Engineer - iOS at Proximity Works.", | |
"location": { |
OlderNewer