How to change iphone CATiledLayer fadeDuration?

后端 未结 3 736
一生所求
一生所求 2020-12-31 02:45

I am working on an iphone application that displays tiled maps. I am currently using a CATiledLayer in a UIScrollView :

     MyTiledDelegate *delegate=[[MyTi         


        
3条回答
  •  情话喂你
    2020-12-31 03:23

    You should subclass the CATiledLayer and return fadeDuration of 0 to disable fade-in:

    @interface FastCATiledLayer : CATiledLayer
    @end
    
    @implementation FastCATiledLayer
    +(CFTimeInterval)fadeDuration {
      return 0.0;
    }
    @end
    

    I also had the problem with fade in animation not completing, what helped was to set the background color of the view to [UIColor clearColor]

提交回复
热议问题