closed #67
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import SwiftUI
|
||||||
|
|
||||||
struct Constants {
|
struct Constants {
|
||||||
static let groupShareId = "group.com.88oak.ifeel"
|
static let groupShareId = "group.com.88oak.ifeel"
|
||||||
@@ -38,3 +39,21 @@ extension Date: RawRepresentable {
|
|||||||
self = Date(timeIntervalSinceReferenceDate: Double(rawValue) ?? 0.0)
|
self = Date(timeIntervalSinceReferenceDate: Double(rawValue) ?? 0.0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
struct RoundedCorner: Shape {
|
||||||
|
|
||||||
|
var radius: CGFloat = .infinity
|
||||||
|
var corners: UIRectCorner = .allCorners
|
||||||
|
|
||||||
|
func path(in rect: CGRect) -> Path {
|
||||||
|
let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius))
|
||||||
|
return Path(path.cgPath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
extension View {
|
||||||
|
func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View {
|
||||||
|
clipShape( RoundedCorner(radius: radius, corners: corners) )
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ struct ContentView: View {
|
|||||||
yOffset: value)
|
yOffset: value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 25, style: .continuous))
|
.cornerRadius(10, corners: [.topLeft, .topRight])
|
||||||
}
|
}
|
||||||
|
|
||||||
private func SectionHeaderView(month: Int, year: Int) -> some View {
|
private func SectionHeaderView(month: Int, year: Int) -> some View {
|
||||||
@@ -341,7 +341,7 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
.frame(height: headerHeight + 20)
|
.frame(height: headerHeight + 20)
|
||||||
listView
|
listView
|
||||||
.padding([.leading, .trailing, .bottom])
|
.padding([.leading, .trailing])
|
||||||
}
|
}
|
||||||
}.background(
|
}.background(
|
||||||
theme.bg
|
theme.bg
|
||||||
|
|||||||
Reference in New Issue
Block a user