Transaction Detail Component
The TransactionDetailComponent
shows users information about a specific transaction and allows them to update its category or Brand, in case they are inaccurate.
To use this view in a SwiftUI project, just call the TransactionDetailComponent
method of your LuneSDKManager
instance as shown in the example below. The method takes the id
of the transaction as an argument.
// DetailView.Swift
import SwiftUI
import LuneSDK
struct DetailView: View {
// removed for simplicity...
var body: some View {
luneSDK.TransactionDetailComponent(
id: "<transaction.id>"
)
}
}
To use this view in an Objective-C project, just call the TransactionDetailComponent
method of your LuneSDKObjcManager
instance as shown in the example below. The method takes the id
of the transaction as an argument, along with a boolean
flag to enable notes.
// YourViewController.m
- (void)viewDidLoad {
[super viewDidLoad];
// transaction detail setup, after initilizing luneSDK
UIViewController *hostingController = [self.luneSDK TransactionDetailComponentWith
Config:nil id:@"<transaction.id>" withNotes:true];
[self addChildViewController:hostingController];
[self.view addSubview:hostingController.view];
// constraints setup removed for simplicity...
}
ON THIS PAGE