Blacklisted & Whitelisted views
Pre API 2.0
Smartlook.registerBlacklisted(object: someView)
Smartlook.unregisterBlacklisted(object: someView)
Smartlook.registerWhitelisted(object: someView)
Smartlook.unregisterWhitelisted(object: someView)
someView.slSensitive = true|false
API 2.0
There are no longer lists of "blacklisted" and "whitelisted" View
s. Sensitivity is explicitly set using a Boolean
value.
Smartlook.instance.sensitivity[someView] = true|false|null
sampleView.slSensitive = true|false|null
The "mapping" of the older APIs to the 2.0 is as follows:
- registering
View
as "blacklisted" is equivalent to setting theView
sensitivity totrue
. - registering
View
as "whitelisted" is equivalent to setting theView
sensitivity tofalse
. - unregistering
View
from "blacklisted" is equivalent to setting theView
sensitivity tonull
.
Blacklisted classes
Pre API 2.0
Smartlook.registerBlacklisted(object: SomeViewClass.self)
Smartlook.unregisterBlacklisted(object: SomeViewClass.self)
Smartlook.registerWhitelisted(object: SomeViewClass.self)
Smartlook.unregisterWhitelisted(object: SomeViewClass.self)
// Register sensitive class(es)
Smartlook.registerBlacklistedClass(Class class);
Smartlook.registerBlacklistedClasses(List<Class> classes);
// Unregister sensitive class(es)
Smartlook.unregisterBlacklistedClass(Class class);
Smartlook.unregisterBlacklistedClasses(List<Class> classes);
API 2.0
There is no longer list of "blacklisted" classes. Sensitivity is explicitly set using a Boolean
value.
Smartlook.instance.sensitivity[SomeViewClass.self] = true|false|null
The "mapping" of the older APIs to the 2.0 is as follows:
- registering
Class
as "blacklisted" is equivalent to setting theClass
sensitivity totrue
. - unregistering
Class
from "blacklisted" is equivalent to setting theClass
sensitivity tonull
.
No rendering
Pre API 2.0
Smartlook.setRenderingMode(to: .noRendering)
API 2.0
Smartlook.instance.preferences.renderingMode = .noRendering