this structure of objects
in mylist.hcode:mylist(nsobject): items(nsmutablearray) | |__item(nsobject) | | | |__ itemkey + itemdescription | |__item(nsoject) | |__ itemkey + itemdescription
in appdelegate.mcode:@interface mylist : nsobject <xmldata,nscoding> @property (nonatomic, copy) nsmutablearray *items;
in testclass.mcode:@implementation appdelegate @synthesize window = _window; @synthesize navigationcontroller = _navigationcontroller; @synthesize mylist, ; - (bool)application:(uiapplication *)application didfinishlaunchingwithoptions:(nsdictionary *)launchoptions { nslog(@"appdelegate loaded @ beginning"); mylist = [[mylist alloc] init]; nslog(@"mylist items class of %@",nsstringfromclass([mylist.items class])); - (void) check { nslog(@"mylist items class of %@",nsstringfromclass([wishlist.items class])); }
after running program,this result debugercode:// override support editing table view. - (void)tableview:(uitableview *)tableview commiteditingstyle:(uitableviewcelleditingstyle)editingstyle forrowatindexpath:(nsindexpath *)indexpath{ [mylist.items removeobjectatindex:indexpath.row]; [mylisttableview reloaddata]; nslog(@"before check::::::::mylist items class of %@",nsstringfromclass([appdelegate.wishlist.items class])); [appdelegate check]; }
dont know why in check method @ appdelegate.m ,mylist.items class of __nsarrayi.code:appdelegate loaded @ beginning class of items __nsarraym before check::::::::mylist items class of __nsarraym mylist items class of __nsarrayi
think have __nsarraym (nsmutablearray).
have had ideas this. please me if experiencing before.
@property (nonatomic, copy) ...
try retain kicks.
Forums iPhone, iPad, and iPod Touch iOS Programming
- iPhone
- Mac OS & System Software
- iPad
- Apple Watch
- Notebooks
- iTunes
- Apple ID
- iCloud
- Desktop Computers
- Apple Music
- Professional Applications
- iPod
- iWork
- Apple TV
- iLife
- Wireless
No comments:
Post a Comment