Pregunta

I have 2 classes:

  • XCALayer derived from CALayer
  • XCATextLayer derived from CATextLayer

I've created XCALayer+FrameMucking.h category that allows me easily adjust XCALayer's frame. The thing is that I would like to use it also for XCATextLayer, but without duplicating all the code. Is it possible to use my category for both XCALayer and XCATextLayer?

¿Fue útil?

Solución

If you are just changing the frame of XCALayer and XCATextLayer you should be able to add a category to CALayer since frame is a property of CALayer.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top