-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/Nexters/mashow-iOS into …
…feature/19-choose-type-UI
- Loading branch information
Showing
34 changed files
with
2,118 additions
and
75 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
Targets/Mashow/Resources/Asset.xcassets/Images/FoodSelection/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Targets/Mashow/Resources/Asset.xcassets/Images/FoodSelection/glass.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "glass.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "glass@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "glass@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+35.2 KB
...s/Mashow/Resources/Asset.xcassets/Images/FoodSelection/glass.imageset/glass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+124 KB
...ashow/Resources/Asset.xcassets/Images/FoodSelection/glass.imageset/glass@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+260 KB
...ashow/Resources/Asset.xcassets/Images/FoodSelection/glass.imageset/glass@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
Targets/Mashow/Resources/Asset.xcassets/Images/Rating/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
Targets/Mashow/Resources/Asset.xcassets/Images/Rating/Flushed Face.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "Flushed Face.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "Flushed Face@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "Flushed Face@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+702 Bytes
...w/Resources/Asset.xcassets/Images/Rating/Flushed Face.imageset/Flushed Face.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.41 KB
...esources/Asset.xcassets/Images/Rating/Flushed Face.imageset/Flushed Face@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+2.04 KB
...esources/Asset.xcassets/Images/Rating/Flushed Face.imageset/Flushed Face@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions
23
Targets/Mashow/Resources/Asset.xcassets/Images/Rating/face_icon.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "face_icon.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"filename" : "face_icon@2x.png", | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"filename" : "face_icon@3x.png", | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+599 Bytes
.../Mashow/Resources/Asset.xcassets/Images/Rating/face_icon.imageset/face_icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.09 KB
...show/Resources/Asset.xcassets/Images/Rating/face_icon.imageset/face_icon@2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1.74 KB
...show/Resources/Asset.xcassets/Images/Rating/face_icon.imageset/face_icon@3x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
// | ||
// BlurredButton.swift | ||
// Mashow | ||
// | ||
// Created by Kai Lee on 8/18/24. | ||
// Copyright © 2024 com.alcoholers. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
class BlurredButton: UIButton { | ||
|
||
private let blurEffectView: UIVisualEffectView | ||
|
||
override init(frame: CGRect) { | ||
// Initialize the blur effect with a light style | ||
let blurEffect = UIBlurEffect(style: .dark) | ||
blurEffectView = UIVisualEffectView(effect: blurEffect) | ||
|
||
super.init(frame: frame) | ||
|
||
// Set up the blur effect view | ||
self.setupBlurEffectView() | ||
|
||
// Customize the button | ||
self.setupButton() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
// Initialize the blur effect with a light style | ||
let blurEffect = UIBlurEffect(style: .dark) | ||
blurEffectView = UIVisualEffectView(effect: blurEffect) | ||
|
||
super.init(coder: coder) | ||
|
||
// Set up the blur effect view | ||
self.setupBlurEffectView() | ||
|
||
// Customize the button | ||
self.setupButton() | ||
} | ||
|
||
private func setupBlurEffectView() { | ||
blurEffectView.layer.cornerRadius = 13 | ||
blurEffectView.clipsToBounds = true | ||
blurEffectView.isUserInteractionEnabled = false // Pass touches through | ||
|
||
// Add blur effect as a background view | ||
self.insertSubview(blurEffectView, at: 0) | ||
|
||
// Set up constraints for the blur effect view | ||
blurEffectView.snp.makeConstraints { make in | ||
make.edges.equalTo(self) | ||
} | ||
} | ||
|
||
private func setupButton() { | ||
self.layer.cornerRadius = 13 | ||
self.clipsToBounds = true | ||
self.backgroundColor = .hex("FCFCFC").withAlphaComponent(0.12) | ||
} | ||
|
||
// Method to update the blur effect style | ||
func updateBlurEffectStyle(_ style: UIBlurEffect.Style) { | ||
blurEffectView.effect = UIBlurEffect(style: style) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
// | ||
// GradientButton.swift | ||
// Mashow | ||
// | ||
// Created by Kai Lee on 8/19/24. | ||
// Copyright © 2024 com.alcoholers. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
class GradientButton: UIButton { | ||
|
||
// Gradient layer | ||
private var gradientLayer: CAGradientLayer? | ||
|
||
// Colors for the gradient | ||
var gradientColors: [UIColor] = [] { | ||
didSet { | ||
setGradient() | ||
} | ||
} | ||
|
||
// Start and End points for the gradient (used differently for radial) | ||
var startPoint: CGPoint = .init(x: 0.0, y: 0.5) { | ||
didSet { | ||
setGradient() | ||
} | ||
} | ||
|
||
var endPoint: CGPoint = .init(x: 1.0, y: 0.5) { | ||
didSet { | ||
setGradient() | ||
} | ||
} | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
setup() | ||
} | ||
|
||
required init?(coder aDecoder: NSCoder) { | ||
super.init(coder: aDecoder) | ||
setup() | ||
} | ||
|
||
private func setup() { | ||
setGradient(with: GradientButton.doneButtonColorSet) | ||
} | ||
|
||
private func setGradient(with colorSet: [UIColor] = GradientButton.doneButtonColorSet) { | ||
gradientLayer?.removeFromSuperlayer() | ||
|
||
let gradientLayer = CAGradientLayer() | ||
// Configure the colors | ||
gradientLayer.colors = gradientColors.isEmpty ? colorSet.map(\.cgColor) : gradientColors.map(\.cgColor) | ||
|
||
// Set the locations for each color in the gradient | ||
gradientLayer.locations = [0.0, 0.5] as [NSNumber] | ||
|
||
// Set the start and end points | ||
gradientLayer.startPoint = startPoint | ||
gradientLayer.endPoint = endPoint | ||
|
||
// Configure the frame and corner radius | ||
gradientLayer.frame = bounds | ||
gradientLayer.cornerRadius = layer.cornerRadius | ||
gradientLayer.masksToBounds = true | ||
|
||
layer.insertSublayer(gradientLayer, at: 0) | ||
|
||
self.gradientLayer = gradientLayer | ||
} | ||
|
||
override func layoutSubviews() { | ||
super.layoutSubviews() | ||
gradientLayer?.frame = bounds | ||
} | ||
} | ||
|
||
extension GradientButton { | ||
static var doneButtonColorSet: [UIColor] { | ||
return [.hex("F9FFF4"), .hex("FFCDCD"), .hex("F9FFF4")] | ||
} | ||
} |
Oops, something went wrong.