Aleem
Aleem

Reputation: 3291

Reload uiview in iphone?

I am parsing xml and get data and show this data on view, now i have to add reload button, which reload my view and call again xml parsing function, now problem is that how can i remove all contents on view and again show???

Upvotes: 0

Views: 229

Answers (2)

Ilanchezhian
Ilanchezhian

Reputation: 17478

After loading and parsing the new data, call setNeedsDisplay:.

Implement drawRect: in the view such that it reflects the new data.

Upvotes: 1

Rahul Vyas
Rahul Vyas

Reputation: 28720

If you are using mutables array for storing you xml data just remove all objects from array. Set nil to your labels's text and whatever you have on your view reload/download xml again and display on view.

Upvotes: 1

Related Questions