-1

NSNotificationCenter in swift 4.0? What needs to be set for a label to appear when dragging?

As shown in the picture two?

Pic 1

Pic 2

Roman
  • 29
  • 4
  • The solution -> Swift 4+ code: class GameViewController: UIViewController { } override func preferredScreenEdgesDeferringSystemGestures() -> UIRectEdge { return .all } https://stackoverflow.com/questions/19306449/is-it-possible-to-disable-control-center-in-ios-7-programmatically-and-if-not-w/46910913#46910913 – Roman Jul 29 '18 at 07:59

1 Answers1

0

For adding custom content UI to your notifications (both local and remote), you need to use Notification Content Extension.

With Notification Content Extension, you can add whatever custom interface you want to add to the notifications.

The custom UI appears on expanding the notification in the notification center.

This feature is available from iOS-10

https://medium.freecodecamp.org/ios-10-notifications-inshorts-all-in-one-ad727e03983a - Detailed discussion on notifications content extension and other concepts.

https://github.com/pgpt10/RichNotificationSample - A full-fledged example for implementing Notification content extension.

PGDev
  • 23,751
  • 6
  • 34
  • 88
  • Thanks for the answer. Maybe I did not express myself correctly. I need the menu button. Pull one time down. Only button is displayed. the second time pull down. Only then will the menu be displayed completely – Roman Jun 10 '18 at 20:22
  • Can you please add the screenshot for that? The above images you have added are unable to clarify that. – PGDev Jun 11 '18 at 06:04