UIViewController

  • Presents an Order Entry widget. Starts full updates if no prices or full updates are running, or prices updates if no updates are running at all.

    Declaration

    Swift

    @objc public func tradablePresentOrderEntry(for account: TradableAccount, with instrument: TradableInstrument? = nil, withSide side: TradableOrderSide = .buy, delegate: TradableOrderEntryDelegate? = nil, presentationStyle: UIModalPresentationStyle = .overFullScreen)

    Parameters

    account

    The account for which the widget should be presented.

    instrument

    An optional, preselected instrument in the widget. If nil, no instrument will be preselected.

    side

    A preselected order side in the widget. Defaults to buy.

    delegate

    An optional TradableOrderEntryDelegate that will be called when the widget is dismissed.

    presentationStyle

    The widget’s presentation style. Defaults to UIModalPresentationStyle.overFullScreen.

  • Presents an Instrument Selector widget.

    Declaration

    Swift

    @objc public func tradablePresentInstrumentSelector(for account: TradableAccount, delegate: TradableInstrumentSelectorDelegate? = nil, presentationStyle: UIModalPresentationStyle = .overFullScreen)

    Parameters

    account

    The account for which the widget should be presented.

    delegate

    An optional TradableInstrumentSelectorDelegate that will handle the widget dismissal with selected instrument.

    presentationStyle

    The widget’s presentation style. Defaults to UIModalPresentationStyle.overFullScreen.

  • Presents an Edit Order widget. Starts full updates if no (such) updates are running.

    Declaration

    Swift

    @objc public func tradablePresentEditOrder(for account: TradableAccount, with order: TradableOrder, delegate: TradableEditOrderDelegate? = nil, presentationStyle: UIModalPresentationStyle = .overFullScreen)

    Parameters

    account

    The account for which the widget should be presented.

    order

    The order whose details will be displayed and which is to be edited.

    delegate

    An optional TradableEditOrderDelegate that will be called when the widget is dismissed.

    presentationStyle

    The widget’s presentation style. Defaults to UIModalPresentationStyle.overFullScreen.

  • Presents a Position Detail widget. Starts full updates if no positions or full updates are running, or positions updates if no updates are running at all.

    Declaration

    Swift

    @objc public func tradablePresentPositionDetail(for account: TradableAccount, with position: TradablePosition, delegate: TradablePositionDetailDelegate? = nil, presentationStyle: UIModalPresentationStyle = .overFullScreen)

    Parameters

    account

    The account for which the widget should be presented.

    position

    The position whose details will be displayed.

    delegate

    An optional TradablePositionDetailDelegate that will be called when the widget is dismissed.

    presentationStyle

    The widget’s presentation style. Defaults to UIModalPresentationStyle.overFullScreen.

  • Presents a Broker Sign In widget.

    Declaration

    Swift

    @objc public func tradablePresentBrokerSignIn(forAppId appId: UInt64, delegate: TradableBrokerSignInDelegate? = nil, presentationStyle: UIModalPresentationStyle = .fullScreen)

    Parameters

    appId

    The id of the app in which the widget is used.

    delegate

    An optional TradableBrokerSignInDelegate that will be called when the widget is dismissed.

    presentationStyle

    The widget’s presentation style. Defaults to UIModalPresentationStyle.fullScreen.

  • Presents an SFSafariViewController with a login website in order to authenticate. The view controller used to present it should conform to SFSafariViewControllerDelegate.

    Declaration

    Swift

    @objc public func tradablePresentAuthenticationWebsite(forAppId appId: UInt64, withUri uri: String, showLogin: Bool)

    Parameters

    appId

    OAuth flow app ID.

    uri

    OAuth flow redirect URL.

  • Presents a Two Factor Authentication Challenge dialog.

    Declaration

    Swift

    @objc public func tradablePresentTwoFactorAuthenticationChallengeDialog(for account: TradableAccount, with challenge: TradableTwoFactorAuthenticationChallenge)

    Parameters

    account

    The account for which to present the dialog with a challenge.

    challenge

    The two factor authentication challenge.