Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jul 3, 2008, 04: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, 05: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, 08: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 13, 2008 at 11:12 PM.
louden is offline   0 Reply With Quote
Old Jul 13, 2008, 11:13 PM   #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, 12: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, 03: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, 11:52 AM   #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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
Is there a software available for making iPad or iPhone apps technoawareness iPhone/iPad Programming 29 Mar 30, 2012 04:36 AM
Resetting a UIView Wellington2k iPhone/iPad Programming 3 Nov 11, 2011 08:20 AM
Begin Making iPhone Apps applereviewguy iPhone and iPod touch Apps 1 Oct 18, 2011 11:42 PM
Make a powerpc app universal? matthew12 Mac Applications and Mac App Store 3 Jun 22, 2011 06:09 PM
Making UITextView scrollable but NOT editable ? deamb iPhone/iPad Programming 1 Jul 6, 2008 12:37 PM


All times are GMT -5. The time now is 06:34 PM.

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

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