This branch is no longer maintained. PhotoViewer started out as a stripped down version of three20’s PhotoViewer. After countless hours trying to optimize and improve upon three20’s PhotoViewer, we ultimately decided it would be best to write our own from scratch utilizing our other open source libraries we’ve written along the way: EGOCache, EGOImageLoading, etc. Please switch to the “master” branch to view EGOPhotoViewer.
Photo Viewer is the photo viewer from Facebook’s three20 library, torn out, and freed of it’s dependency on three20. We’ve removed most of the bulk code, and it’s weighing in at a lean 800KB vs. three20’s 4.7MB, which is an awful lot for a simple photo viewer.
Photo Viewer is almost a full drop in replacement for three20, if all you’re using is the photo viewer. The only thing missing at this point (that we’re aware of), is the thumbnail view. We’re going to get this back in soon, but it wasn’t worth trying to salvage TTTableView/TTTableViewCell. We’re just going to rewrite it ourselves. As far as stability goes, nothing is promised. We haven’t seen any issues, and we have already used it in one of our apps, but be sure to test it thoroughly before you submit!
We’re also pretty sure that we’ve removed all of the issues that three20 is having with Apple’s static analyzer, causing apps to be rejected.
Building the Framework
We absolutely hate the way that you have to include three20 in your apps. So we’ve tried something different. Instead of setting up header search paths, including resource bundles, and adding the three20 xcode project file to your project, we’re created a “fmwk” bundle, so all you’ll need to do is drag that into your project, and you’re good to go.
Due to the nature of Xcode’s build system, there isn’t a good “one step” build, so to build the framework, follow these steps:
- Open PhotoViewer.xcodeproj
- Use these settings:
- Active SDK: Base SDK
- Active Configuration: Release
- Active Target: PhotoViewer-simulator
- Hit cmd+b to build simulator library
- Switch Active Taget to PhotoViewer-device
- Hit cmd+b to build device library
- Switch Active Target to PhotoViewerFramework
- Hit cmd+b to build the “fmwk” bundle
Once you’ve completed this, in your build folder there will be a folder called “Release-universal” (or Debug-universal if you used Debug), in that folder is the PhotoViewer.fmwk bundle, just drag that to your app’s Xcode Project, and you should be good to go.
As with every static library, Photo Viewer requires you to add the “ObjC” linker flag to “Other Link Flags” in your targets build settings, if you haven’t added it already.
Feel free to contact email@example.com if you need any help.
Photo Viewer is under the same Apache 2.0 license as three20:
Branched from three20 – Copyright 2008 Joe Hewitt
Copyright 2009 enormego
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.