Integer

Objective-C (iOS, watchOS)

NSInteger is platform dependent, 32-bit signed values on 32-bit CPUs and 64-bit signed values on 64-bit CPUs.

The default value of a NSInteger is 0. You can change the default value of the property by assigning a new value in an overridden reset method.

@property(assign) NSInteger propertyName;

NSInteger slider implementation

INT_PROPERTY_SLIDER(propertyName, minValue, maxValue, icon, description, restart)

The NSInteger property can be changed in Appfigurate using a slider between minimum and maximum values. You can customize the minimum and maximum images using the icon parameter. If restart is YES, then the app will be restarted if the property value changes.

Objective-C example

@import AppfigurateLibrary;

@interface Configuration : APLConfiguration

@property(nonatomic, assign) NSInteger volumeRange;

@end

@implementation Configuration

INT_PROPERTY_SLIDER(volumeRange, 50, 100, APLIconSliderVolume, @"Limit volume level", NO);
...

Appfigurate UI element example

NSInteger editable implementation

INT_PROPERTY_EDIT(propertyName, minValue, maxValue, regex, description, restart)

The NSInteger property can be changed in Appfigurate using a text field between minimum and maximum values, and an optional regular expression validating input. If restart is YES, then the app will be restarted if the property value changes.

Objective-C example

@import AppfigurateLibrary;

@interface Configuration : APLConfiguration

@property(nonatomic, assign) NSInteger gameLevels;

@end

@implementation Configuration

INT_PROPERTY_EDIT(gameLevels, 1, 5, @"", @"Maximum number of game levels", NO);
...

Appfigurate UI element example

NSInteger list implementation

INT_PROPERTY_LIST(propertyName, description, restart, ...)

The NSInteger property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. If restart is YES, then the app will be restarted if the property value changes.

Objective-C example

@import AppfigurateLibrary;

@interface Configuration : APLConfiguration

@property(nonatomic, assign) NSInteger rating;

@end

@implementation Configuration

INT_PROPERTY_LIST(rating, @"Quality rating", NO, @{@"Low": @10, @"Average": @50, @"Excellent": @95});
...

Appfigurate UI element example

NSInteger editable list implementation

INT_PROPERTY_LIST_EDIT(propertyName, minValue, maxValue, regex, description, restart, ...)

The NSInteger property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. The user can customize the list adding by additional values using a text field between minimum and maximum values, and an optional regular expression validating input. If restart is YES, then the app will be restarted if the property value changes.

Objective-C example

@import AppfigurateLibrary;

@interface Configuration : APLConfiguration

@property(nonatomic, assign) NSInteger availabilityDuration;

@end

@implementation Configuration

INT_PROPERTY_LIST_EDIT(availablityDuration, 0, 365, @"^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$", @"Duration in days emails are available", NO, @{@"7 days": @7, @"1 month": @30, @"1 Year": @365});
...

Appfigurate UI element example

Swift (iOS, watchOS)

Int is platform dependent, 32-bit signed values on 32-bit CPUs and 64-bit signed values on 64-bit CPUs.

The default value of a Int is 0. You can change the default value of the property by assigning a new value in an overridden reset method.

Int slider implementation

@IntPropertySlider(min, max, icon, description, restart)
var propertyName: Int

The Int property can be changed in Appfigurate using a slider between minimum and maximum values. You can customize the minimum and maximum images using the icon parameter. If restart is true, then the app will be restarted if the property value changes.

Swift example

import AppfigurateLibrary

@objcMembers class Configuration: APLConfiguration {

    @IntPropertySlider(min: 50, max: 100, icon: .volume, description: "Limit volume level", restart: true)
    var volumeRange: Int
    ...

Appfigurate UI element example

Int editable implementation

@IntPropertyEdit(min, max, regex, description, restart)
var propertyName: Int

The Int property can be changed in Appfigurate using a text field between minimum and maximum values, and an optional regular expression validating input. If restart is true, then the app will be restarted if the property value changes.

Swift example

import AppfigurateLibrary

@objcMembers class Configuration: APLConfiguration {

    @IntPropertyEdit(min: 1, max: 5, regex: "", description: "Maximum number of game levels", restart: false)
    var gameLevels: Int
    ...

Appfigurate UI element example

Int list implementation

@IntPropertyList(description, restart, values)
var propertyName: Int

The Int property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. If restart is true, then the app will be restarted if the property value changes.

Swift example

import AppfigurateLibrary

@objcMembers class Configuration: APLConfiguration {

    @IntPropertyList(description: "Quality rating", restart: false, values: ["Low": 10, "Average": 50, "Excellent": 95])
    var rating: Int
    ...

Appfigurate UI element example

Int editable list implementation

@IntPropertyListEdit(min, max, regex, description, restart, values)
var propertyName: Int

The Int property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. The user can customize the list adding by additional values using a text field between minimum and maximum values, and an optional regular expression validating input. If restart is true, then the app will be restarted if the property value changes.

Swift example

import AppfigurateLibrary

@objcMembers class Configuration: APLConfiguration {

    @IntPropertyListEdit(min: 0, max: 365, regex: "^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$", description: "Duration in days emails are available", restart: false, values: ["7 days": 7, "1 month": 30, "1 Year": 365])
    var availablityDuration: Int
    ...

Appfigurate UI element example

Java (Android)

The default value of an int is 0. You can change the default value of the property by assigning a new value in an overridden reset method.

int slider implementation

@IntPropertySlider(description, minValue, maxValue, sliderIcon, restart)
int propertyName;

The int property can be changed in Appfigurate using a slider between minimum and maximum values. You can customize the minimum and maximum images using the sliderIcon parameter. If restart is true, then the app will be restarted if the property value changes.

Java example

import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.IntPropertySlider;
import nz.co.electricbolt.appfiguratelibrary.annotations.IconSlider;

public class AppConfiguration extends Configuration {

