Skip to content

Instantly share code, notes, and snippets.

@ericboehs
Created February 4, 2014 12:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericboehs/8802543 to your computer and use it in GitHub Desktop.
Save ericboehs/8802543 to your computer and use it in GitHub Desktop.
diff --git a/app/controllers/add_photos.coffee b/app/controllers/add_photos.coffee
index db7e209..b269ecb 100644
--- a/app/controllers/add_photos.coffee
+++ b/app/controllers/add_photos.coffee
@@ -7,6 +7,13 @@ $.photoOptionDialog.addEventListener "click", (e) ->
newPhoto() if e.index is 0
existingPhoto() if e.index is 1
+cachick = Ti.UI.createButton
+ title: 'CACHICK'
+
+cachick.addEventListener 'click', ->
+ cachick.title = 'Done' if $.photos.children.length >= 2
+ Ti.Media.takePicture()
+
receivePhotoCallbacks =
success: (event) ->
image = event.media
@@ -67,8 +74,14 @@ receivePhotoCallbacks =
)
newPhotoButton.addEventListener 'click', -> showPhotoOptionDialog()
$.photos.add(newPhotoButton)
+ if $.photos.children.length >= 3
+ Ti.Media.hideCamera()
+ transform: Titanium.UI.create2DMatrix().translate(0, 75).scale(1.35)
+ overlay: cachick
+ showControls: false
saveToPhotoGallery: false
+ autohide: false
mediaTypes: [Ti.Media.MEDIA_TYPE_PHOTO]
newPhoto = ->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment