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
accountThe account for which the widget should be presented.
instrumentAn optional, preselected instrument in the widget. If nil, no instrument will be preselected.
sideA preselected order side in the widget. Defaults to buy.
delegateAn optional TradableOrderEntryDelegate that will be called when the widget is dismissed.
presentationStyleThe 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
accountThe account for which the widget should be presented.
delegateAn optional TradableInstrumentSelectorDelegate that will handle the widget dismissal with selected instrument.
presentationStyleThe 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
accountThe account for which the widget should be presented.
orderThe order whose details will be displayed and which is to be edited.
delegateAn optional TradableEditOrderDelegate that will be called when the widget is dismissed.
presentationStyleThe 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
accountThe account for which the widget should be presented.
positionThe position whose details will be displayed.
delegateAn optional TradablePositionDetailDelegate that will be called when the widget is dismissed.
presentationStyleThe 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
appIdThe id of the app in which the widget is used.
delegateAn optional TradableBrokerSignInDelegate that will be called when the widget is dismissed.
presentationStyleThe 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
appIdOAuth flow app ID.
uriOAuth flow redirect URL.
-
Presents a Two Factor Authentication Challenge dialog.
Declaration
Swift
@objc public func tradablePresentTwoFactorAuthenticationChallengeDialog(for account: TradableAccount, with challenge: TradableTwoFactorAuthenticationChallenge)Parameters
accountThe account for which to present the dialog with a challenge.
challengeThe two factor authentication challenge.
View on GitHub
UIViewController Extension Reference