开发者

How To customize different rows in UITableView

I want to create a page in iphone sdk which looks same as flight search result problem is that each there are different number of stops some has 2 stops some has 1 etc. and not only leave flight detail but return flight detail can also be asked. It must sorted on the basis of charges.

I am not getting from where I start

I make 3 custom cells

  1. showing source n destination detail
  2. the flight detail
  3. to make separator between leave n return results

this is demo i have tried with fixed value! [1 row开发者_StackOverflow中文版 a SimpleTableIdentifier(background color not able to set) 2 and 3 row are 2 different CustemCell, there is separator custom cell too] but I think i make it complex unnecessary any tips and help will be apprecited thanks in advance.


Go like this make three customCell one for each of your three category

  1. cell structure to show source and destination detail

  2. cell structure to show flight detail

  3. cell structure to make seperator

Now your UITableView will be a grouped tableView with numberOfSections = number to total flight you have to show

Each section will have three rows (if it has all three information available) else you can reduce the number of rows in any section by delegate method of UITableView named numberOfRowsInSection.


Try not to forget to give all different custom cells other dequeueReusableCellWithIdentifier's for re-usability.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