Skip to content

Commit 4482d21

Browse files
committed
Add randomized emoji icon in demo
1 parent cc04bd0 commit 4482d21

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Demo/Demo/ViewController.swift

+3-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ class ViewController: UITableViewController {
6363
let warning = MessageView.viewFromNib(layout: .CardView)
6464
warning.configureTheme(.Warning)
6565
warning.configureDropShadow()
66-
warning.configureContent(title: "Warning", body: "Consider yourself warned.", iconText: "🤔")
66+
67+
let iconText = ["🤔", "😳", "🙄", "😶"].sm_random()!
68+
warning.configureContent(title: "Warning", body: "Consider yourself warned.", iconText: iconText)
6769
warning.button?.hidden = true
6870
var warningConfig = SwiftMessages.Config()
6971
warningConfig.presentationContext = .Window(windowLevel: UIWindowLevelStatusBar)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ view.configureDropShadow()
6666

6767
// Set message title, body, and icon. Here, we're overriding the default warning
6868
// image with an emoji character.
69-
let iconText = ["🤔", "😳", "🙄", "😶"].sm_random()
69+
let iconText = ["🤔", "😳", "🙄", "😶"].sm_random()!
7070
view.configureContent(title: "Warning", body: "Consider yourself warned.", iconText: iconText)
7171

7272
// Show the message.

0 commit comments

Comments
 (0)