Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bhangale.parag

macrumors newbie
Original poster
Sep 4, 2008
5
0
hi all,
i am new to the iphone sdk programming but i have to make tree control but which class is used for it i don't know so please help me.
thanks in advance....
 

Luke Redpath

macrumors 6502a
Nov 9, 2007
733
6
Colchester, UK
There isn't a tree control in the iPhone SDK because it doesn't really fit with the iPhone UI/touch interface. You should look at UINavigationController and UITableView for presenting hierarchial data.
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Luke is correct: there isn't a tree control as you probably shouldn't need one. If you absolutely, 100% definitely need one and can't use the provided controls as per the iPhone HIG then you need to create one from scratch. You will need to subclass UIView, do all your own drawing, event handling, animation, define your own datasource protocol etc. Lots and lots of work...
 

keehun

macrumors regular
Mar 17, 2008
110
0
Yes... if you need a tree view... Perhaps you need to rethink your application design. A nav controller + tableview should work with almost every design situation
 

bhangale.parag

macrumors newbie
Original poster
Sep 4, 2008
5
0
Thanks

Yes... if you need a tree view... Perhaps you need to rethink your application design. A nav controller + tableview should work with almost every design situation

Thanks to all of you,for giving me such a nice reply i will try to make that but
you said earlier that with this UINavigationController and UITableView can i set the view as like as tree control? if there is any property of these classes that i set the view as like as tree control?
 

admanimal

macrumors 68040
Apr 22, 2005
3,531
2
Thanks to all of you,for giving me such a nice reply i will try to make that but
you said earlier that with this UINavigationController and UITableView can i set the view as like as tree control? if there is any property of these classes that i set the view as like as tree control?

Look at any of Apple's example programs that use a table view. Practically all of them mimic the same functionality that you would get from a tree view.
 

chhoda

macrumors 6502
Oct 25, 2008
285
1
similar

Hi all,
I need to do something similar

On launch, the application presents the user with a grid of icons, similar to the default application style icons except larger. There should be 3 icons across on a portrait mode phone.
Each icon either represents a group of further icons below, OR expands to an image image when pressed.

further icons below should create a row in between and show the expanded icons (probably left indented a bit). anybody has come across a similar structure in any example which can help me cickstart this ? If there is no grouping i can do simple table display, this group expand has me little confusing

--CH
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.