從Apple Documentation:設置repeatCount到1e100f給予警告
Setting the repeatCount to 1e100f will cause the animation to repeat until it is removed from the layer.
這裏是我的代碼:
CABasicAnimation *flicker = [CABasicAnimation animationWithKeyPath:@"opacity"];
flicker.repeatCount = 1e100f;
Xcode中給出了一個警告:
Semantic Issue: Magnitude of floating-point constant too large for type 'float'; maximum is 1.7014116E+38
什麼我做錯了嗎?
Googol文檔看起來不太合適。提交一份錯誤報告,看看蘋果是否知道無限循環的正確方法。 –