What could be causing this error in Objective-C?
I have the following code:
  - (void) setConstrainedTransform: (CGAffineTransform) aTransform
{
    imageView.transform = aTransform;
    CGAffineTransform concat;
    CGSize asize = imageView.frame.size;
    if(asize.width开发者_StackOverflow > MAXZOOM * originalSize.width)
    {
        concat = CGAffineTransformConcat(imageView.transform, CGAffineTransformMakeScale((MAXZOOM * originalSize.width / asize.width), 1.0f));
        imageView.transform = concat;
    }
}
where MAXZOOM is defined as 2.0f. 
The problem is, it shows the following error:
Expected ')' before ';' token;
I tried everything I could think of to solve it, but could not succeeded. Does anyone know what could be causing this error and how I could fix it?
Maybe you have defined the macro with a trailing semicolon?
//                  v
#define MAXZOOM 2.0f;
If so, remove that and see if the issue persists.
Just assuming: did you put a ; at the end of the #define ?
Remove that, it will be put where you use MAXZOOM. 
So instead of
#define MAXZOOM 2.0f;
make it
#define MAXZOOM 2.0f
 
         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论