0

テーブルビューを使って以下のように作成しようと思っていますが、どうやって動かすのかわかりません

 Sports (If it get touched it expands the subtopics) 
    Cricket (When it get Touched it push to next view controller)
    Football
    VolleyBall
 Bike (If it get touched it expands the subtopics)
    HeroHonda (When it get Touched it push to next view controller)
    Kawasaki
    Yamaha

トピックとサブトピックの数は既知です。

私が期待していることをすることは可能ですか?テーブルビューでそれが不可能な場合、これを行う他の方法は何ですか?

どんな助けでも大歓迎です。

4

2 に答える 2

1

If you really need an expansion effect, I reccomend that you use some open-source solution such as VPPDropDown , or even MPFoldTransition.

The simpler solution would be to just use UITableViewSections for categories and cells for items, e.g.

Section 0 : Sports
  - Row 0 : Cricket
  - Row 1 : Football

Section 1 : Bike
  - Row 0 : Yamaha
  - Row 1 : Kawasaki 
于 2012-12-06T19:12:41.797 に答える
1

この完璧な解決策に従ってくださいサブトピックを展開および折りたたむには、セクションをリロードする必要があります。

于 2012-12-06T18:33:44.253 に答える