- Add SwiftUI views for feed list, detail, add feed, settings, and bookmarks - Connect all views to ViewModels using @StateObject - Implement pull-to-refresh for feed list - Add error handling and loading states to all views - Create FeedItemRow view for consistent feed item display - Add toFeedItem() extension to Bookmark for UI integration - Update FeedDetailView to use sync methods - Update BookmarkView to use FeedService for unstar operations Co-Authored-By: Paperclip <noreply@paperclip.ing>
1.2 KiB
1.2 KiB
iOS UI Components
This directory contains SwiftUI views that integrate with the business logic layer.
Structure
- FeedListView.swift - List of feed items with pull-to-refresh
- FeedDetailView.swift - Single feed item details with read/star actions
- AddFeedView.swift - Add new feed subscription form
- SettingsView.swift - App settings (sync, appearance, about)
- BookmarkView.swift - Bookmarked items list
Components
All views are connected to ViewModels using @StateObject:
FeedViewModel- Manages feed stateBookmarkViewModel- Manages bookmark state
Services used:
FeedService- Feed fetching and managementBookmarkStore- Bookmark storageSettingsStore- App settingsBackgroundSyncService- Background sync
Usage
Import the UI module and use the views in your app:
import SwiftUI
struct ContentView: View {
var body: some View {
FeedListView()
}
}
Notes
- Views use
@StateObjectfor ViewModel binding - Pull-to-refresh implemented using
.refreshablemodifier - NavigationLink used for drill-down navigation
- Error states and loading indicators included
- Settings view with sync interval picker