我正在使用以編程方式從按鈕製作陰影的標準方式,但是我想在使用按鈕完成後不再存在陰影。我可以將不透明度設置爲0,但影子是否仍然存在,如果是這樣,它仍會對系統徵稅。感謝我如何刪除iPhone中的陰影
這給出了一個錯誤
tempButton.superview.layer.shadowOffset = nil;
tempButton.superview.layer.shadowRadius = nil;
tempButton.superview.layer.shadowOpacity = nil;
可能重複的[iOS添加/從視圖中刪除陰影](http://stackoverflow.com/questions/16751163/ios-add-remove-shadow-from-a-view) – Fattie