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(...)"
精彩评论