More tutorials on how to make applications?

Discussion in 'iOS Development' started by Clash, Jun 1, 2008.

  1. Clash

    Clash New Member

    Joined:
    Dec 16, 2007
    Messages:
    137
    Likes Received:
    0
    I have read Skylar's tutorial, it's great, but it's sorta small, I didn't learn much stuff...
    Where can I read about other stuff like other GUI elements, how to draw an image at certain position, how to treat events like pinch, touch on the screen, etc? Are there open-source apps I can look into?
    Thanks in advance!
  2. Nickll9009

    Nickll9009 New Member

    Joined:
    Sep 19, 2007
    Messages:
    1,367
    Likes Received:
    8
    Device:
    iPod touch
    PM me I can help you!
  3. Clash

    Clash New Member

    Joined:
    Dec 16, 2007
    Messages:
    137
    Likes Received:
    0
    PMed.
    Btw: I have experience on coding with C++ and C, is there a quick tutorial from C/C++ to Obj. C?
    Thanks in advance guys! I look forward making games for the touch
  4. vieestchien

    vieestchien New Member

    Joined:
    May 7, 2008
    Messages:
    43
    Likes Received:
    1
    Try out iPhone Open Application Development book, it covers the basics for UI development. I used it when I was getting familiar with ObjC and it was pretty good. There were some minor errors in the book though. Then once you have a good grasp of how to program UI in iPhone, read the header file of each component, from the method declaration you should be able to figure out how to use them.
  5. optimo

    optimo New Member

    Joined:
    Sep 28, 2007
    Messages:
    535
    Likes Received:
    17
    Obj-C is still C, you can use C functions and standard C libraries
    C++, of course you know, is in another category alltogether and not directly compatible

    so, you can create lots of stuff with C-style programming, and then use the obj-C parts to call the API methods
  6. God__

    God__ New Member

    Joined:
    Dec 23, 2007
    Messages:
    69
    Likes Received:
    0
    I happen to know for a fact that Skylar's PocketTouch app mixes in C with the Objective-C. Also, the calls to the phone's vibrator can be made with either C or C++. I'm not sure which method he used to call the control that (CoreTelephony vs MeCCA), but the point is that is is perfectly acceptable to mix and match languages.

    Whichever is the most efficient way to get the job done.




    Now, to answer the fruit of your question. Most of what differentiates Objective-C from standard C based languages (aside form syntax, etc) is the use of the NextStep platform. Read up on this as best you can, because this is the base of the language. Once you have that down, the UI comes easy. The cvast majority of it is already done for you via the Apple APIs.

    It's so easy that most absolute beginners should be able to make the most basic of apps without scratching their heads too much. ie: FWChanger.

    Good luck, and if you have any questions, I've had a hand, small or large, in more apps than you could probably guess. Feel free to ask anything you may need to know.





    EDIT: God__ is a pseudonym.
  7. hitman2992

    hitman2992 New Member

    Joined:
    Dec 10, 2007
    Messages:
    123
    Likes Received:
    0
    Device:
    iPhone 3GS (Black)
    yes that is a great book it helped me so much
  8. Clash

    Clash New Member

    Joined:
    Dec 16, 2007
    Messages:
    137
    Likes Received:
    0
    Hi! Thanks a lot for the comments. I do indeed have a doubt, it's quite noobish though. I'm having trouble changing the position of the image, actually it's more than one doubt
    I want to make a simple moving ball (it collides with the walls), first of all, which variable type should I use UIImage, UIImageView, UIClippedImageView? I'm a little lost concerning that. I know how to change the image position using UIClippedImageView, but that's not what I want. The clipped image "appears to be a moving window revealing different portions of the image", while what I want is simply an image moving across the screen.
    On the clipped image view we have the method setOriginAdjustingImage, but that does not exist for UIImage neither UIImageView. UIImageView barely has any method and at UIImage there is the method compositeToPoint, which I believe is what I'm looking to. But my question is, if UIImage is what I need, how do I draw it?
    Thanks in advance
  9. God__

    God__ New Member

    Joined:
    Dec 23, 2007
    Messages:
    69
    Likes Received:
    0
    What you are looking for is in the CoreGraphics framework. IAppADay source code is easy to find and does a lot with this framework. Specifically, I'm going to recommend that you look into CGAffeine, etc.

    I'm not going to give you the answer, I think you'll figure it out. : )


    EDIT: If you don't want to position to be animated, you can just set the origin of the view's viewRect to a different point (CGPoint), as done in PocketTouch (the play and Shaker icons on the main play screen). But I don't think this is what you want. I suppose, if you want to be extremely lazy, you could simply create a loop that moves that offsets the UIImageView by one pixel each time it iterates. Although I DON'T recommend that.
  10. Clash

    Clash New Member

    Joined:
    Dec 16, 2007
    Messages:
    137
    Likes Received:
    0
    I'm very grateful for your help, I believe I have found what I needed, I should be using UIImageView and the method setOrigin to set it's position. Found it on Hockey code on IAppADay (thanks a lot, there's a lot of code there).
    Ok, so this brings me to the next question. The game I want to make is simple, but the quantity of objects is variable. This quantity can only be determined at run time, the player will create walls with his finger. What I need is NSMutableArray? I took a fast look at it (I'm at college's PC, not at home), but I didn't see anywhere defined the type of variable I can insert in there, so I suppose I can insert whatever(UIImageView for example) I want in there? When I retrieve it must do I do some sort of cast?
    If I make 8x8 (px) walls, means I can have up to 2400 objects, is that ok? Any recommendation? Oh and I should tell it to cache de image of the wall, correct?
    Thanks in advance!

    PS: I didn't find CGAffeine

Share This Page