ABPadLockScreen
ABPadLockScreen copied to clipboard
background color not changing
I am running swift demo app , background color showing black . In another project , i am calling it in a observer and When app coming from background then at that time only background color is showing change . NSNotificationCenter.defaultCenter().addObserverForName(UIApplicationDidEnterBackgroundNotification, object: nil, queue: NSOperationQueue.mainQueue()) {_ in
if (dataViewController().getpass() == "")
{
self.setPin() // here I am calling set pin screen
}else{
self.lockApp() // here i am calling to unlock screen
}
In one Line - In observer it is working but as a normal code it is not working
@cs14rendra I have recently created a new Swifty library for iOS pin view. Please have a look. https://github.com/siavashalipour/SAPinViewController
@cs14rendra Sorry but I'm not entirely sure what you mean. The example project describes how to set the background color of the view:
ABPadLockScreenView.appearance().backgroundColor = UIColor(hue:0.61, saturation:0.55, brightness:0.64, alpha:1)
If you can provide an example of the issues you're having I'll try and provide some guidance.
I'm having exactly the same issue. Doesn't matter what figures i add it still stays black.
`ABPadLockScreenView.appearance().backgroundColor = UIColor(hue:215, saturation:46.6, brightness:56.7, alpha:1)
Oddly enough my laptop shows the screen being blue and not black both with original settings on the swift demo app.
Thanks for letting me know @sarah-jameson. Ok, it looks like the UIApperance setter for the background color has broken somehow. I'll add a test and fix for this in the next release.
In the mean time, you can set the background color for the view directly without using UIApperance:
let lockScreen = ABPadLockScreenViewController(delegate: self, complexPin: false)
lockScreen.view.backgroundColor = UIColor.redColor()