share
Stack OverflowOpen source iOS components? Reusable views, controllers, buttons, table cells, etc?
[+439] [26] Ian Terrell
[2009-03-12 22:50:41]
[ iphone ios ipad open-source ]
[ http://stackoverflow.com/questions/640805/open-source-ios-components-reusable-views-controllers-buttons-table-cells-e ] [DELETED]

Are there any repositories around for open sourced iPhone and iPad components?

For instance, I have found myself needing to create several new types of table cells to mimic some of Apple's existing functionality (for instance, all the different types of table cells present in the Settings application). I can't imagine I'm alone here.

Where do you go to find open sourced reusable components, or do you just write and hoard your own?

Update: I know there are open source full projects around ( see this question [1]), but rummaging through them and picking and choosing still leads to significant duplication of effort.

Meta: There's a site for that!

There's a new nicely browsable list of iOS controls at http://cocoacontrols.com/.

Ongoing List

Here are some libraries that I've found or been told about (even answered here) since asking this question:

(4) Three20 is probably the most extensive and helpful component library for iPhone that I've seen so far. - Adam Woś
(4) As per what I've heard, Three20 is overkill if you're looking for simple subclassed UI components. Is anyone up for starting a new repository for open source subclassed UI components? I'm game.... (and I'm decent at UI programming for iPhone). - Sid
(13) There is cocoacontrols.com - theraven
(3) ASIHTTPRequest is being deprecated by the author; a good alternative for most needs is restkit.org (or on GitHub at github.com/RestKit/RestKit). - Robert Altman
(2) Just wanted to mention that I've had a great experience with QuickDialog. Very nice library for quickly making user entry forms. - nazbot
@nazbot great to hear that, glad you liked it! - Eduardo Scoz
(1) I voted to reopen. I feel that the question is constructive. In particular, I feel that answers can be "supported by facts, references and specific expertise" and that it is unlikely to "solicit debate, arguments, polling or extended discussion." - Roger Dahl
(1) Very helpful question. Too bad the narrow minded interpretation of this site sees this as not constructive - Rydell
[+130] [2011-04-17 02:03:56] MattDiPasquale [ACCEPTED]

Here are some good iOS open-source libraries/frameworks & projects:

UI Libraries & Frameworks

Networking

  • General
  • REST
    • RestKit [13]: Makes interacting with RESTful web services simple, fast and fun
    • HTTPRiot [14]: A simple HTTP REST Library
    • ObjectiveResource [15]: Makes interacting with Ruby on Rails applications dead simple
  • Sockets
    • AsyncSocket [16]: TCP/IP socket networking library that wraps CFSocket and CFStream
    • Zimt [17]: HTML5 Websockets

Core Data

Projects

Game Libraries & Frameworks

Testing Libraries & Frameworks [25]

[1] http://sstoolk.it/
[2] https://github.com/devinross/tapkulibrary
[3] http://gabriel.github.com/gh-kit/
[4] http://three20.info/
[5] https://github.com/jdg/MBProgressHUD
[6] http://www.dejal.com/developer/dsactivityview
[7] https://github.com/mattgemmell/MGImageUtilities
[8] https://github.com/mattgemmell/MGTwitterEngine
[9] https://github.com/thermogl/TISwipeableTableView
[10] https://github.com/acani/AcaniChat
[11] http://stackoverflow.com/questions/4163847/open-source-photo-viewer-for-iphone
[12] https://github.com/AFNetworking/AFNetworking#readme
[13] http://restkit.org/
[14] http://labratrevenge.com/httpriot/docs/
[15] http://iphoneonrails.com/
[16] http://code.google.com/p/cocoaasyncsocket/
[17] https://github.com/esad/zimt
[18] http://rentzsch.github.com/mogenerator/
[19] https://github.com/jpick/twitterfon
[20] https://github.com/nmock/artisan-ios
[21] http://www.cocos2d-iphone.org/
[22] http://www.sparrow-framework.org/
[23] http://www.box2d.org/
[24] https://github.com/Eskipol/Chipmunk-iOS-framework
[25] http://stackoverflow.com/questions/4114083/ios-tests-specs-tdd-bdd-and-integration-acceptance-testing

1
[+35] [2009-03-14 03:06:47] instcode

Not many people build open-sourced components for iPhone because they would use their time to build up applications and sell them on AppStore. :-) But lots of people are kind enough to give all their efforts for free. As John Fricker suggested, you will get a huge number of iPhone projects by taking: http://code.google.com/search/#q=UIKit

