Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

379
Vistas
Type 'Notification.Name' (aka 'NSNotification.Name') has no member 'UIDevice'

Here is my code which was working before.

NotificationCenter.default.addObserver(self, selector: #selector(ImageScrollView.changeOrientationNotification), name: Notification.Name.UIDevice.orientationDidChangeNotification, object: nil)
over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Remove Notification.Name. prefix:

NotificationCenter.default.addObserver(self, selector: #selector(ImageScrollView.changeOrientationNotification), name: UIDevice.orientationDidChangeNotification, object: nil)

The constants for notifications names were moved in iOS 12 SDK which came with Xcode 10.

over 4 years ago · Santiago Trujillo Denunciar

0

April 9th 2020, I ran into a similar problem. I've got:

name: Notification.Name.UIKeyboardWillHide

And I had to "Replace 'UIKeyboardWillHide' with 'UIResponder.keyboardWillHideNotification'" I clicked "fix" and got:

name: Notification.Name.UIResponder.keyboardWillHideNotification,

After that I got "Type 'Notification.Name' (aka 'NSNotification.Name') has no member 'UIResponder'". And finally, Thanks to you guys, I figured out:

name: UIResponder.keyboardFrameEndUserInfoKey.

Maybe my case and the answer will also help some beginner))

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda