An iOS application built with SwiftUI to display a list of posts. The app fetches posts from a remote API and supports pagination as the user scrolls. Users can tap on a post to view its details on a separate screen.
- Fetches and displays a list of posts from a remote API
- Supports pagination to load more posts as the user scrolls
- Displays detailed information when a post is tapped
- Efficient data loading and rendering using Combine and SwiftUI
- Optimized for performance with memoization and background computation
- iOS 14.0+
- Swift 5.*+
-
Clone the repository:
git clone https://github.com/yourusername/Postify.git
-
Open the project in Xcode:
cd Postify open Postify.xcodeproj
-
Build and run the project on the simulator (or a physical device).
- Launch the app.
- The home screen displays a list of posts fetched from a remote API.
- Scroll to the bottom of the list to load more posts.
- Tap on any post to view its details on a new screen.
The app follows the MVVM (Model-View-ViewModel) architecture pattern. It uses Combine for reactive programming and SwiftUI for building the user interface.
- APIClient: Handles network requests and data fetching.
- PostService: Provides functions to fetch posts and handle pagination.
- PostVM: Manages the state and business logic for the post list and detail views.
- PostListView: The main view displaying the list of posts.
- PostDetailView: The view displaying detailed information about a selected post.
- PostRow: A custom view representing a single post in the list.
This project is licensed under the MIT License - see the LICENSE file for details.
- JSONPlaceholder for providing a free fake online REST API for testing and prototyping.
- Author: Nagaraj V Rao
- Email: [email protected]