If you want a "Settings Table"-liked component, it's here: http://code.google.com/search/#q=UIPreferencesTable (UIPreferencesTable is one of unofficial APIs in iPhone SDK). First result is worth to read: http://code.google.com/p/iphone-placemaps/


2
[+26] [2011-08-08 17:10:46] object2.0

i think all the answers are missing a point here.

Here are the sites from were you can find reusable components

1) http://cocoacontrols.com/

2) http://open.iphonedev.com/

3) http://cocoaobjects.com/

Here is the twitter account where you can find popular reusable components on github about iPhone or iPad 4) https://twitter.com/#!/github_objc

as answered here Is there a gallery of reusable iPhone components on the web? [1]

[1] http://stackoverflow.com/questions/843167/is-there-a-gallery-of-reusable-iphone-components-on-the-web/6891857#6891857

3
[+15] [2011-05-24 09:05:47] PeyloW

I have released three new Open Source projects on github the last month.

CWFoundation - Augmenting the Foundation framework [1]

  • Conditional logging
  • Network monitoring
  • XML to domain object translations
  • Concurrency additions to NSObject and NSOperationQueue
  • And a bunch of small convenience stuff

CWUIKit - Additions to UIKit [2]

  • Block based callbacks for UIAlertView and UIActionSheet
  • A Callout view like in MapKit
  • Column table view, like UITableView but with multiple columns
  • Linear layout view for dynamically sizing views
  • And many many more views and additions to make UI building easier

CWCoreData - Making it easy to work with several managed contexts [3]

  • Lazy creation of default Core Data objects
  • Thread local NSManagedObjectContext instances
  • And a bunch of convenience methods for common tasks

I have also written a longer blog post on the topic of open source on iOS called The state of iOS Open Source - and what to do about it [4]. The truth is that there is a lot of open source code out there, but most of it is not well packaged for re-use and collaboration.

[1] https://github.com/jayway/CWFoundation
[2] https://github.com/jayway/CWUIKit
[3] https://github.com/jayway/CWCoreData
[4] http://blog.jayway.com/2011/05/16/the-state-of-ios-open-source-and-what-to-do-about-it/

4
[+10] [2009-06-11 13:15:09] Dana Holt

cocos2d-iphone [1] is a great 2D game engine with a built-in physics engine.

[1] http://code.google.com/p/cocos2d-iphone/

5
[+9] [2009-03-13 03:04:24] John Fricker

code.google.com has too many to name.

Also WordPress released their iPhone app open source here [1]

[1] http://iphone.wordpress.org/

6
[+8] [2010-04-18 21:10:23] Andy Waite

I've been working on a library of re-usable components which can be found at http://github.com/huddletech/HTFramework


7
[+7] [2010-07-27 14:50:11] xmr

Core Plot [1] - a plotting framekwork for iOS and Mac development. It's open source and very flexible.

[1] http://code.google.com/p/core-plot/

8
[+7] [2011-04-17 02:30:22] Bavarious

Cocoa Objects [1] is a repository that lists open source, reusable Objective-C code for Mac OS and iOS.

[1] http://cocoaobjects.com

9
[+6] [2012-05-26 12:35:46] Shmidt

AudioPanel - sliding panel that can play and record sound. Also it can import sound from iPhone/iPad Music Library.

https://github.com/shmidt/AudioPanel/wiki


10
[+5] [2009-03-12 23:09:15] Andrew Grant

I don't know of any control-specific repositories, but there are a number of open-source iPhone projects around that can be helpful for mimicking behavior.


11
[+5] [2010-07-03 01:49:30] Linas

Make sure you double-check the component's license.

If it's MIT or Apache then most of the times you're OK, but if it's GPL, you need to either release the source code of the application you're writing or ask the original author for an permission to use the component.


12
[+5] [2011-10-21 15:24:45] CBanga

If you're looking for examples of free game source, here's a great one called Tap Blaster HD. Complete game source available for download - http://9magnets.com/freebies.html


13
[+5] [2012-06-12 07:07:03] Ilker Baltaci

An extendable message input toolbar like the native messages app has.

https://github.com/brandonhamilton/inputtoolbar


14
[+5] [2012-06-20 09:37:57] Lalith B

A few libraries which helped a lot for implementing chat in iOS, hope it helps others too.

socketio-cocoa - https://github.com/fpotter/socketio-cocoa

