wip
This commit is contained in:
366
Shared/Views/CustomIcon/CreateWidgetView.swift
Normal file
366
Shared/Views/CustomIcon/CreateWidgetView.swift
Normal file
@@ -0,0 +1,366 @@
|
||||
//
|
||||
// CreateIconView.swift
|
||||
// Feels (iOS)
|
||||
//
|
||||
// Created by Trey Tartt on 2/13/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct CreateWidgetView: View {
|
||||
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
|
||||
@Environment(\.dismiss) var dismiss
|
||||
@AppStorage(UserDefaultsStore.Keys.textColor.rawValue, store: GroupUserDefaults.groupDefaults) private var textColor: Color = DefaultTextColor.textColor
|
||||
|
||||
@StateObject private var customWidget: CustomWidgetModel
|
||||
|
||||
@State private var mouth: CustomWidgetMouthOptions = CustomWidgetMouthOptions.defaultOption
|
||||
@State private var showRightEyeImagePicker: Bool = false
|
||||
@State private var showLeftEyeImagePicker: Bool = false
|
||||
@State private var showMuthImagePicker: Bool = false
|
||||
|
||||
var widgetView: CustomWidgetView
|
||||
|
||||
private var randomElements: [AnyView]
|
||||
|
||||
init(customWidget: CustomWidgetModel, randomElements: [AnyView] = [AnyView]()) {
|
||||
self.randomElements = [
|
||||
AnyView(Image(CustomWidgetBackGroundOptions.selectable.randomElement()!.rawValue)
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)),
|
||||
AnyView(Image(CustomWidgetBackGroundOptions.selectable.randomElement()!.rawValue)
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)),
|
||||
AnyView(Image(CustomWidgetBackGroundOptions.selectable.randomElement()!.rawValue)
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20)),
|
||||
AnyView(Image(CustomWidgetBackGroundOptions.selectable.randomElement()!.rawValue)
|
||||
.resizable()
|
||||
.frame(width: 20, height: 20))
|
||||
]
|
||||
|
||||
_customWidget = StateObject(wrappedValue: customWidget)
|
||||
|
||||
widgetView = CustomWidgetView(customWidgetModel: customWidget)
|
||||
}
|
||||
|
||||
func update(eye: CustomWidgetEyes, eyeOption: CustomWidgeImageOptions) {
|
||||
EventLogger.log(event: "create_widget_view_update_eye",
|
||||
withData: ["eye_value": eye.rawValue, "eye_option_value": eyeOption.rawValue])
|
||||
switch eye {
|
||||
case .left:
|
||||
customWidget.leftEye = eyeOption
|
||||
case .right:
|
||||
customWidget.rightEye = eyeOption
|
||||
}
|
||||
}
|
||||
|
||||
func createRandom() {
|
||||
EventLogger.log(event: "create_widget_view_create_random")
|
||||
customWidget.bgColor = Color.random()
|
||||
customWidget.innerColor = Color.random()
|
||||
customWidget.bgOverlayColor = Color.random()
|
||||
customWidget.circleStrokeColor = Color.random()
|
||||
customWidget.leftEyeColor = Color.random()
|
||||
customWidget.rightEyeColor = Color.random()
|
||||
customWidget.mouthColor = Color.random()
|
||||
|
||||
update(eye: .left, eyeOption: CustomWidgeImageOptions.allCases.randomElement()!)
|
||||
update(eye: .right, eyeOption: CustomWidgeImageOptions.allCases.randomElement()!)
|
||||
update(mouthOption: CustomWidgeImageOptions.allCases.randomElement()!)
|
||||
|
||||
update(background: CustomWidgetBackGroundOptions.allCases.randomElement()!)
|
||||
}
|
||||
|
||||
func update(mouthOption: CustomWidgeImageOptions) {
|
||||
EventLogger.log(event: "create_widget_view_update_mouth",
|
||||
withData: ["mouthOption": mouthOption.rawValue])
|
||||
customWidget.mouth = mouthOption
|
||||
}
|
||||
|
||||
func update(background: CustomWidgetBackGroundOptions) {
|
||||
EventLogger.log(event: "create_widget_view_update_background",
|
||||
withData: ["background": background.rawValue])
|
||||
customWidget.background = background
|
||||
}
|
||||
|
||||
var mixBG: some View {
|
||||
VStack {
|
||||
HStack {
|
||||
randomElements[0]
|
||||
randomElements[1]
|
||||
}
|
||||
HStack {
|
||||
randomElements[2]
|
||||
randomElements[3]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var bottomBarButtons: some View {
|
||||
HStack(alignment: .center, spacing: 0) {
|
||||
Button(action: {
|
||||
EventLogger.log(event: "create_widget_view_shuffle")
|
||||
createRandom()
|
||||
}, label: {
|
||||
Image(systemName: "shuffle")
|
||||
.font(.title)
|
||||
.foregroundColor(.white)
|
||||
.padding([.top, .bottom])
|
||||
})
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.blue)
|
||||
|
||||
Button(action: {
|
||||
EventLogger.log(event: "create_widget_view_save_widget")
|
||||
UserDefaultsStore.saveCustomWidget(widgetModel: customWidget, inUse: false)
|
||||
let impactMed = UIImpactFeedbackGenerator(style: .heavy)
|
||||
impactMed.impactOccurred()
|
||||
dismiss()
|
||||
}, label: {
|
||||
Text(String(localized: "create_widget_save"))
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(.white)
|
||||
.padding([.top, .bottom])
|
||||
|
||||
})
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.green)
|
||||
|
||||
Button(action: {
|
||||
EventLogger.log(event: "customize_view_use_widget")
|
||||
UserDefaultsStore.saveCustomWidget(widgetModel: customWidget, inUse: true)
|
||||
let impactMed = UIImpactFeedbackGenerator(style: .heavy)
|
||||
impactMed.impactOccurred()
|
||||
dismiss()
|
||||
}, label: {
|
||||
Text(String(localized: "create_widget_use"))
|
||||
.font(.title)
|
||||
.fontWeight(.bold)
|
||||
.foregroundColor(.white)
|
||||
.padding([.top, .bottom])
|
||||
|
||||
})
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.pink)
|
||||
|
||||
if customWidget.isSaved {
|
||||
Button(action: {
|
||||
EventLogger.log(event: "customize_view_delete_widget")
|
||||
UserDefaultsStore.deleteCustomWidget(withUUID: customWidget.uuid)
|
||||
let impactMed = UIImpactFeedbackGenerator(style: .heavy)
|
||||
impactMed.impactOccurred()
|
||||
dismiss()
|
||||
}, label: {
|
||||
Image(systemName: "trash")
|
||||
.font(.title)
|
||||
.foregroundColor(.white)
|
||||
.padding([.top, .bottom])
|
||||
|
||||
})
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
.background(.orange)
|
||||
}
|
||||
}
|
||||
.frame(minHeight: 40, maxHeight: .infinity)
|
||||
}
|
||||
|
||||
var colorOptions: some View {
|
||||
VStack {
|
||||
HStack(spacing: 0) {
|
||||
VStack(alignment: .center) {
|
||||
Text(String(localized: "create_widget_background_color"))
|
||||
ColorPicker("", selection: $customWidget.bgColor)
|
||||
.onChange(of: customWidget.mouthColor, perform: { newValue in
|
||||
EventLogger.log(event: "create_widget_view_update_background_color")
|
||||
})
|
||||
.labelsHidden()
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
VStack(alignment: .center) {
|
||||
Text(String(localized: "create_widget_inner_color"))
|
||||
ColorPicker("", selection: $customWidget.innerColor)
|
||||
.onChange(of: customWidget.mouthColor, perform: { newValue in
|
||||
EventLogger.log(event: "create_widget_view_update_inner_color")
|
||||
})
|
||||
.labelsHidden()
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
VStack(alignment: .center) {
|
||||
Text(String(localized: "create_widget_face_outline_color"))
|
||||
ColorPicker("", selection: $customWidget.circleStrokeColor)
|
||||
.onChange(of: customWidget.mouthColor, perform: { newValue in
|
||||
EventLogger.log(event: "create_widget_view_update_outline_color")
|
||||
})
|
||||
.labelsHidden()
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
}
|
||||
|
||||
HStack(spacing: 0) {
|
||||
VStack(alignment: .center) {
|
||||
Text(String(localized: "create_widget_view_left_eye_color"))
|
||||
ColorPicker("", selection: $customWidget.leftEyeColor)
|
||||
.onChange(of: customWidget.mouthColor, perform: { newValue in
|
||||
EventLogger.log(event: "create_widget_view_update_left_eye_color")
|
||||
})
|
||||
.labelsHidden()
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
VStack(alignment: .center) {
|
||||
Text(String(localized: "create_widget_view_right_eye_color"))
|
||||
ColorPicker("", selection: $customWidget.rightEyeColor)
|
||||
.onChange(of: customWidget.mouthColor, perform: { newValue in
|
||||
EventLogger.log(event: "create_widget_view_update_right_eye_color")
|
||||
})
|
||||
.labelsHidden()
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
|
||||
VStack(alignment: .center) {
|
||||
Text(String(localized: "create_widget_view_mouth_color"))
|
||||
ColorPicker("", selection: $customWidget.mouthColor)
|
||||
.onChange(of: customWidget.mouthColor, perform: { newValue in
|
||||
EventLogger.log(event: "create_widget_view_update_mouth_color")
|
||||
})
|
||||
.labelsHidden()
|
||||
}
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
}
|
||||
}
|
||||
.multilineTextAlignment(.center)
|
||||
.padding()
|
||||
.background(
|
||||
theme.currentTheme.secondaryBGColor
|
||||
)
|
||||
}
|
||||
|
||||
var bgImageOptions: some View {
|
||||
HStack {
|
||||
ForEach(CustomWidgetBackGroundOptions.selectable, id: \.self) { bg in
|
||||
Image(bg.rawValue, bundle: .main)
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.frame(minWidth: 10, idealWidth: 40, maxWidth: 40,
|
||||
minHeight: 10, idealHeight: 40, maxHeight: 40,
|
||||
alignment: .center)
|
||||
.onTapGesture {
|
||||
update(background: bg)
|
||||
}
|
||||
}
|
||||
mixBG
|
||||
.onTapGesture {
|
||||
update(background: .random)
|
||||
}
|
||||
Divider()
|
||||
ColorPicker("", selection: $customWidget.bgOverlayColor)
|
||||
}
|
||||
.padding()
|
||||
.background(
|
||||
theme.currentTheme.secondaryBGColor
|
||||
)
|
||||
}
|
||||
|
||||
var faceImageOptions: some View {
|
||||
HStack(alignment: .center) {
|
||||
Text(String(localized: "create_widget_view_left_eye"))
|
||||
.onTapGesture(perform: {
|
||||
showLeftEyeImagePicker.toggle()
|
||||
})
|
||||
.foregroundColor(textColor)
|
||||
.foregroundColor(textColor)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
Divider()
|
||||
Text(String(localized: "create_widget_view_right_eye"))
|
||||
.onTapGesture(perform: {
|
||||
showRightEyeImagePicker.toggle()
|
||||
})
|
||||
.foregroundColor(textColor)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
Divider()
|
||||
Text(String(localized: "create_widget_view_mouth"))
|
||||
.onTapGesture(perform: {
|
||||
showMuthImagePicker.toggle()
|
||||
})
|
||||
.foregroundColor(textColor)
|
||||
.foregroundColor(textColor)
|
||||
.frame(minWidth: 0, maxWidth: .infinity)
|
||||
}
|
||||
.padding()
|
||||
.background(
|
||||
theme.currentTheme.secondaryBGColor
|
||||
)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geo in
|
||||
VStack(spacing: 0) {
|
||||
widgetView
|
||||
.cornerRadius(10)
|
||||
.padding()
|
||||
.frame(width: geo.size.width, height: geo.size.width)
|
||||
|
||||
Spacer()
|
||||
ScrollView {
|
||||
VStack(spacing: 0) {
|
||||
Divider().background(Color(UIColor.tertiarySystemBackground))
|
||||
|
||||
faceImageOptions
|
||||
|
||||
Divider().background(Color(UIColor.tertiarySystemBackground))
|
||||
|
||||
bgImageOptions
|
||||
|
||||
Divider().background(Color(UIColor.tertiarySystemBackground))
|
||||
|
||||
colorOptions
|
||||
|
||||
Divider().background(Color(UIColor.tertiarySystemBackground))
|
||||
|
||||
bottomBarButtons
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.sheet(isPresented: $showRightEyeImagePicker) {
|
||||
ImagePickerGridView(pickedImageClosure: { image in
|
||||
update(eye: .right, eyeOption: image)
|
||||
})
|
||||
}
|
||||
.sheet(isPresented: $showLeftEyeImagePicker) {
|
||||
ImagePickerGridView(pickedImageClosure: { image in
|
||||
update(eye: .left, eyeOption: image)
|
||||
})
|
||||
}
|
||||
.sheet(isPresented: $showMuthImagePicker) {
|
||||
ImagePickerGridView(pickedImageClosure: { image in
|
||||
update(mouthOption: image)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct CreateIconView_Previews: PreviewProvider {
|
||||
static var widget: CustomWidgetModel {
|
||||
let _widget = CustomWidgetModel.randomWidget
|
||||
_widget.isSaved = true
|
||||
return _widget
|
||||
}
|
||||
|
||||
static var previews: some View {
|
||||
Group {
|
||||
CreateWidgetView(customWidget: CreateIconView_Previews.widget)
|
||||
|
||||
CreateWidgetView(customWidget: CustomWidgetModel.randomWidget)
|
||||
.preferredColorScheme(.dark)
|
||||
}
|
||||
}
|
||||
}
|
||||
115
Shared/Views/CustomIcon/IconView.swift
Normal file
115
Shared/Views/CustomIcon/IconView.swift
Normal file
@@ -0,0 +1,115 @@
|
||||
//
|
||||
// IconView.swift
|
||||
// Feels (iOS)
|
||||
//
|
||||
// Created by Trey Tartt on 2/20/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct IconView: View {
|
||||
@State public var iconViewModel: IconViewModel
|
||||
|
||||
private let facePercSize = 0.6
|
||||
|
||||
let columns = [
|
||||
GridItem(.flexible(minimum: 1, maximum: 100), spacing: 1),
|
||||
GridItem(.flexible(minimum: 1, maximum: 100), spacing: 1),
|
||||
GridItem(.flexible(minimum: 1, maximum: 100), spacing: 1),
|
||||
GridItem(.flexible(minimum: 1, maximum: 100), spacing: 1),
|
||||
GridItem(.flexible(minimum: 1, maximum: 100), spacing: 1),
|
||||
GridItem(.flexible(minimum: 1, maximum: 100), spacing: 1),
|
||||
GridItem(.flexible(minimum: 1, maximum: 100), spacing: 1),
|
||||
GridItem(.flexible(minimum: 1, maximum: 100), spacing: 1),
|
||||
GridItem(.flexible(minimum: 1, maximum: 100), spacing: 1),
|
||||
GridItem(.flexible(minimum: 1, maximum: 100), spacing: 1)
|
||||
]
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geo in
|
||||
ZStack {
|
||||
Rectangle()
|
||||
.fill(
|
||||
iconViewModel.bgColor
|
||||
)
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
|
||||
LazyVGrid(columns: columns, alignment: .leading, spacing: 0) {
|
||||
ForEach(iconViewModel.background, id: \.self.1) { (bgOption, uuid) in
|
||||
bgOption
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.foregroundColor(iconViewModel.bgOverlayColor)
|
||||
}
|
||||
}
|
||||
.scaleEffect(1.1)
|
||||
.clipped()
|
||||
.background(
|
||||
.clear
|
||||
)
|
||||
|
||||
Circle()
|
||||
.strokeBorder(iconViewModel.bgColor, lineWidth: geo.size.width * 0.045)
|
||||
.background(Circle().fill(.clear))
|
||||
.frame(width: geo.size.width*facePercSize,
|
||||
height: geo.size.height*facePercSize,
|
||||
alignment: .center)
|
||||
.alignmentGuide(.top, computeValue: { _ in
|
||||
return geo.size.width/2
|
||||
})
|
||||
|
||||
Circle()
|
||||
.fill(iconViewModel.innerColor)
|
||||
.frame(width: geo.size.width*facePercSize,
|
||||
height: geo.size.height*facePercSize,
|
||||
alignment: .center)
|
||||
.alignmentGuide(.top, computeValue: { _ in
|
||||
return geo.size.width/2
|
||||
})
|
||||
|
||||
iconViewModel.centerImage
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.frame(width: geo.size.width*facePercSize,
|
||||
height: geo.size.height*facePercSize,
|
||||
alignment: .center)
|
||||
.foregroundColor(iconViewModel.bgOverlayColor)
|
||||
.alignmentGuide(.top, computeValue: { _ in
|
||||
return geo.size.width/2
|
||||
})
|
||||
|
||||
}
|
||||
.position(x: geo.size.width/2,
|
||||
y: geo.size.height/2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct IconView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
IconView(iconViewModel: IconViewModel.great)
|
||||
.frame(width: 256, height: 256, alignment: .center)
|
||||
|
||||
IconView(iconViewModel: IconViewModel.good)
|
||||
.frame(width: 256, height: 256, alignment: .center)
|
||||
|
||||
IconView(iconViewModel: IconViewModel.average)
|
||||
.frame(width: 256, height: 256, alignment: .center)
|
||||
|
||||
IconView(iconViewModel: IconViewModel.bad)
|
||||
.frame(width: 256, height: 256, alignment: .center)
|
||||
|
||||
IconView(iconViewModel: IconViewModel.horrible)
|
||||
.frame(width: 256, height: 256, alignment: .center)
|
||||
//
|
||||
// IconView(iconViewModel: IconViewModel(backgroundImage: EmojiMoodImages.icon(forMood: .horrible),
|
||||
// bgColor: MoodTints.Neon.color(forMood: .horrible),
|
||||
// bgOverlayColor: MoodTints.Neon.color(forMood: .horrible),
|
||||
// centerImage: EmojiMoodImages.icon(forMood: .horrible)),
|
||||
// isPreview: true)
|
||||
// .frame(width: 256, height: 256, alignment: .center)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
88
Shared/Views/CustomIcon/IconViewModel.swift
Normal file
88
Shared/Views/CustomIcon/IconViewModel.swift
Normal file
@@ -0,0 +1,88 @@
|
||||
//
|
||||
// CustomIcon.swift
|
||||
// Feels (iOS)
|
||||
//
|
||||
// Created by Trey Tartt on 2/20/22.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
class IconViewModel: ObservableObject {
|
||||
static let numberOfBGItems = 109
|
||||
|
||||
static let great = IconViewModel(backgroundImage: MoodImages.FontAwesome.icon(forMood: .great),
|
||||
bgColor: Color(hex: "31d158"),
|
||||
bgOverlayColor: Color(hex: "208939"),
|
||||
centerImage: MoodImages.FontAwesome.icon(forMood: .great),
|
||||
innerColor: Color(hex: "31d158"))
|
||||
|
||||
static let good = IconViewModel(backgroundImage: MoodImages.FontAwesome.icon(forMood: .good),
|
||||
bgColor: Color(hex: "ffd709"),
|
||||
bgOverlayColor: Color(hex: "9d8405"),
|
||||
centerImage: MoodImages.FontAwesome.icon(forMood: .good),
|
||||
innerColor: Color(hex: "ffd709"))
|
||||
|
||||
static let average = IconViewModel(backgroundImage: MoodImages.FontAwesome.icon(forMood: .average),
|
||||
bgColor: Color(hex: "0b84ff"),
|
||||
bgOverlayColor: Color(hex: "074f9a"),
|
||||
centerImage: MoodImages.FontAwesome.icon(forMood: .average),
|
||||
innerColor: Color(hex: "0b84ff"))
|
||||
|
||||
static let bad = IconViewModel(backgroundImage: MoodImages.FontAwesome.icon(forMood: .bad),
|
||||
bgColor: Color(hex: "ff9f0b"),
|
||||
bgOverlayColor: Color(hex: "a06407"),
|
||||
centerImage: MoodImages.FontAwesome.icon(forMood: .bad),
|
||||
innerColor: Color(hex: "ff9f0b"))
|
||||
|
||||
static let horrible = IconViewModel(backgroundImage: MoodImages.FontAwesome.icon(forMood: .horrible),
|
||||
bgColor: Color(hex: "fe5257"),
|
||||
bgOverlayColor: Color(hex: "a92b26"),
|
||||
centerImage: MoodImages.FontAwesome.icon(forMood: .horrible),
|
||||
innerColor: Color(hex: "fe5257"))
|
||||
|
||||
init(backgroundImage: Image,
|
||||
bgColor: Color,
|
||||
bgOverlayColor: Color,
|
||||
centerImage: Image,
|
||||
innerColor: Color
|
||||
) {
|
||||
|
||||
var blah = [(Image, UUID)]()
|
||||
for _ in 0...IconViewModel.numberOfBGItems {
|
||||
blah.append((backgroundImage, UUID()))
|
||||
}
|
||||
|
||||
self.background = blah
|
||||
self.bgColor = bgColor
|
||||
self.bgOverlayColor = bgOverlayColor
|
||||
self.centerImage = centerImage
|
||||
self.innerColor = innerColor
|
||||
}
|
||||
|
||||
@Published var background: [(Image, UUID)]
|
||||
@Published var bgColor: Color
|
||||
@Published var bgOverlayColor: Color
|
||||
@Published var centerImage: Image
|
||||
@Published var innerColor: Color
|
||||
}
|
||||
|
||||
enum CustomIconBackGroundOptions: String, CaseIterable, Codable {
|
||||
case horrible
|
||||
case bad
|
||||
case average
|
||||
case good
|
||||
case great
|
||||
case random
|
||||
|
||||
static var selectable: [CustomIconBackGroundOptions] {
|
||||
return [.great, .good, .average, .bad, .horrible]
|
||||
}
|
||||
|
||||
static public var defaultOption: CustomIconBackGroundOptions {
|
||||
CustomIconBackGroundOptions.random
|
||||
}
|
||||
|
||||
public var image: Image {
|
||||
return Image(self.rawValue, bundle: .main)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user