• This repository has been archived on 15/Apr/2019
  • Stars
    star
    336
  • Rank 125,564 (Top 3 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Photo viewer (gallery) for iOS with AFNetworking and caching.

FSImageViewer Build Status Cocoa Pod Platform Cocoa Pod Version License

Screenshot

FSImageViewer is a photo viewer (gallery) for iOS.

It's initially based on EGOPhotoViewer, but completely refactored to use ARC, AFNetworking 2.5+ for remote image downloads and EGOCache 2.1 for image caching.

If you must use AFNetworking 1.3 you can use the 1.x version of FSImageViewer (https://github.com/x2on/FSImageViewer/tree/1.x)

Install

Using CocoaPods:

pod 'FSImageViewer', '~> 3.4'

Basic usage

Create your image objects:

FSBasicImage *firstPhoto = [[FSBasicImage alloc] initWithImageURL:[NSURL URLWithString:@"http://example.com/1.jpg"] name:@"Photo 1"];
FSBasicImage *secondPhoto = [[FSBasicImage alloc] initWithImageURL:[NSURL URLWithString:@"http://example.com/2.jpg"] name:@"Photo 2"];

And add them to the data source:

FSBasicImageSource *photoSource = [[FSBasicImageSource alloc] initWithImages:@[firstPhoto, secondPhoto]];

And create and show the view controller:

FSImageViewerViewController *imageViewController = [[FSImageViewerViewController alloc] initWithImageSource:photoSource];
[self.navigationController pushViewController:imageViewController animated:YES];

If you like to use a modal view controller:

FSImageViewerViewController *imageViewController = [[FSImageViewerViewController alloc] initWithImageSource:photoSource];
UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:imageViewController];
[self.navigationController presentViewController:navigationController animated:YES completion:nil];

Advanced usage

You can also create your own image class by implementing the FSImage protocol and your own datasource by implementing the FSImageSource protocol.

Demo

The demo project uses CocoaPods for dependency management.

Install dependencies:pod install

System support

iOS 7.0+ is currently supported.

If you must support iOS 5.0+ you can use the 1.x version of FSImageViewer. If you must support iOS 6.0+ you can use the 2.x version of FSImageViewer.

License

FSImageViewer is available under the MIT license. See the LICENSE file for more info.

More Repositories

1

OpenSSL-for-iPhone

A script for compiling OpenSSL for iOS Devices (iPhone, iPad, Watch, iPod Touch, AppleTV, MacCatalyst)
Shell
2,456
star
2

libssh2-for-iOS

A script for compiling libssh2 for iOS Devices (iPhone, iPad, iPod Touch). The example app can connect to an server with SSH and execute commands.
Objective-C
399
star
3

gradle-hockeyapp-plugin

A Gradle plugin for uploading iOS and Android Apps to HockeyApp.
Groovy
180
star
4

gradle-spoon-plugin

A Gradle plugin for running Android instrumentation tests with Spoon.
Groovy
39
star
5

simple-share-ios

Simple-Share for iOS is an easy drop-in library for sharing. (Facebook, Twitter, Mail, Safari)
Objective-C
27
star
6

libgcrypt-for-ios

Script for building libgcrypt for iOS.
Shell
24
star
7

xcode-maven-plugin

A maven build plugin for iOS continuous integration builds
Java
20
star
8

android-acra-server

An PHP-Server for ACRA Application Crash Report for Android
JavaScript
15
star
9

PolarSSL-for-iOS

PolarSSL-for-iOS is a light-weight open source cryptographic and SSL/TLS library for using with iOS.
C
13
star
10

GnuTLS-for-iOS

An Example XCode-Project with an script to compile GnuTLS for iOS Devices (iPhone, iPod Touch, iPad)
C
12
star
11

expat-ios

expat - XML Parser Toolkit build script for iOS
Shell
12
star
12

android-emulator-teamcity-plugin

Android-Emulator TeamCity Plugin
Java
11
star
13

android-acra-json-sender

A Reportsender for ACRA which uses JSON
Java
9
star
14

FSJUnitTestLog

XCTestObserver implementation, which converts the test results to an JUnit XML Results file.
Objective-C
9
star
15

FSOpenInGmail

Tool for sending mails with Gmail iOS App.
Objective-C
8
star
16

gradle-cocoapods-plugin

A Gradle plugin for Cocoapods.
Groovy
7
star
17

android-acra-demo-app

A demo app for using acra v4
Java
7
star
18

FSOpenInInstagram

Tool for sending pictures with Instagram iOS App
Objective-C
6
star
19

Glove-for-iOS

iPhone App that uses Accelerometer and send the data to an computer (via UDP)
Objective-C
5
star
20

iOpenStreetMap

iOpenStreetMap is an HTML/Javascript iPad Webapp for OpenStreetMap.
JavaScript
5
star
21

javapns

Git fork of javapns based on current trunk: JavaPNS is a Java library to send notifications through the Apple Push Notification Service
Java
4
star
22

xcode-teamcity-plugin

This is a Xcode plugin for the Continuous Integration server TeamCity.
Java
3
star
23

FSOpenInWhatsApp

Tool for sending messages with WhatsApp iOS App
Objective-C
3
star
24

gradle-xcode-plugin

A gradle plugin for building xcode projects.
Groovy
3
star
25

JUnitInstrumentationTestRunner

JUnitInstrumentationTestRunner is a extension for the Android InstrumentationTestRunner which adds the JUnitTestListener for writing test-results into an XML file.
Java
3
star
26

cyrus-sasl-ios

2
star
27

x2on.github.com

Blog
HTML
1
star
28

FSVCardParser

A library for parsing VCards on iOS
Objective-C
1
star