Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Commit

Permalink
ui updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mltbnz committed Apr 11, 2022
1 parent cb2afb3 commit d45a3e2
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 26 deletions.
2 changes: 1 addition & 1 deletion WegliKit/Sources/ImagesFeature/ImageGrid.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public struct ImageGrid: View {
content: ImageView.init
)
}
.transition(.opacity)
.transition(.opacity.combined(with: .move(edge: .bottom)))
}
}

Expand Down
9 changes: 1 addition & 8 deletions WegliKit/Sources/LocationFeature/MapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct MapView: UIViewRepresentable {
mapView.showsUserLocation = showsLocation

if let region = self.region {
mapView.setRegion(region.asMKCoordinateRegion, animated: false)
mapView.setRegion(region.asMKCoordinateRegion, animated: true)
}

if let pinCoordinate = pinCoordinate {
Expand All @@ -65,13 +65,6 @@ struct MapView: UIViewRepresentable {
self.parent = parent
}

func mapViewDidChangeVisibleRegion(_ mapView: MKMapView) {
parent.region = CoordinateRegion(
center: .init(mapView.region.center),
span: .init(mapView.region.span)
)
}

@objc func addPinBasedOnGesture(_ gestureRecognizer:UIGestureRecognizer) {
let touchPoint = gestureRecognizer.location(in: gestureRecognizer.view)
let newCoordinates = (gestureRecognizer.view as? MKMapView)?.convert(
Expand Down
43 changes: 27 additions & 16 deletions WegliKit/Sources/SettingsFeature/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,25 +85,36 @@ public struct SettingsView: View {
}

var githubView: some View {
HStack(alignment: .top) {
VStack(alignment: .leading) {
Text("weg-li ist open source")
.font(.system(.headline, design: .monospaced))
.foregroundColor(.white)
VStack {
HStack(alignment: .top) {
VStack(alignment: .leading) {
Text("Dir fehlt ein feature oder du willst einen bug fixen?")
.font(.system(.body, design: .monospaced))
.foregroundColor(.gitHubBannerForeground)
Text("weg-li ist open source")
.font(.system(.headline, design: .monospaced))
.foregroundColor(.white)
.padding(.bottom, 4)
VStack(alignment: .leading) {
Text("Dir fehlt ein feature oder du willst einen bug fixen?")
.font(.system(.body, design: .monospaced))
.foregroundColor(.gitHubBannerForeground)
}
}
.padding(.top, 4)
Spacer()
// swiftlint:disable:next force_unwrapping
Image(uiImage: UIImage(named: "GitHub")!)
.resizable()
.frame(maxWidth: 32, maxHeight: 32)
.colorInvert()
.padding(.leading, 6)
}

HStack {
Text("Projekt anzeigen")
Spacer()
Image(systemName: "arrow.up.right")
}
Spacer()
// swiftlint:disable:next force_unwrapping
Image(uiImage: UIImage(named: "GitHub")!)
.resizable()
.frame(maxWidth: 32, maxHeight: 32)
.colorInvert()
.padding(.leading, 6)
.padding(.top, 4)
.font(.system(.body, design: .monospaced))
.foregroundColor(.yellow)
}
.padding([.top, .bottom], 4)
.background(
Expand Down
2 changes: 1 addition & 1 deletion WegliKit/Sources/SharedModels/CoordinateRegion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public extension CoordinateRegion {
/// - span: Zoom level with a default value of 0.02
init(
center: CLLocationCoordinate2D,
defaultSpan: MKCoordinateSpan = MKCoordinateSpan(latitudeDelta: 0.02, longitudeDelta: 0.02)
defaultSpan: MKCoordinateSpan = MKCoordinateSpan(latitudeDelta: 0.005, longitudeDelta: 0.005)
) {
self.center = .init(center)
self.span = .init(defaultSpan)
Expand Down

0 comments on commit d45a3e2

Please sign in to comment.