开发者

UIImageView error with OCUnit

开发者 https://www.devze.com 2023-02-09 12:55 出处:网络
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: \"Expe

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.

Tha开发者_如何学编程nks


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消