• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
UITableViewController with dynamic data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

UITableViewController with dynamic data


  • Subject: UITableViewController with dynamic data
  • From: "Mohan Parthasarathy" <email@hidden>
  • Date: Wed, 14 Jan 2009 12:24:43 -0800

Hi,

I am using a UITableViewController and the data for the table view is
generated dynamically (fetched from the network). The data is normally
fetched based on some search. But when the Controller is loaded and i don't
have the data ready, i want to return something back sane and later reload
the data when it becomes ready. What is the best way to do this ?

-numberOfSectionsinRow : Is it safe to assume that this function is called
always *first* before constructing the table ? At least i want to be able to
initiate the fetch (if it is not already done before) here.
-As i can't return 0 for numberOfSectionsInRow, i still have to return 1
there and in numberOfRowsInSection, return zero till the data becomes
available

The problem  is that i need to initiate the fetch somewhere during the table
construction and i don't want to put hooks into all of the tableView
delegate methods. As the data for the tableview is dynamic, i need to tell
the framework not to call the other delegate methods till i return something
valid in numberOfSectionsInRow/numberOfRowsInSection. Is this a safe
assumption ?

thanks
mohan
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: UITableViewController with dynamic data
      • From: Luke the Hiesterman <email@hidden>
  • Prev by Date: Re: Report writer for Cocoa?
  • Next by Date: Re: NSTableView
  • Previous by thread: Fwd: Report writer for Cocoa?
  • Next by thread: Re: UITableViewController with dynamic data
  • Index(es):
    • Date
    • Thread