UIViewController

Undocumented

  • 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

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

    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.fullScreen.

  • Presents an Instrument Selector widget.

    Declaration

    Swift

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

    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.fullScreen.

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

    Declaration

    Swift

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

    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.fullScreen.

  • 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

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

    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.fullScreen.

  • Presents a Broker Sign In widget.

    Declaration

    Swift

    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

    public func tradablePresentAuthenticationWebsite(forAppId appId: UInt64, withUri uri: String)

    Parameters

    appId

    OAuth flow app ID.

    uri

    OAuth flow redirect URL.