Transforming Objects In NSArray?

Discussion in 'iOS Programming' started by Darkroom, Jul 7, 2009.

  1. Darkroom Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #1
    i have a bunch of objects (image views, buttons, sliders, etc.) in an array, and would like to shift them all at once using fast enumeration and CGAffineTransform... however, i can't seem to get it working.

    Code:
    for (id objects in theArray)
    			{
    			CGAffineTransform t = CGAffineTransformMakeTranslation(44, 0);
    			objects.transform = t;
    			}
    
    Error: request for member 'transform' in something not a structure or union

    any ideas?
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    Code:
    CGAffineTransform t = CGAffineTransformMakeTranslation(44, 0);
    
    for (id objects in theArray)
    {
         [objects setTransform:t];
    }
     
  3. Darkroom thread starter Guest

    Darkroom

    Joined:
    Dec 15, 2006
    Location:
    Montréal, Canada
    #3
    omg... :rolleyes:

    thanks PhoneyDeveloper
     

Share This Page