Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 3, 2008, 05:18 AM   #1
sujithkrishnan
macrumors 6502
 
Join Date: May 2008
Location: Bangalore
Send a message via Yahoo to sujithkrishnan
making UIView scrollable

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...
sujithkrishnan is offline   0 Reply With Quote
Old Jul 3, 2008, 06:15 AM   #2
robbieduncan
Moderator
 
robbieduncan's Avatar
 
Join Date: Jul 2002
Location: London
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...
robbieduncan is offline   0 Reply With Quote
Old Jul 13, 2008, 09:34 AM   #3
louden
macrumors 65816
 
louden's Avatar
 
Join Date: Dec 2003
Location: 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...
__________________

Dell Pentium 2 with 500 MB HD Windows 95
Compaq iPaq w/ 64MB of Ram

Last edited by louden; Jul 14, 2008 at 12:12 AM.
louden is offline   0 Reply With Quote
Old Jul 14, 2008, 12:13 AM   #4
louden
macrumors 65816
 
louden's Avatar
 
Join Date: Dec 2003
Location: 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...
__________________

Dell Pentium 2 with 500 MB HD Windows 95
Compaq iPaq w/ 64MB of Ram
louden is offline   0 Reply With Quote
Old Jul 14, 2008, 01:24 AM   #5
sujithkrishnan
Thread Starter
macrumors 6502
 
Join Date: May 2008
Location: Bangalore
Send a message via Yahoo to sujithkrishnan
Quote:
Originally Posted by louden View Post
... 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?
sujithkrishnan is offline   0 Reply With Quote
Old Jul 14, 2008, 04:42 PM   #6
louden
macrumors 65816
 
louden's Avatar
 
Join Date: Dec 2003
Location: Seattle
Quote:
Originally Posted by sujithkrishnan View Post
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)
__________________

Dell Pentium 2 with 500 MB HD Windows 95
Compaq iPaq w/ 64MB of Ram
louden is offline   0 Reply With Quote
Old Jul 30, 2008, 12:52 PM   #7
louden
macrumors 65816
 
louden's Avatar
 
Join Date: Dec 2003
Location: 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?
__________________

Dell Pentium 2 with 500 MB HD Windows 95
Compaq iPaq w/ 64MB of Ram
louden is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
How to navigate from UIView to UIViewController fypj2013 iPhone/iPad Programming 6 Mar 25, 2013 05:37 PM
Trying to subclass UIView Hans Kamp iPhone/iPad Programming 3 Mar 25, 2013 01:15 AM
Irony of the un-scrollable ML review... macbook123 MacBook Pro 53 Aug 14, 2012 05:59 PM
Archiving Custom UIView Ides iPhone/iPad Programming 14 Aug 8, 2012 06:44 PM
make uiview transparent without having the uiview's buttons transparent johnmerlino iPhone/iPad Programming 7 Jun 1, 2012 03:20 AM

Forum Jump

All times are GMT -5. The time now is 09:05 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC