- ๐ธ 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.
- Clone the repository:
git clone https://github.com/mustafos/lazy-load-img.git
cd lazy-load-img
- Open the project in Xcode:
open lazy-load-img.xcodeproj
- Run the application:
- Select a simulator or real device.
- Press
Cmd + R
or hit theโถ๏ธ Run button.
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.
- 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.
Pull requests are welcome! For big changes, open an issue first to discuss what youโd like to add.
This project is licensed under the MIT License - see the LICENSE file for details.