Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

383
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda