Try this - this will restrict the entire window.
func makeSecure(window: UIWindow) {
let field = UITextField()
let view = UIView(frame: CGRect(x: 0, y: 0, width: field.frame.self.width, height: field.frame.self.height))
let image = UIImageView(image: UIImage(named: "whiteImage"))
image.frame = CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)
field.isSecureTextEntry = true
window.addSubview(field)
view.addSubview(image)
window.layer.superlayer?.addSublayer(field.layer)
field.layer.sublayers?.last!.addSublayer(window.layer)
field.leftView = view
field.leftViewMode = .always
}
I am using expo reactnative will this work on that if i made prebuild and insert this into Appdelegate or there is any different way for that.... will this also get accepted by app store?
Originally posted by @kushal211 in #16