diff options
author | Joel Fischer <joeljfischer@gmail.com> | 2019-07-31 13:05:00 -0400 |
---|---|---|
committer | Joel Fischer <joeljfischer@gmail.com> | 2019-07-31 13:05:00 -0400 |
commit | ce66fa5c090713938921c7cacf1a690bdceaf3d1 (patch) | |
tree | d86e565f497324d41d581a59bb6cfd9b0ad3d337 /Example Apps | |
parent | 6b896946693cd6a7efc5c5afd678c6cadebf8638 (diff) | |
download | sdl_ios-ce66fa5c090713938921c7cacf1a690bdceaf3d1.tar.gz |
Review fixesfeature/issue-995-alert-icon
Diffstat (limited to 'Example Apps')
-rw-r--r-- | Example Apps/Example ObjC/AlertManager.m | 11 | ||||
-rw-r--r-- | Example Apps/Example Swift/AlertManager.swift | 1 |
2 files changed, 7 insertions, 5 deletions
diff --git a/Example Apps/Example ObjC/AlertManager.m b/Example Apps/Example ObjC/AlertManager.m index ddc3aad72..d95bd2fc8 100644 --- a/Example Apps/Example ObjC/AlertManager.m +++ b/Example Apps/Example ObjC/AlertManager.m @@ -26,11 +26,12 @@ NS_ASSUME_NONNULL_BEGIN } /** - * Creates an alert with up to two lines of text and a close button that will dismiss the alert when tapped - * - * @param textField1 The first line of a message to display in the alert - * @param textField2 The second line of a message to display in the alert - * @return An SDLAlert object + Creates an alert with up to two lines of text and a close button that will dismiss the alert when tapped + + @param textField1 The first line of a message to display in the alert + @param textField2 The second line of a message to display in the alert + @param iconName The name of the uploaded icon artwork + @return An SDLAlert object */ + (SDLAlert *)alertWithMessageAndCloseButton:(NSString *)textField1 textField2:(nullable NSString *)textField2 iconName:(nullable NSString *)iconName { return [[SDLAlert alloc] initWithAlertText1:textField1 alertText2:textField2 alertText3:nil ttsChunks:nil playTone:NO progressIndicator:NO duration:5000 softButtons:@[[self sdlex_okSoftButton]] alertIcon:[[SDLImage alloc] initWithName:iconName isTemplate:YES]]; diff --git a/Example Apps/Example Swift/AlertManager.swift b/Example Apps/Example Swift/AlertManager.swift index 490002406..820f69f40 100644 --- a/Example Apps/Example Swift/AlertManager.swift +++ b/Example Apps/Example Swift/AlertManager.swift @@ -29,6 +29,7 @@ class AlertManager { /// - Parameters: /// - textField1: The first line of a message to display in the alert /// - textField2: The second line of a message to display in the alert + /// - iconName: The name of the uploaded icon artwork /// - Returns: An SDLAlert object class func alertWithMessageAndCloseButton(_ textField1: String, textField2: String? = nil, iconName: String? = nil) -> SDLAlert { return SDLAlert(alertText1: textField1, alertText2: textField2, alertText3: nil, ttsChunks: nil, playTone: false, progressIndicator: false, duration: 5000, softButtons: [AlertManager.okSoftButton], alertIcon: (iconName != nil) ? SDLImage(name: iconName!, isTemplate: true) : nil) |