This PR contains all the work related to setting up this project as required to implement the [Assignment](https://repo.rock-n-code.com/rock-n-code/deep-linking-assignment/wiki/Assignment) on top, as intended. To summarise this work: - [x] created a new **Xcode** project; - [x] cloned the `Wikipedia` app and inserted it into the **Xcode** project; - [x] created the `Locations` app and also, its `Libraries` package; - [x] created the `Shared` package to share dependencies between the apps; - [x] added a `Makefile` file and implemented some **environment** and **help** commands. Co-authored-by: Javier Cicchelli <javier@rock-n-code.com> Reviewed-on: rock-n-code/deep-linking-assignment#1
26 lines
843 B
Swift
26 lines
843 B
Swift
import SwiftUI
|
|
|
|
extension View {
|
|
|
|
func readableShadow(intensity: Double = 0.80) -> some View {
|
|
return self.shadow(color: Color.black.opacity(intensity), radius: 5, x:0, y: 0)
|
|
}
|
|
|
|
/// Adds an iOS-version dependent `List` background `Color`
|
|
/// - Parameters:
|
|
/// - color: `Color` to use as background
|
|
/// - edges: safe area edges to ignore
|
|
/// - Returns: a modified `View` with the desired background `Color` applied
|
|
@ViewBuilder
|
|
func listBackgroundColor(_ color: Color, ignoringSafeAreaEdges edges: Edge.Set = .all) -> some View {
|
|
if #available(iOS 16, *) {
|
|
self
|
|
.scrollContentBackground(.hidden)
|
|
.background(color).edgesIgnoringSafeArea(edges)
|
|
} else {
|
|
self.background(color).edgesIgnoringSafeArea(edges)
|
|
}
|
|
}
|
|
|
|
}
|