Skip to content

News is a modern iOS app built with Swift and UIKit (programmatic) to deliver real-time news articles from various sources. It follows the MVVM + Protocol architecture for clean separation of concerns and uses Kingfisher for image loading and SnapKit for responsive layouts. The app showcases best practices in modular, scalable UIKit development.

Notifications You must be signed in to change notification settings

icommunitycomtr/news-example-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

News Example App

A modern news application that provides users with up-to-date news articles from various sources using the News API. Built with Swift and UIKit, this application offers a clean and intuitive interface for users to browse, search and share news articles.

Table of Contents


Overview

The News app is designed to deliver a seamless news reading experience with features like article sharing, search functionality, and customizable settings. Built using MVVM architecture, the app demonstrates best practices in iOS development including responsive design, dark mode support, pagination and search.


Features

  • Splash Screen

    • A welcoming splash screen featuring the app icon and name.
  • News Feed

    • Dynamic list of news articles from News API
    • Smooth scrolling and responsive layout
    • Bottom sheet for sharing options
    • Native share functionality for article links
    • Pagination for seamless content loading
    • Loading state indicators during pagination
    • Smart cache management for paginated content
  • Advanced Search

    • Native search bar implementation
    • Smart search with 3+ character threshold
    • Smooth animations for search results
    • Real-time API integration
    • Paginated search results
  • Article Details

    • Full article view with rich content
    • Image loading with Kingfisher
    • Share functionality
    • Dynamic navigation bar title
  • Settings

    • Theme toggle (Light/Dark mode)
    • Push notification management
    • App rating integration
    • Privacy policy and Terms of use
    • Dynamic theme switching
  • Responsive Design

    • Support for all iPhone models
    • iPad compatibility
    • Landscape orientation support
    • Auto Layout implementation

Architecture

MVVM

The application follows the MVVM+Protocol architecture pattern:

📦 Model

  • Defines the data structures, including news articles and app settings.
  • Contains no business logic — purely represents data.

🎛 ViewModel (Business Logic)

  • Acts as an intermediary between View and Model.
  • Uses protocols to communicate with View and decouple dependencies.
  • Handles data fetching, transformation, and state management.
  • Implements core features like searching and settings updates.

🖥 View (UI)

  • Built using UIKit, supporting programmatic UI.
  • Uses UITableView for displaying articles.
  • Observes the ViewModel for state changes via delegation.
  • Sends user actions to ViewModel through protocols.

This pattern ensures a modular, maintainable, and scalable codebase.


Technologies Used

  • Swift
    Primary programming language

  • UIKit
    Framework for building the user interface

  • Kingfisher
    For efficient image loading and caching

  • News API
    Primary data source for news articles

  • Snapkit
    For programmatic responsive design implementation

  • UserNotifications
    For handling push notifications


Installation

  1. Clone the repository

    git clone https://github.com/yourusername/news-app.git
  2. Navigate to Project Directory

    cd news-app
  3. API Key Setup

    • Get an API key from News API
    • Add your API key to the configuration
  4. Open Project

    open News.xcodeproj

Requirements

  • iOS 17.0+

Key Implementation Goals

  • Clean MVVM architecture implementation
  • Reusable TableView components with enums and sections
  • Robust network layer
  • Efficient view model logic
  • Light/Dark mode support
  • Pagination support for listing news
  • Proper auto layout support for various screen sizes

Screenshots

Screen Light Mode Dark Mode
News Feed News Feed Light News Feed Dark
Article Detail Article Detail Light Article Detail Dark
Search Results Search Results Light Search Results Dark
Settings Settings Light Settings Dark

About

News is a modern iOS app built with Swift and UIKit (programmatic) to deliver real-time news articles from various sources. It follows the MVVM + Protocol architecture for clean separation of concerns and uses Kingfisher for image loading and SnapKit for responsive layouts. The app showcases best practices in modular, scalable UIKit development.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages