UserDefaultsFeatureToggles
public class UserDefaultsFeatureToggles : UserFeatureToggles
A simple convenience class that can be used for managing user-toggled features using UserDefaults,
with the DefaultAvailabilityChecker
-
Declaration
Swift
public func addObserver(_ observer: UserFeatureTogglesObserver)
-
Declaration
Swift
public func removeObserver(_ observer: UserFeatureTogglesObserver)
-
Return
true
if the specified feature is currently enabled for the user,false
if it is off, or nil if the user has not saved a preferenceDeclaration
Swift
public func isEnabled(_ feature: ConditionalFeatureDefinition.Type) -> Bool?
-
Set whether or not the specified feature is currently enabled for the user.
Declaration
Swift
public func setEnabled(_ feature: ConditionalFeatureDefinition.Type, enabled: Bool)