IPhone: Copy/Clone -



IPhone: Copy/Clone -

i want re-create or clone object of own written class. if phone call re-create function pointer copied. if alter copied object original object changed, too.

is there way/function clone object?

best regards melanie

an object can copied if class adopts nscopying protocol , implements single method, copywithzone:.

see object copying

- (id)copywithzone:(nszone *)zone{ myclass *copy = [[[self class] allocwithzone: zone] init]; [copy setproperty1:[self property1]]; homecoming copy; }

iphone copy clone

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -