wibosco
wibosco

Reputation: 967

UIImageView error with OCUnit

am using OCUnit to test my application however am running into some trouble. When I attempt to include a class that contains an instance variable of type UIImageView, I get the following error: "Expected specifier-qualifier-list before UIImageView"

My declaration code is:

UIImageView *_icon;

I can't work out whats causing this and it only happens when I attempt to build my application using my test target.

Thanks

Upvotes: 1

Views: 233

Answers (1)

Nick Curran
Nick Curran

Reputation: 484

Your test target doesn't know what UIImageView is. It needs its own precompiled-header referencing UIKit (or you could import UIKit in that file), and it needs to link that framework.

Upvotes: 2

Related Questions