Skip to content

Commit 7921b22

Browse files
author
zhaoyongqiang
committed
fix canvas background color bug
1 parent 9646f68 commit 7921b22

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

iOS/APIExample/APIExample/Examples/Advanced/LiveStreaming/LiveStreaming.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ class LiveStreamingEntry : UIViewController
6363

6464
@IBAction func doChoseBackgroundColor(_ sender: UIButton) {
6565
let pickerView = PickerView()
66-
let colors = ["Red".localized: 0xff0d0010,
67-
"Blue".localized: 0x0400ff10,
68-
"Pink".localized: 0xff006a10,
69-
"Purple".localized: 0xff00d910,
70-
"Yellow".localized: 0xeaff0010]
66+
let colors = ["Red".localized: 0xff0d00ff,
67+
"Blue".localized: 0x0400ffff,
68+
"Pink".localized: 0xff006aff,
69+
"Purple".localized: 0xff00d9ff,
70+
"Yellow".localized: 0xeaff00ff]
7171
pickerView.dataArray = colors.map({ $0.key })
7272
pickerView.pickerViewSelectedValueClosure = { [weak self] value in
7373
self?.backgroundColor = UInt32(colors[value] ?? 0x000000)

macOS/APIExample/Examples/Advanced/LiveStreaming/LiveStreaming.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,21 +142,21 @@ class LiveStreamingMain: BaseViewController {
142142
}
143143

144144
@IBOutlet weak var selectCanvasColor: Picker!
145-
private var remoteCanvasColor: UInt32 = 0xff006a10
145+
private var remoteCanvasColor: UInt32 = 0xff006aff
146146
func initSelectCanvasColor() {
147147
selectCanvasColor.label.stringValue = "默认背景色"
148-
let colors: [String: UInt32] = ["Red".localized: 0xff0d0010,
149-
"Blue".localized: 0x0400ff10,
150-
"Pink".localized: 0xff006a10,
151-
"Purple".localized: 0xff00d910,
152-
"Yellow".localized: 0xeaff0010]
148+
let colors: [String: UInt32] = ["Red".localized: 0xff0d00ff,
149+
"Blue".localized: 0x0400ffff,
150+
"Pink".localized: 0xff006aff,
151+
"Purple".localized: 0xff00d9ff,
152+
"Yellow".localized: 0xeaff00ff]
153153
let sortColors = colors.map({ $0.key }).sorted()
154154
selectCanvasColor.picker.addItems(withTitles: sortColors)
155155
selectCanvasColor.onSelectChanged { [weak self] in
156156
guard let self = self else { return }
157157
let index = self.selectCanvasColor.indexOfSelectedItem
158158
let colorTitle = sortColors[index]
159-
self.remoteCanvasColor = colors[colorTitle] ?? 0xff006a10
159+
self.remoteCanvasColor = colors[colorTitle] ?? 0xff006aff
160160
}
161161
}
162162
/**

0 commit comments

Comments
 (0)