prevent deletion in TTLauncherView

Discussion in 'iOS Programming' started by jagatnibas, Nov 8, 2011.

  1. jagatnibas macrumors regular

    Joined:
    Jul 28, 2008
    #1
    I am using Three20 Launcher View. I am successful in doing that, one challenge is, I want to prevent deleting but editing (animation in edit mode and rearranging effect needs to remain). how is that possible ?


    thanks in advance
     
  2. jagatnibas thread starter macrumors regular

    Joined:
    Jul 28, 2008
    #2
    sorry for a dumb question

    providing canDelete=NO to TTLauncherItem helped !
     
  3. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #3
    ;) it's in the documentation, i didn't answer this question because I was sure you were going to figure it out.
    Three20 has alot of documentation around this ^_-
    Good luck.
     
  4. jagatnibas thread starter macrumors regular

    Joined:
    Jul 28, 2008
    #4
    Thanks

    i see another problem

    i put items into launcher as below
    Code:
    _launcherView.pages = [NSArray arrayWithObjects:
    							   [NSArray arrayWithObjects:
    								[[[TTLauncherItem alloc] initWithTitle:@"Item 1"
    																 image:@"bundle://Item1.png"
    																   URL:nil canDelete:NO] autorelease],
    								[[[TTLauncherItem alloc] initWithTitle:@"Item 2"
    																 image:@"bundle://Item2.png"
    																   URL:nil canDelete:NO] autorelease],
    																nil],
    							   nil
    							   ];
    

    problem is i see 2 pages in the launcher view, and in edit mode if i try dragging any item to other page results in crash, but i can rearrange in the same page innumerable times.

    how can i restrict it to only 1 page ? if i go with 1 page, what will happen when items are more ? vertical scroll ?

    secondly, how can I adjust space between rows ? and may be header and footer margin also ?

    regards
     
  5. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #5
    Maybe try explaining what your goal is, do you really want a Launcherview that will set up several Nibs, or do you want a Gridview, which will also do the same? Or you want to switch the items around etc?
    Because you asking for a vertical scroll is making me think why you really want this Launcherview effect.
     
  6. jagatnibas thread starter macrumors regular

    Joined:
    Jul 28, 2008
    #6
    well, ok

    with the above code even if i have added 2 items, I see 2 pages, and am able to horizontally flip to other page which is blank. I need to stop that, I just want everything in a single page.

    I dont need vertical scroll, i was just curious to know what happens if items are more [more than 16, as currently appears i can put maximum 16 items in my launcherview].

    regards
     

Share This Page