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

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
Hi all.


I am having a drill-down menu with UITableViewController end menu is a UIViewController...

In the last menu (UIViewController objet)..
I do

Code:
[self.view addSubView:myFirstLabel];
[self.view addSubView:mySmallImageView];
[self.view addSubView:mySecondLabel];
[self.view addSubView:myTextView];

All these are going outside the screen bounds.... (however i can make them congested to fit in screen, but i dont prefer..)

Problem is that the self.view is not scrollable..
I want to make it scrollable so that i can scroll to see all the labels..
(however the textview is scrollable by itself)

By giving self.view's bounds greater that screen bounds is not making it scrollable...
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
I've not done any iPhone work so this may be well off, but in standard Cocoa you can't make a view scrollable on it's own: you have to use a scroll view to contain the view. They may have simplified this on the iPhone though. I do see reference to UIScrollView in places so I'd look at that...
 

dgdosen

macrumors 68030
Dec 13, 2003
2,738
1,377
Seattle
Instead of building a bunch of labels, use a Table View and create groups and cells on the table programatially... The more cells you create - instant scrolling!

Take a look at the samples...
 

dgdosen

macrumors 68030
Dec 13, 2003
2,738
1,377
Seattle
... and make sure you read the documentation on how to work with Tables and Cells - you need to make sure you implement the delegates they require to manage memory properly...
 

sujithkrishnan

macrumors 6502
Original poster
May 9, 2008
265
0
Bangalore
... and make sure you read the documentation on how to work with Tables and Cells - you need to make sure you implement the delegates they require to manage memory properly...

Thanks...

But how to accomodate textfields in tableviews ????
We can change labels with cell.text, but for textfields??
Also I face some problem with UIViewController - say its not aligning themselves to the bounds on rotating device... However the UITableviews are adjusting by themsleves..

I wll follow the docs too for more info...by that time can u answer the above?
 

dgdosen

macrumors 68030
Dec 13, 2003
2,738
1,377
Seattle
Thanks...

But how to accomodate textfields in tableviews ????
We can change labels with cell.text, but for textfields??
Also I face some problem with UIViewController - say its not aligning themselves to the bounds on rotating device... However the UITableviews are adjusting by themsleves..

I wll follow the docs too for more info...by that time can u answer the above?


You don't! Table cells can be edited...

Look at: tableView:shouldEditTableColumn:row

And check out the guide in the docs about Table View Programming... Check out some of the samples that use these delegates. Most of the basic code is all boilerplate. Just cut and paste from the examples, and it works!

(your mileage may vary)
 

dgdosen

macrumors 68030
Dec 13, 2003
2,738
1,377
Seattle
I'm looking at this right now... You could have done this by adding a UIScrollView and supporting the UIScrollViewDelegate.

I'm trying to figure out how to use the UIPageView control to allow horizontal scrolling between views, but then have vertical scrolling available in a subview on a single page of the page view.

I can't get the scrolling notification to move down to the view. Is there a way to do that?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.