Open dutchie027 opened 7 years ago
Hi. That's a good idea. The notification view itself wouldn't be the place to push a vc onto the stack. I'll throw in a delegate protocol that will ping the presenting view when the user taps. Give me a few mins and I'll push an update to git. Might take a while for me to get the cocoa pod updated.
OK, I just updated the repository. I'll update the CocoaPod when I have a few minutes tomorrow.
Add
The callback comes to the delegate method userDidTapMPC_NotificationView:
Let me know if you see any issues with it. Thanks a lot for the idea.
Looks great and works pretty good, but for some reason on XCode 9 it's throwing
Assigning to 'id
Its still calling the delegate and compiling, but not sure if the warning is something to heed or just another XCode error being thrown...
Good morning! Glad to hear it's doing what you want.
That warning you're seeing usually indicates that the calling class has not declared that it conforms to the delegate profile. Did you do the following? (I'll put both Objective C and Swift)
Objective-C:
@interface DashboardTableViewController ()
Swift: extension DashboardTableViewController: MPC_NotificationDelegate { func userDidTapMPC_NotificationView -- Deal with the method in your swift code here } }
Is it possible to override the instance allowing a tap or pan to trigger a segue to another VC in lieu of just dismissing? i.e. by default the tap/pan override would dismiss, but if you wanted to pass a VC as a 5th parameter to the instancetype it would segue to that VC on tap/pan?