Need help with first app "Flash Cards"

Discussion in 'iOS Programming' started by Greg Levy, Mar 12, 2009.

  1. Greg Levy macrumors newbie

    Joined:
    Mar 12, 2009
    #1
    Hi,

    I've read a book on Objective C programming, Beginning iPhone Development(iphone SDK). Downloaded iPhone SDK and watched all of Apple's videos on it's Developer's page.

    I need help guidance on my first application. I would like to make an application that would be like flash cards and have a small quiz.

    I think the way to start is to use something like Apple' sample code of "Sample Drill Down".

    Any suggestions?

    Thanks
    Greg
     
  2. johnnyjibbs macrumors 68030

    johnnyjibbs

    Joined:
    Sep 18, 2003
    Location:
    London, UK
    #2
    It sounds from your post like you do not have much programming experience so please forgive me if the advice I am giving is too beginner level.

    If you're going to be using UIKit to build the interface, then you are going to need to use view controllers and table views.

    I was new to all this a few months ago and with very little experience I started off getting a view up and running with a couple of buttons made from Interface builder. Then, I could build the code that would make the buttons do something (similar to the classic "Hello World" sample apps).

    Since then, I've added new view controllers and their views and then pretty much ditched Interface Builder and do everything programmatically.

    Start simple. I'm not exactly sure what 'flash cards' is but it sounds like you'll need a table view (UITableView). Create an array of simple data that will form the items in the table view list and work from there. For example, a simple table view with a list of items could be made from the following piece of data:

    Code:
    NSArray *myTableDataArray = [NSArray arrayWithObjects:@"List Item 1", @"List Item 2", @"List Item 3", nil];
    This would produce a simple list with those items (in this case simple strings) as different rows. There are then various methods that are called (e.g. tableView:didSelectRowAtIndexPath) to let you execute code when the user does something (in this case select a particular item in the list). So when a user clicks on a cell at that index path (which gives the row number and table section if applicable), you could then push a new view controller onto your stack and go to a 'detail level' view of that item.

    It took me a while to get my head around the Model-Controller-View paradigm and all the millions of files (.m and .h) that make up an application so it is worth starting small and simple first. Follow some tutorials and then try to adapt the code to make it your own. Then, at some point (a couple of months), it should start to click and you'll find less reliance on the tutorials and can do more on your own. That's how I started.

    Don't expect to get your first app out in a week if you don't have any experience - but it won't take many months to get to grips with it (it's taken me 3-4 months and I've been working full time as well).

    Good luck and hope it goes well.
     

Share This Page