I am new to ios,I wanted to broadcast some action in ios we have notification center using this I can post and receive in specific controller but my requirement is in Android we have broadcast receiver similarly I want to create custom notification center in ios if I send some action first it receives then it open specific view controller.I created custom notification center but it is not triggering.
code:
NotificationCenter.default.post(name: Notification.Name(rawValue: "key"), object: nil)
class MainReceiver: NotificationCenter
{
override func post(name aName: NSNotification.Name, object anObject: Any?)
{
print("coming here")
}
}