Commit 88f5f6b
committed
Improve UI and Refactor Weather App Code
• Updated ContentView.swift to adjust layout, reduce bottom padding, and fix text styling.
• Changed locationName display to uppercase with .textCase(.uppercase).
• Reduced bottom padding and set fixed max height in weatherInfoView to align content and prevent shifting.
• Refined height calculation to make layout more compact.
• Modified AppDelegate.swift for better code organization:
• Extracted setup functions (setupStatusItem, setupPopoverContent, and bindWeatherUpdates) for clarity.
• Improved readability and consistency with multiline formatting in function parameters.
• Updated WeatherManager.swift:
• Changed checkLocationAuthorization method from private to internal for accessibility.
• Added showLocationSettingsAlert to notify users to enable location permissions in System Preferences.
• Adjusted fetchWeatherAt method for cleaner code.
• Revised Info.plist:
• Added descriptions for NSLocationUsageDescription and NSLocationAlwaysUsageDescription to clarify location permissions for users.
• Temporarily removed LSUIElement and LSBackgroundOnly for testing visibility.1 parent 88a877d commit 88f5f6b
File tree
5 files changed
+182
-147
lines changed- Moti
- Moti.xcodeproj
- Moti
- ViewModels
- Views
5 files changed
+182
-147
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
448 | | - | |
| 447 | + | |
| 448 | + | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
| |||
477 | 477 | | |
478 | 478 | | |
479 | 479 | | |
480 | | - | |
481 | | - | |
| 480 | + | |
| 481 | + | |
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
16 | 22 | | |
17 | | - | |
18 | | - | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | 26 | | |
| |||
31 | 36 | | |
32 | 37 | | |
33 | 38 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 39 | | |
39 | 40 | | |
0 commit comments