"MFSU$POUSPMMFS J04
w 1SFTFOUFSͰ"MFSU$POUSPMMFSΛੜ͢Δ߹
protocol UserInformationUpdateOutput: AnyObject {
func didFailToUpdateUserInformation(
with error: Error, retrying: @escaping (Bool) -> Void
)
}
final class UserInformationPresenter: UserInformationUpdateOutput {
func didFailToUpdateUserInformation(
with error: Error, retrying: @escaping (Bool) -> Void) {
let alert = // ...
let retryAction = UIAlertAction(title: "Retry", style: .default) { _ in
retrying(true)
}
alert.addAction(retryAction)
let cancelAction = UIAlertAction(title: "Close", style: .cancel) { _ in
retrying(false)
}
alert.addAction(cancelAction)
view.show(alert)
}
}