1

I am working on newly enabled iOS 10 today-widgets on lock screen where I have show to user's information there. I want to hide it when the device is locked.

Is there any way to check the lock status programatically using Swift?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • 1
    this question has been asked a lot of times. Try to search. For example check this http://stackoverflow.com/questions/14229955/is-there-a-way-to-check-if-the-ios-device-is-locked-unlocked – Umair Afzal Sep 23 '16 at 04:27
  • 1
    And if you want to convert Obj-c code to Swift. Go to this site https://objectivec2swift.com/#/home/converter/ – Umair Afzal Sep 23 '16 at 04:28
  • I am looking if there is any solution in swift – chitranjan deo Sep 23 '16 at 07:21
  • I have commented a link for conversion as well, Conversion will not be 100% perfect but it will show you the way. – Umair Afzal Sep 23 '16 at 07:27

0 Answers0