¡@

Home 

2014/10/15 ¤U¤È 10:05:08

iphone Programming Glossary: cloneview

iOS iPhone is it possible to clone UIView and have it draw itself to two UIViews?

http://stackoverflow.com/questions/10365735/ios-iphone-is-it-possible-to-clone-uiview-and-have-it-draw-itself-to-two-uiviews

frame sizes. Header of the View you want to clone @interface SrcView UIView @property nonatomic readonly strong UIView cloneView @end @interface CloneView UIView @property nonatomic weak UIView srcView id initWithView UIView src @end implementation.. implementation of the View you want to clone #import SrcView.h #import CloneView.h @implementation SrcView @synthesize cloneView void drawLayer CALayer layer inContext CGContextRef ctx cloneView setNeedsDisplay UIView cloneView if cloneView cloneView.. CloneView.h @implementation SrcView @synthesize cloneView void drawLayer CALayer layer inContext CGContextRef ctx cloneView setNeedsDisplay UIView cloneView if cloneView cloneView CloneView alloc initWithView self return cloneView @end @implementation..