Try Tuts+ Premium, Get Cash Back!
Appcelerator SDK: Adding Shake, Toggle, and Random Strings to Fortune Crunch

Appcelerator SDK: Adding Shake, Toggle, and Random Strings to Fortune Crunch

Tutorial Details
  • Technology: Appcelerator SDK
  • Difficulty: Beginner
  • Estimated Completion Time: 20 - 40 Minutes

This tutorial picks up where our Introduction to Cross-Platform Development With Appcelerator tutorial left off. You will refactor the original tutorial code for maintainability and learn how to extend the functionality of the application by causing the cookie to break with the “shake” gesture, toggling the broken/unbroken state, and displaying pseudo-random strings to the end-user. In addition to the Appcelerator SDK, you must have both the iPhone SDK and the Android SDK in order to test your code on both platforms.

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://nzmedia.dk BrunO

    Hey John!
    What a great tutorial! Keep on with those series i love them! Your doing great :D.

    But to the point:
    I would like to learn to get information from the network. Like reading a RSS feed or maybe another way to get information from the web :) That could be really awesome!

    Greetings,
    BrunO

  • Axit Patel

    @BrunO I have just submitted a tutorial pitch at Mobile Tuts for my series on creating a RSS reader for iPhone. If the tutorial is selected, I will show how to create a really nice RSS reader which fetches feeds from the Tutsplus network websites by default. The user will get the option to add their own feed or delete the feeds already provided. Hope my tutorial pitch gets selected :)

    • http://nzmedia.dk BrunO

      Thats cool. Hoping to see it :)

  • Sebastian

    This was a fantastic tutorial!

    I’m slowly falling in love with titanium!

    I agree with BrunO.

    I would love to see a tutorial on building an RSS reader, or something which views XML-data!

    Regards,
    Sebastian

  • Mike

    Great, will try to extend the fortune crunch tonight.
    But why a video and not a writtin tutorial?

  • Flashmuji

    Great tutorials! Loving Titanium,

    I agree with others, showing how to load XML and parse the xml and target nodes etc.

    - Another one would be a simple video player and audio player.

    - How to transition between views! (Animate)

    - How to use viewscroller on the iphone

    - Local storage

    - Customise the look of UI Elements

    - Playing sounds

    Thanks again! Really enjoying the tutorials!

    • http://createmy.com.au Dale Hurley

      - UI Animation

      - GeoLoc

      • http://createmy.com.au Dale Hurley

        - Function Reference Guide

  • http://twitter.com/bmadigan BradM

    These Appcelerator are by far the best of the bunch (at least to me).

    You mentioned at the end that you are open for some new ideas to be pitched.

    I was going to mention that same thing as Flashmuji above stated with
    - Custom UI Elements

    Understanding it wouldn’t be a Photoshop tutorial, but rather using simple graphics as elements through the lifecyle of an app.

    Great Series! Can’t wait for more.

  • http://www.appventure.de Steven David

    I agree with every point of Flashmuji. :)
    additional: implementing landscape mode (changing between modes to be exactly)
    Any plans for special iPad related tutorials?
    …like using the split view or something like that
    CHeers

  • Zach C

    Is it possible for you guys to write a Titanium tutorial on how to make a vBulletin application?

  • http://imnogeek.com Adam

    Just wanted everyone to know that the gestures in Titanium SDK 1.4+ do not play well with iOS SDK 4.0+ and will only fire once. You are not losing your mind, this is a known bug. If you download the Titanium SDK 1.5RC they work once again like they did with iOS SDK 3.0+ :)

    That is all…

    Adam

  • Jason

    Anyone else having problems trying to get this video to load?

  • Nico

    Hello,

    A question about the resolution for the iPhone 3 and 4.

    When you create the ‘paper’ label with a fixed width (150px), and a position (80,55),
    is for the 6460×480 resolution.

    And for the iPhone 4 (resolution : 960×640), where this label will be ?

    Thank you

    paper = Ti.UI.createLabel({
    color: ‘#000000′,
    font: {fontSize: 12, fontFamily: ‘Courier’},
    width: 150,
    height: ‘auto’,
    top: 80,
    left: 55,
    textAlign: ‘left’
    });

    • http://www.francomusso.com Franco Musso

      @Nico – In the developer guide on the titanium site, they explain that measurements are actually in points (just like fonts are), not pixels. Unlike pixels, points are resolution independent, so although the pixel density differs greatly between iPhone 3GS and iPhone 4, the UI layout you create in titaniuim is based on a 320 x 480 point system for both display types.

      Don’t worry though, I’ve tested my apps on both devices and the results do look crystal clear on the retina display.

      I was a little confused by this also, as I’ve traditionally worked in pixels in flash and in CSS!

  • http://www.francomusso.com Franco Musso

    This is a brilliant follow-up to the app built in the introduction tutorial. The extras here really add value, and help expand the thinking for a noobie like me. I particularly like the approach taken when we add ‘main’ to group all the creation, assigning, etc in order to improve the flow of the app – this really made things much clearer for me when it came to editing and expanding on the functionality of the app afterwards.
    Awesome job, can’t wait to complete the next one :)