capacitor-community / privacy-screen

⚡️ Capacitor plugin that protects your app from displaying a screenshot in Recents screen/App Switcher.
MIT License
87 stars 23 forks source link

Add an option to center or fit background image for iOS App Launcher #96

Closed nomadminded closed 4 months ago

nomadminded commented 4 months ago

Is your feature request related to a problem? Please describe:

At the moment on iOS the background image passed in config is centered:

imageView.contentMode = .center

Describe the solution you'd like:

In our case we need to fit the image provided to the view controller, otherwise it is too zoomed in:

imageView.contentMode = .scaleAspectFit

It would be very useful to have an option that can be passed in config, something like

PrivacyScreen: { enable: true, imageName: "Splash", contentMode: "[fit/center]" }

Describe alternatives you've considered:

The only alternative we have right now is to fork out and customize the plugin, losing the option of keeping up with the updates.

robingenz commented 4 months ago

Yes, that's a missing feature. Feel free to create a PR.

nomadminded commented 4 months ago

HI @robingenz, PR created.