1
我注意到,當您在UIImageView的圖層屬性上設置shadowpath時,它會殺死圖像質量。有人能告訴我爲什麼會發生這種情況,以及正確的做法是什麼?UIImageview shadowpath
imageView.layer.shouldRasterize = YES;
imageView.layer.shadowPath = [UIBezierPath bezierPathWithRect:imageView.bounds].CGPath;
更新
這是光柵化規模。您需要將其設置爲屏幕的比例。否則在創建位圖時使用非視網膜圖像!
'view.layer.rasterizationScale = [UIScreen mainScreen] .scale';) – mattsven
多數民衆贊成在奇怪的,我想光柵化規模將默認爲。我不應該假設哈哈。 – Ohmnastrum
我知道這個問題,並且犯了同樣的錯誤!花了20分鐘試圖弄清楚發生了什麼 – mattsven