开发者

imageView.contentScaleFactor = 1.0; error in 3.2 sdk. How do I solve the problem?

I get error in 3.2 sdk. imageView.contentScaleFactor = 1.0; error: request for member 'contentSc开发者_StackOverflowaleFactor' in something not a structure or union. How do I solve the problem?


You may check if the function is supported by using the following construct:

if( [imageView respondsToSelector:@selector(setContentScaleFactor:)] ) {
    [imageView setContentScaleFactor: 1.0];
} else {
    // Function not supported, work around the issue
}

You could pack that into a #define macro to make usage easier.

EDIT: Missed double colon in "@selector(...)"

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