Search code examples
xcodeidentifier

Expected identifier or "(" when adding picker


Hello I am getting this error when i attempt to add a picker :UIViewController UIImagePickerControllerDelegate ... Any suggestions..thanks

#import <UIKit/UIKit.h>
#import "GPUImage.h"
#import "GPUtutorialCell.h"

@interface GPUtutorialViewController :UIViewController <UIImagePickerControllerDelegate>


UIViewController { //expected identifier or "("
    NSMutableArray *filterNames;



}


- (IBAction)Load:(id)sender;

- (IBAction)Save:(id)sender;


@property (weak, nonatomic) IBOutlet UIImageView *imageView;
@property (weak, nonatomic) IBOutlet UITableView *filtersTable;


@end

Solution

  • UIViewController { //expected identifier or "("
        NSMutableArray *filterNames;
    }
    

    It looks like you're trying to declare an instance variable. But a stray UIViewController has worked its way into your code. Delete it. Like this:

    {
        NSMutableArray *filterNames;
    }