create random icons and save to documents dir
This commit is contained in:
@@ -50,7 +50,16 @@ struct IconView: View {
|
||||
|
||||
Circle()
|
||||
.strokeBorder(iconViewModel.bgColor, lineWidth: geo.size.width * 0.045)
|
||||
.background(Circle().fill(iconViewModel.bgColor))
|
||||
.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)
|
||||
@@ -82,17 +91,17 @@ struct IconView_Previews: PreviewProvider {
|
||||
IconView(iconViewModel: IconViewModel.great)
|
||||
.frame(width: 256, height: 256, alignment: .center)
|
||||
|
||||
// IconView(iconViewModel: IconViewModel.good, isPreview: true)
|
||||
// .frame(width: 256, height: 256, alignment: .center)
|
||||
//
|
||||
// IconView(iconViewModel: IconViewModel.average, isPreview: true)
|
||||
// .frame(width: 256, height: 256, alignment: .center)
|
||||
//
|
||||
// IconView(iconViewModel: IconViewModel.bad, isPreview: true)
|
||||
// .frame(width: 256, height: 256, alignment: .center)
|
||||
//
|
||||
// IconView(iconViewModel: IconViewModel.horrible, isPreview: true)
|
||||
// .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),
|
||||
|
||||
Reference in New Issue
Block a user