“`
“`swift
let adapter = SFADMTGAdapter.shared
adapter.getCards(for: “Lightning Bolt”) { result in
switch result {
case .success(let cards):
// Handle successful retrieval of cards
case .failure(let error):
// Handle error
}
}
“`
“`
“`
“`swift
let card = // Your card object obtained from the previous API call
let cardView = SFADMTGCardView(frame: CGRect(x: 0, y: 0, width: 200, height: 300))
cardView.configure(with: card)
// Add the cardView to your view hierarchy
“`
“`
“`
“`swift
let adapter = SFADMTGAdapter.shared
adapter.searchCards(withName: “Goblin”) { result in
switch result {
case .success(let cards):
// Handle successful search results
case .failure(let error):
// Handle error
}
}
“`
“`
“`
“`swift
let cardView = SFADMTGCardView(frame: CGRect(x: 0, y: 0, width: 200, height: 300))
cardView.titleFont = UIFont.boldSystemFont(ofSize: 18)
cardView.backgroundColor = UIColor.white
// Apply more customizations as per your needs
“`
“`