Skip to content

Catstagram ๐Ÿพ โ€” an Instagram-inspired SwiftUI app where cats (and not only) get their own feed with photos, videos, likes, and smooth scrolling.

License

Notifications You must be signed in to change notification settings

mustafos/lazy-load-img

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

22 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿพ Catstagram

Lazy Load Gallery

โœจ Features

  • ๐Ÿ“ธ Mixed Media Feed: Supports photos, videos, and mixed posts with horizontal paging.
  • โ–ถ๏ธ Smart Video Playback: Videos auto-play when visible and pause when off-screen.
  • โค๏ธ Like with Animation: Double-tap to like with smooth heartbeat animation + haptics.
  • ๐Ÿ—‚๏ธ Caching & Preheating: Images downsampled and preheated, videos pooled for reuse.
  • ๐ŸŽจ Modern UI: Card-style posts, custom header, floating action button with gradient.
  • โ˜€๏ธ Light Mode Only: Clean, consistent design locked to light appearance.

Installation

  1. Clone the repository:
git clone https://github.com/mustafos/lazy-load-img.git
cd lazy-load-img
  1. Open the project in Xcode:
open lazy-load-img.xcodeproj
  1. Run the application:
  • Select a simulator or real device.
  • Press Cmd + R or hit the โ–ถ๏ธ Run button.

๐Ÿ“‚ Project Structure

  • LazyLoadGalleryApp.swift โ€” app entry point, audio session + scene management.
  • FeedView.swift โ€” main scrollable feed.
  • PostCell.swift โ€” single post UI (header, media, actions, caption).
  • MediaPagerView.swift โ€” horizontal pager for mixed photo + video posts.
  • PlayerPool.swift โ€” AVPlayer pool for smooth video reuse.
  • ImageLoader.swift โ€” downsampled image loading with caching.
  • AppTheme.swift โ€” shared colors, shadows, and layout constants.

๐ŸŽฎ Usage

  • Scroll the feed to view posts.
  • Photos display instantly with lazy downsampled loading.
  • Videos auto-play when at least 25% visible.
  • Double-tap a photo or video to like it โ€” โค๏ธ animates with a beat.
  • Toggle sound with the mute button in the corner.

๐Ÿค Contribution

Pull requests are welcome! For big changes, open an issue first to discuss what youโ€™d like to add.

๐Ÿ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Catstagram ๐Ÿพ โ€” an Instagram-inspired SwiftUI app where cats (and not only) get their own feed with photos, videos, likes, and smooth scrolling.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages