• Stars
    star
    583
  • Rank 76,663 (Top 2 %)
  • Language
    Objective-C
  • Created almost 14 years ago
  • Updated almost 8 years ago

Reviews

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

Repository Details

Objective-C based gallery for iPhones

FGallery - A Photo Gallery for iOS

Overview

FGallery is a photo gallery viewer developed for iPhone applications. FGallery implements a delegate style design pattern similar to how UITableViewDelegates work. You may load images from either the local application bundle, or from the network.

Features

  • Single-tap fullscreen mode
  • Double-tap image zooming
  • Pinch zooming
  • Captions
  • Thumbnail grid
  • Rotation support
  • Load images locally or from a web URL
  • Custom UITabBarItems

Usage

Basic Instantiation

FGallery requires an object to implement the FGalleryViewControllerDelegate protocol in order to act as the photo source for the gallery. Then just push it into the navigation controller stack as you would with any UIViewController.

FGalleryViewController *galleryVC = [[FGalleryViewController alloc] initWithPhotoSource:self];
[self.navigationController pushViewController:galleryVC animated:YES];
[galleryVC release];

Instantiation with Custom Bar Items

FGallery allows you add additional UIBarButtonItems to the UIToolbar that exists within the gallery to perform additional functionality.

UIImage *trashIcon = [UIImage imageNamed:@"photo-gallery-trashcan.png"];
UIImage *captionIcon = [UIImage imageNamed:@"photo-gallery-edit-caption.png"];
UIBarButtonItem *trashButton = [[[UIBarButtonItem alloc] initWithImage:trashIcon style:UIBarButtonItemStylePlain target:self action:@selector(handleTrashButtonTouch:)] autorelease];
UIBarButtonItem *editCaptionButton = [[[UIBarButtonItem alloc] initWithImage:captionIcon style:UIBarButtonItemStylePlain target:self action:@selector(handleEditCaptionButtonTouch:)] autorelease];
NSArray *barItems = [NSArray arrayWithObjects:editCaptionButton, trashButton, nil];

FGalleryViewController *galleryVC = [[FGalleryViewController alloc] initWithPhotoSource:self barItems:barItems];
[self.navigationController pushViewController:galleryVC animated:YES];
[galleryVC release];

Current Project Status

The 1.x version of FGallery is no longer supported. Since I need to make a living, I've been busy contracting and haven't had time to fully support the 1.x versions. However, I am in the midst of slowly rewriting FGallery for a 2.0 version that will modernize the project and also convert it into a Cocoapod that I do plan on supporting. The new version will also use a UICollectionView to display the thumbnail gallery, will allow for custom layouts, and a few more nice updates. Sorry for being busy and not updating as much as I should, but I never thought this project would get as much attention as it has! Thanks for all the contributions and support for the project! -Grant

Changes

1.3

  • Various fixes and merged pull requests.

1.2

  • Adds new 'startingIndex' property. As you might guess, it allows a developer to specify what the starting index should be for the gallery. This must be set before the view is built in the ViewController. Defaults to 0.
  • Adds new 'beginsInThumbnailView' property. Allows the developer to indicate that the view should initialize and show the thumbnail view when first displaying instead of starting on the first image. This must be set before the view is presented. Defaults to 'NO'.
  • FGallery classes are now contained in an FGallery group, separate from other code classes that are part of the demo.

1.1

  • Added support for translucent navigation bars
  • Added support to hide the right navigation button and therefore disable thumbnails through a new useThumbnailView property.
  • Added better memory management for building and destroying view objects.
  • Fixed a crash in the network images demo.

1.0

  • First release!

License

(The MIT License)

Copyright © 2010 Grant Davis Interactive, LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

GDIIndexBar

A custom index bar component for navigating sections in table views.
Objective-C
91
star
2

iOS-CoreImage-Camera

Test project for using CoreImage with AVFoundation Camera Capture
Objective-C
62
star
3

Gravity

Common iOS Components, Utilities, and UIKit Categories for easy development
Objective-C
21
star
4

Middleman-HAML-Boilerplate

Basic structure for building HTML sites using Middleman, HAML/SASS, and HTML5 Boilerplate
12
star
5

Mimir-Feedback

The place to report bugs and suggest improvements for the podcast app Mimir
9
star
6

SwiftCustomTransitions

Example project for exploring Custom Transitions with Swift
Swift
8
star
7

uo-razor-scripts

Razor scripts for automating actions in UO Outlands
HTML
4
star
8

Mimir-ReleaseNotes

Contains Release Notes for Mimir on macOS and iOS
3
star
9

xcode-user-scripts

Handy user scripts that make text editing in XCode a bit user friendly.
3
star
10

proxy-player-js

JavaScript
3
star
11

GDIArcLabel

UILabel subclass thats draws text on an arc path
Objective-C
2
star
12

GDIMagnifiedPicker

Objective-C
2
star
13

GDIInfiniteScrollViewController

Objective-C
2
star
14

GDIDial

Dial Component
Objective-C
2
star
15

Last-FM-Now-Playing

ActionScript
1
star
16

GDIViewFlows

Sample project demonstrating the use of a flow pattern for creating dynamic, non-linear view paths
Swift
1
star
17

GDIImageOperation

Objective-C
1
star
18

2019-iOS13UIPresentation

2019 Cocoaheads Presentation for iOS 13 UI Updates
Swift
1
star
19

Bubbles

Prototype project for creating simulated bubbles using UIKit Dynamics and SpriteKit
Objective-C
1
star
20

fyeah.js

Dev Sandbox for FYeahJS toolbox components
JavaScript
1
star
21

GDICoreDataKit

Objective-C
1
star
22

GDI-Animation

A collection of animation styles and helpers for UIViewPropertyAnimator
Swift
1
star
23

GDi-AS3-Core

Framework for Actionscript 3.0 Flash projects
ActionScript
1
star
24

full_tilt

JavaScript
1
star
25

VerticalSwipeTransition

Swift
1
star
26

orange-actionscript-video

Project for building Flash video players using the Open Video Player framework
ActionScript
1
star
27

GDIInfinitePageScrollViewController

Scroll view that continuously scrolls content when reaching the end or the beginning of the content.
Objective-C
1
star