// using

  1. https://github.com/erichocean/cocoa-websocket (link is broken, see forks [1] on github)
  2. http://regexkit.sourceforge.net/RegexKitLite/
  3. https://github.com/stig/json-framework/
  4. http://allseeing-i.com/ASIHTTPRequest/
[1] https://github.com/search?q=cocoa-websocket

15
[+4] [2011-01-22 16:19:05] Schrockwell

Tapku [1] looks like another nice one.

[1] https://github.com/devinross/tapkulibrary

16
[+4] [2011-02-15 13:34:10] Andrey Tarantsov

I just started a collection of open-source self-contained (.h/.m, not external deps) components at https://github.com/andreyvit/SoloComponents-iOS, published three of my own components there initially.


17
[+4] [2012-06-08 09:25:52] Aruna Lakmal

You can find very convient progress HUD in linke below https://github.com/samvermette/SVProgressHUD


18
[+3] [2009-03-13 03:33:49] hhafez

I was thinking about this just yesterday, there are so many Open Source projects out there that could be ported to the iphone but they aren't, obviously a most of it is not relevant to the iphone (anything use X for example) :)

I think the community needs something like Macports but for the iphone (iphonePorts??) of course many of the existing open source applications won't be relevant but the libraries can be extremly useful. I am currently looking into porting TTS library to iphone (see my question here [1] )

[1] http://stackoverflow.com/questions/637616/open-source-text-to-speech-library

19
[+3] [2011-04-17 02:22:33] TomSwift

TSAlertView drop in replacement for UIAlertView with additional features and customization:

https://github.com/TomSwift/TSAlertView


20
[+3] [2011-05-10 11:06:02] Felipe Sabino

There is a very gost post on oleb.net about the best ios and mac development related links, with several components and tutorials.

http://oleb.net/blog/2011/05/best-ios-and-mac-development-related-links-april-2011/

And one excelent library that has not been said here yet is ASIHTTPRequest

http://allseeing-i.com/ASIHTTPRequest/


21
[+3] [2011-07-02 10:34:05] Ali El-sayed Ali

Custom UISwitchView, enables you to add your own colors and label instead of on/off.

https://github.com/alinux/iPhone-custom-switch-UIView


22
[+3] [2011-09-04 19:20:19] Dimitris

You can also have a look at my random collection of components on GitHub. It's stuff I couldn't find (that's why I coded them) so you might be lucky and find what you need:

https://github.com/doukasd/iOS-Components


23
[+3] [2011-09-19 06:48:14] darvids0n
  • Interesting that no-one's flagged this one yet: NGMoviePlayer [1]. I had to recreate the .xib but that's no biggie. It's a great starting point for an AVPlayer [2]-based media player.
  • Not technically a 100% iOS component, but I LOVE QuincyKit [3], it makes iOS crash reporting so much easier.
  • TBXML [4] is my XML library of choice. The SudzC [5] website uses TouchXML [6], which isn't bad either.
  • dimzzy's ViewsCache [7] project provides a simple, clean implementation of dequeueReusableViewWithIdentifier (abstracting UITableViewCell's reusability to UIViews). I have had some success implementing a custom grid control with this (similar to AQGridView [8], although since I found that I'm using it instead).
  • pixelfreak already posted json-framework for JSON parsing, but I'd say use JSONKit [9] instead. Why? Performance [10].
[1] https://bitbucket.org/brentsimmons/ngmovieplayer
[2] http://developer.apple.com/library/ios/#documentation/AVFoundation/Reference/AVPlayer_Class/Reference/Reference.html#//apple_ref/occ/cl/AVPlayer
[3] http://quincykit.net/
[4] http://www.tbxml.co.uk/TBXML/TBXML_Free.html
[5] http://www.sudzc.com/
[6] https://github.com/TouchCode/TouchXML
[7] http://code.google.com/p/dizbits/source/browse/#svn/trunk/ViewsCache
[8] https://github.com/AlanQuatermain/AQGridView
[9] https://github.com/johnezang/JSONKit/
[10] https://github.com/johnezang/JSONKit/wiki/Performance

24
[+2] [2011-06-15 00:28:44] pixelfreak

I see no mention of JSON parser/generator. What do you think about this one: http://stig.github.com/json-framework/

Also for regular expression support: RegexKitLite [1]

[1] http://regexkit.sourceforge.net/RegexKitLite/

25
[+2] [2011-06-24 16:01:32] xydev

One of the best share component AddThis [1]

[1] https://www.addthis.com/get-addthis

26