XCode Build Parse Error 'Unexpected @ in Program'

Posted by Grymjack on Stack Overflow See other posts from Stack Overflow or by Grymjack
Published on 2012-11-25T17:01:59Z Indexed on 2012/11/25 17:03 UTC
Read the original article Hit count: 1623

Filed under:
|
|
|

I'm following a tutorial for creating an animation using Xcode Version 4.5.2 in Mountain Lion 10.8.2. When trying to build the code below, I get a Parse Error Unexpected '@' in program showing up for the 'hopAnimation=' line. While searching, I have found examples that build simple animations in a different way, but nothing that seems to address this particular problem. I'm a noob to XCode programming and if anyone could help me correct the syntax, I would highly appreciate it. I would also like to thank all the contributors to stackflow for making this such a valuable resource. Searching for the answers to most of my prior questions always seemed to have you guys at the top of the results list.



    ViewController.m
    - (void)viewDidLoad
    {
        // load all the frames of our animation into an array
        NSArray *hopAnimation;
        hopAnimation=[[NSArray alloc] arrayWithObjects:
                      [UIImage imageNamed:@”frame-1.png”],
                      [UIImage imageNamed:@”frame-2.png”],
                      [UIImage imageNamed:@”frame-3.png”],
                      [UIImage imageNamed:@”frame-4.png”],
                      [UIImage imageNamed:@”frame-5.png”],
                      [UIImage imageNamed:@”frame-6.png”],
                      [UIImage imageNamed:@”frame-7.png”],
                      [UIImage imageNamed:@”frame-8.png”],
                      [UIImage imageNamed:@”frame-9.png”],
                      [UIImage imageNamed:@”frame-10.png”],
                      [UIImage imageNamed:@”frame-11.png”],
                      [UIImage imageNamed:@”frame-12.png”],
                      [UIImage imageNamed:@”frame-13.png”],
                      [UIImage imageNamed:@”frame-14.png”],
                      [UIImage imageNamed:@”frame-15.png”],
                      [UIImage imageNamed:@”frame-16.png”],
                      [UIImage imageNamed:@”frame-17.png”],
                      [UIImage imageNamed:@”frame-18.png”],
                      [UIImage imageNamed:@”frame-19.png”],
                      [UIImage imageNamed:@”frame-20.png”],nil];

        self.bunnyView1.animationImages=hopAnimation;
        self.bunnyView2.animationImages=hopAnimation;
        self.bunnyView3.animationImages=hopAnimation;
        self.bunnyView4.animationImages=hopAnimation;
        self.bunnyView5.animationImages=hopAnimation;
        self.bunnyView1.animationDuration=1;
        self.bunnyView2.animationDuration=1;
        self.bunnyView3.animationDuration=1;
        self.bunnyView4.animationDuration=1;
        self.bunnyView5.animationDuration=1;
       [super viewDidLoad];
    }

© Stack Overflow or respective owner

Related posts about xcode

Related posts about parsing