English 中文(简体)
Tableview reload data problem iphone sdk
原标题:

I have a class A which is a subclass of uitableviewcontroller and one more class B which actually displays my tableview with its content is a subclass of A.

There s an xml parser which parses my xml and stores the content in an nsmutablearray of application delegate. Now, I fetch this delegate array into a local nsmutablearray in class B to minimise the communication between the two classes i.e. delegate and class B and display that.

After certain condition is met in class A, I m calling xml parser to refill the delegate array and I m calling class B s tableview reload method. The problem is when I call the tableview s reload data, class B s delegate methods are called. But before that I need to grab this delegate array in local array in class B. How shall I do that?

Can anybody please help?

Thanx in advance.

最佳回答

Suggest that you post a notification from your xmlParser when it has updated the array. Object B (instance of Class B) can register for the notification. Upon receiving the notification Object B can reload the array before calling [[self tableView] reloadData] in the implementation of Class B.

问题回答

暂无回答




相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签