explaingit

mwaterfall/mwphotobrowser

8,719Objective-CAudience · developerComplexity · 2/5Setup · easy

TLDR

A ready-made iOS photo and video viewer you drop into your app, handles zooming, swiping between images, grid thumbnails, captions, and auto-downloading images from the web.

Mindmap

mindmap
  root((MWPhotoBrowser))
    What it does
      Photo and video viewer
      iOS drop-in library
    Features
      Zoom and pan
      Grid thumbnails
      Captions
      Multi-select
    Image sources
      Web URLs
      Device library
      Local files
      In-memory cache
    Integration
      CocoaPods
      Two delegate methods
    Audience
      iOS developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Add a full-featured photo gallery with pinch-to-zoom and swipe navigation to an iOS app without writing the UI from scratch

USE CASE 2

Show a grid thumbnail view of photos that users tap to open in full-screen inside an iOS app

USE CASE 3

Let users select multiple photos inside your app for sharing or batch actions using the built-in selection mode

Tech stack

Objective-CiOSCocoaPods

Getting it running

Difficulty · easy Time to first run · 30min

In plain English

MWPhotoBrowser is an iOS library that gives developers a ready-made photo and video viewing screen to drop into their apps. Instead of building a photo gallery from scratch, you add this library to your project, give it a list of images or videos, and it handles displaying them with a polished interface that supports zooming, panning, and swiping between items. The browser can display content from several sources: images already loaded in memory, photos and videos from the device library, URLs pointing to images hosted online, or local files. When images come from the web, the library downloads and caches them automatically so they do not need to be fetched again. Optional captions can appear below each photo, and users can also select one or more photos, which is useful for building features like sharing or batch actions. A grid view is available that shows all photos as thumbnails at once, letting users jump to a specific photo rather than swiping through one by one. The browser can start in either the full-screen swipe view or the grid view, depending on what makes sense for the app. Navigation arrows, action buttons for sharing, and selection checkboxes can each be turned on or off independently. Integration requires implementing two delegate methods that tell the library how many items there are and what object to use for each one. Beyond that, the setup is a small number of configuration properties. The library works on iOS 7 and later, and all displayed text is localized so it can be used in multilingual apps. The project is available through CocoaPods, a common iOS package manager, which simplifies adding it to an Xcode project. A demo app is included in the repository.

Copy-paste prompts

Prompt 1
I'm building an iOS app and want to add a photo browser using MWPhotoBrowser. Show me the Objective-C code to initialize it with an array of image URLs and present it modally.
Prompt 2
I need to show captions below photos in MWPhotoBrowser. How do I implement the delegate method that provides a caption string for each photo index?
Prompt 3
I want MWPhotoBrowser to open in grid view by default instead of the swipe view. How do I configure this in my view controller?
Open on GitHub → Explain another repo

← mwaterfall on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.