Difference between revisions of "CALayerHost"

From iPhone Development Wiki
Jump to: navigation, search
(Added info on how touches are delivered)
m (References)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
[[CALayerHost]] is a [[CALayer]] subclass which renders another layer's render context. It allows touches to be passed directly to the process in which the layer is displaying. Touches are delivered to [[backboardd]] by [[IOKit]], which then calls the current '''CAWindowDisplayServer''''s ''-contextIdAtPosition:'' method to retrieve the context ID that the touches should be sent to.
+
[[CALayerHost]] is a [[CALayer]] subclass which renders another layer's render context. It also allows touches to be sent directly to the process which contains the original [[CALayer]]. Touches are delivered to [[backboardd]] by [[IOKit]], which then calls the current [[CAWindowDisplayServer]]'s ''-contextIdAtPosition:'' method to retrieve the context ID that the touches should be sent to.
  
 
{{function signature
 
{{function signature
Line 7: Line 7:
 
Setting this property makes the [[CALayerHost]] display the context of the layer that has that contextId.
 
Setting this property makes the [[CALayerHost]] display the context of the layer that has that contextId.
  
== References ==
+
== External links ==
 +
 
 
{{IPFHeader|QuartzCore|.framework|2}}
 
{{IPFHeader|QuartzCore|.framework|2}}

Latest revision as of 05:11, 26 October 2014

CALayerHost is a CALayer subclass which renders another layer's render context. It also allows touches to be sent directly to the process which contains the original CALayer. Touches are delivered to backboardd by IOKit, which then calls the current CAWindowDisplayServer's -contextIdAtPosition: method to retrieve the context ID that the touches should be sent to.

Signature @property(assign) unsigned contextId;
Available in 2.0 –

Setting this property makes the CALayerHost display the context of the layer that has that contextId.

External links