CLASS

# RubensConfiguratorView

Contents

  • Properties
    • delegate
  • Methods
    • init()
    • attachTo(view:)
    • loadConfiguration(_:)
    • getCurrentConfiguration(_:)
    • saveCurrentConfiguration(_:)
    • startConfiguring()
    • pauseConfiguring()
    • deinit
public class RubensConfiguratorView: UIView

View that displays the Roomle Rubens Configurator

# Properties

# delegate

public weak var delegate: RubensConfiguratorDelegate?

The delegate object specified to receive events after interactions in the Configurator

# Methods

# init()

public init()

Initialiser for the Roomle Rubens Configurator view.

# attachTo(view:)

public func attachTo(view parentView: UIView)

Adds the RubensConfiguratorView as a subview to the provided view.

The Configurator view will be added on top of already existing subviews.

  • Parameter parentView: The view to which the Configurator will be attached to as subview.

# Parameters

Name Description
parentView The view to which the Configurator will be attached to as subview.

# loadConfiguration(_:)

public func loadConfiguration(_ configuration: String)

Tells the Configurator to load the specified configuration.

The configuration string can either be an Configuration ID, an Catalog Item ID or an entire configuration string.

Examples:

Configuration ID:

koinor:FORMIA_LeftGroup:79FBF0D6C79A2598B5FF943111EA29DC0C6884AA97F4383582B47F69C14DDB2C

Catalog Item ID:

usm:frame

Configuration:

{"componentId":"muuto:Muuto-Stacked"}
  • Parameter configuration: A String of either an ID or an entire configuration string.

# Parameters

Name Description
configuration A String of either an ID or an entire configuration string.

# getCurrentConfiguration(_:)

public func getCurrentConfiguration(_ completion: @escaping (_ configuration: RoomleConfiguration?) -> Void)

Returns the current visible configuration.

The completion handler is returned with the configuration string of the current visible configuration.

When an error occurred the completion handler is nil.

The returned RoomleConfiguration object is empty except for the configuration string and configuration hash.

  • Important: This call does not save the current configuration to the server. Therefore, some fields in the returned object are empty(like thumbnails or parts).

  • Parameter completion: An completion handler returning the configuration

  • Parameter configuration: A RoomleConfiguration object

# Parameters

Name Description
completion An completion handler returning the configuration
configuration A RoomleConfiguration object

# saveCurrentConfiguration(_:)

public func saveCurrentConfiguration(_ completion: @escaping (_ configuration: RoomleConfiguration?) -> Void)

Saves the current visible configuration to the server.

After the configuration was successfully saved, the completion handler is called. When an error occurred (no network connection, etc.) the completion handler is nil.

  • Parameter completion: An completion handler returning the configuration
  • Parameter configuration: A RoomleConfiguration object

# Parameters

Name Description
completion An completion handler returning the configuration
configuration A RoomleConfiguration object

# startConfiguring()

public func startConfiguring()

Starts the Configurator in edit mode.

If the container where the configurator is placed is smaller than 1024px, the configurator is automatically instantiated as viewer. This function can be used to start configuration when the 3D scene is only initialized as viewer first.

Note: This breakpoint could change in future, so do not rely on this exact pixel setting.

# pauseConfiguring()

public func pauseConfiguring()

Pause configuration.

This function can be used to pause configuration and set the configurator in view-only mode. To know when the view-only mode is activated automatically, see the description of the startConfiguring function.

# deinit

deinit