    @IntPropertySlider(description = "Limit volume level", minValue = 50, maxValue = 100, sliderIcon = IconSlider.IconSliderVolume, restart = false)
    public int volumeRange;
    ...

Appfigurate UI element example

int editable implementation

@IntPropertyEdit(description, minValue, maxValue, regularExpression, restart)
int propertyName;

The int property can be changed in Appfigurate using a text field between minimum and maximum values, and an optional regular expression validating input. If restart is true, then the app will be restarted if the property value changes.

Java example

import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.IntPropertyEdit;

public class AppConfiguration extends Configuration {

    @IntPropertyEdit(description = "Maximum number of game levels", minValue = 1, maxValue = 5, restart = false)
    public int gameLevels;
    ...

Appfigurate UI element example

int list implementation

@IntPropertyList(description, keys, values, restart)
int propertyName;

The int property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. If restart is true, then the app will be restarted if the property value changes.

Java example

import nz.co.electricbolt.appfiguratelibrary.Configuration;java
import nz.co.electricbolt.appfiguratelibrary.annotations.IntPropertyList;

public class AppConfiguration extends Configuration {

    @IntPropertyList(description = "Quality rating", keys = {"Low", "Average", "Excellent"}, values = {10, 50, 95}, restart = false)
    public int rating;
    ...

Appfigurate UI element example

int editable list implementation

@IntPropertyListEdit(description, regularExpression, minValue, maxValue, keys, values, restart)
int propertyName;

The int property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. The user can customize the list adding by additional values using a text field between minimum and maximum values, and an optional regular expression validating input. If restart is true, then the app will be restarted if the property value changes.

Java example

import nz.co.electricbolt.appfiguratelibrary.Configuration;
import nz.co.electricbolt.appfiguratelibrary.annotations.IntPropertyListEdit;

public class AppConfiguration extends Configuration {

    @IntPropertyListEdit(description = "Duration in days emails are available", minValue = 0, maxValue = 365, regularExpression = "^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$", keys = {"7 days", "1 month", "1 Year"}, values = {7, 30, 365}, restart = false)
    public int availablityDuration;
    ...

Appfigurate UI element example

Kotlin (Android)

The default value of an Int is 0. You can change the default value of the property by assigning a new value in an overridden reset method.

Int slider implementation

@IntPropertySlider(description, minValue, maxValue, sliderIcon, restart)
var propertyName = 0

The Int property can be changed in Appfigurate using a slider between minimum and maximum values. You can customize the minimum and maximum images using the sliderIcon parameter. If restart is true, then the app will be restarted if the property value changes.

Kotlin example

import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.IntPropertySlider
import nz.co.electricbolt.appfiguratelibrary.annotations.IconSlider

class AppConfiguration : Configuration() {

    @IntPropertySlider(description = "Limit volume level", minValue = 50, maxValue = 100, sliderIcon = IconSlider.IconSliderVolume, restart = false)
    var volumeRange = 0
    ...

Appfigurate UI element example

Int editable implementation

@IntPropertyEdit(description, minValue, maxValue, regularExpression, restart)
var propertyName = 0

The Int property can be changed in Appfigurate using a text field between minimum and maximum values, and an optional regular expression validating input. If restart is true, then the app will be restarted if the property value changes.

Kotlin example

import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.IntPropertyEdit

class AppConfiguration : Configuration() {

    @IntPropertyEdit(description = "Maximum number of game levels", minValue = 1, maxValue = 5, restart = false)
    var gameLevels = 0
    ...

Appfigurate UI element example

Int list implementation

@IntPropertyList(description, keys, values, restart)
var propertyName = 0

The Int property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. If restart is true, then the app will be restarted if the property value changes.

Kotlin example

import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.IntPropertyList

class AppConfiguration : Configuration() {

    @IntPropertyList(description = "Quality rating", keys = ["Low", "Average", "Excellent"], values = [10, 50, 95], restart = false)
    var rating = 0
    ...

Appfigurate UI element example

Int editable list implementation

@IntPropertyListEdit(description, regularExpression, minValue, maxValue, keys, values, restart)
Int propertyName;

The Int property can be changed in Appfigurate by allowing the user to select from a predefined list of valid choices. The user can customize the list adding by additional values using a text field between minimum and maximum values, and an optional regular expression validating input. If restart is true, then the app will be restarted if the property value changes.

Kotlin example

import nz.co.electricbolt.appfiguratelibrary.Configuration
import nz.co.electricbolt.appfiguratelibrary.annotations.IntPropertyListEdit

class AppConfiguration : Configuration() {

    @IntPropertyListEdit(description = "Duration in days emails are available", minValue = 0, maxValue = 365, regularExpression = "^(0?[0-9]?[0-9]|[1-2][0-9][0-9]|3[0-5][0-9]|36[0-5])$", keys = ["7 days", "1 month", "1 Year"], values = [7, 30, 365], restart = false)
    var availablityDuration = 0
    ...

Appfigurate UI element example

Dart (Flutter for iOS, Flutter for Android)

The flutter APLNativeConfiguration class defers to the underlying platform APLConfiguration (iOS) or nz.co.electricbolt.appfiguratelibrary.Configuration (Android) subclass to read property values.

int implementation

int get propertyName => nativeInt('propertyName');

Dart example

import 'package:appfigurateflutter/appfigurateflutter.dart';

public class Configuration extends APLNativeConfiguration {

    int get volumeRange => nativeInt('volumeRange');
    ...

Last updated