Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

387
Views
Escriba 'Notification.Name' (también conocido como 'NSNotification.Name') no tiene ningún miembro 'UIDevice'

Aquí está mi código que estaba funcionando antes.

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

0

Quitar Notification.Name. prefijo:

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

Las constantes para los nombres de las notificaciones se movieron en iOS 12 SDK que venía con Xcode 10.

over 4 years ago · Santiago Trujillo Report

0

El 9 de abril de 2020, me encontré con un problema similar. Tengo:

 name: Notification.Name.UIKeyboardWillHide

Y tuve que "Reemplazar 'UIKeyboardWillHide' con 'UIResponder.keyboardWillHideNotification'". Hice clic en "arreglar" y obtuve:

 name: Notification.Name.UIResponder.keyboardWillHideNotification,

Después de eso, obtuve "Tipo 'Notification.Name' (también conocido como 'NSNotification.Name') no tiene miembro 'UIResponder'". Y finalmente, gracias a ustedes, descubrí:

 name: UIResponder.keyboardFrameEndUserInfoKey.

Tal vez mi caso y la respuesta también ayuden a algunos principiantes))

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!