0

I am curious as to whether or not there is an open source solution to replicate the flash button in the iOS camera applicaiton.

I have seem many other apps use this, but there doesn't seem to be a native way, so I assume there is a common source out there.

It is possible to get the flash button by using UIImagePickerController class, but most of the camera apps out there don't seem to be using this (or perhaps they subclass it, which is against apple's terms).

I am looking for a way to replicate the expanding behavior of the button. Any thoughts?

i_am_jorf
  • 53,608
  • 15
  • 131
  • 222
Brett
  • 11,637
  • 34
  • 127
  • 213

4 Answers4

0

While looking for a similar solution to this problem I came across this code which was extremely helpful. Similar to ExpandyButton it fit my needs better.

https://github.com/ddebin/DDExpandableButton

mwright
  • 4,099
  • 7
  • 30
  • 40
0

It doesn't sound too hard.

The way I'd do it is to separate the right curve of the button (as images), and make a UIView that has the left part of the button and the right curve as subviews.

When it's tapped, slide the right curve and animate the extra buttons in.

EmilioPelaez
  • 18,758
  • 6
  • 46
  • 50
0

You could use a stretchable UIImage (see UIImage documentation) and then just animate the frame changing.

Dancreek
  • 9,524
  • 1
  • 31
  • 34
0

In the Apple 2010 WWDC Sample code (downloadable via iTunes, otherwise I'd post it here), there are several sample applications which use this control. They call the class ExpandyButton. I realize I'm answering my question, but hopefully someone out there can find this useful.

Brett
  • 11,637
  • 34
  • 127
  • 213
  • I would like to download this sample code, but I'm having trouble finding it. Can you be more specific about how to acquire it? – i_am_jorf Oct 27 '11 at 18:14