2011-01-14 58 views

回答

1

您可以檢查功能是通過下面的結構支持:

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

你可以打包到這#define宏,使使用更方便。

編輯:錯過了「@selector(...)」中的雙冒號