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

381
Views
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 answers
Answer question

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 Report

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 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!