launcher like screen

Discussion in 'iOS Programming' started by chhoda, Apr 13, 2010.

  1. chhoda macrumors 6502

    Joined:
    Oct 25, 2008
    #1
    In one of the appstore apps I saw a launcher like screen, applications various categories were aligned in 3 x 3 square and a navigation bar, when any of the icons pressed, they oscillate as in launcher and navigation bar is in edit mode. it also has two dotted control at the buttom.

    is there a known way of doing this ? or the programmer has done all these with immaculate painting. The app is Glucose Buddy

    --CH
     
  2. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    There is no built-in control or view for this. They will have coded it all themselves.
     
  3. chhoda thread starter macrumors 6502

    Joined:
    Oct 25, 2008
    #3
    if that is the case how is drag drop and exchange is made ? any drag drop examples ?

    how is shaking done when long clicked and icon popup when long clicked ?

    --CH
     
  4. robbieduncan Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #4
    I imagine lots of core animation. You need to ask yourself what is going on at each stage. Lets assume that each icon is a UIImageView (or a custom subclass of it) held within a larger view. You can easily detect when a touch and hold event starts. At this stage you start the shaking (rotations using the transform property). You will need to detect the end of each rotation and then rotate the other way. I suggest some randomisation of direction and length of animation.

    Once they are all shaking you can easily detect when one is touch/held/dragged and update it's frame to follow the drag. Using some pretty basic maths you can work out the grid position it's currently over and ensure that position is empty by setting the frames of the other views (animated of course) to get them out of the way.

    Note I've not done any of this and have just typed this straight into here. As far as I am concerned working this out is a core programming skill that you seem to be trying to avoid: Look at the problem and break it down in to smaller problems until each problem is small enough that you can solve it in code.

    And before you ask: no I'm not going to provide "sample code" that you can rip-off and use.
     
  5. simon-says macrumors regular

    Joined:
    May 24, 2005
    Location:
    Shreveport, LA
    #5
    You should check out the Three20 project. There is a launcher like view in it. After downloading the code, check out the samples and the TTCatalog sample. Look for the Launcher example when it loads. The classes you will be looking for are TTLauncherView.

    I've only played with making my own launcher once, nothing more than the sample. Fairly simple.

    http://github.com/facebook/three20
    http://three20.info/
     
  6. chhoda thread starter macrumors 6502

    Joined:
    Oct 25, 2008
    #6
    thanks, i was able to run it and see the launcher like screen.

    but it looked a little advanced obj C code. can you shade a few lights how did you use that in your code ?

    --CH
     

Share This Page