Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 01-01-2010, 10:20 AM   #1 (permalink)
MMS
Registered Member
 
Join Date: Nov 2009
Location: Connecticut
Posts: 95
Default A couple of simple questions re: UIScrollViews

I have a productivity app with several detail views most of which are also scroll views with vertical scroll... when testing on my development device I noticed the following:

1. The scroll views do not "reset" to the top when a user moves between views and back again. ...I wish that they would.

2. The content size that needs to be set (e.g. as set in the viewdidload method scroller.contentSize=CGSizeMake(280,1000) ) always varies significantly from the scrollview size displayed in the interface builder library after I build a view. The content size that I need to set in the Viewdidload needs to be much larger in order for the scrollview to display properly on the device. (...Interestingly, I did not have this problem when I was just working with the simulator.)

If anyone knows anything about either of these issues, I'd really love to learn!

Thank you!!
MMS is offline   Reply With Quote
Old 01-01-2010, 01:08 PM   #2 (permalink)
Registered Member
 
Join Date: Aug 2008
Location: London/Peterborough
Posts: 534
Default

Quote:
Originally Posted by MMS View Post
I have a productivity app with several detail views most of which are also scroll views with vertical scroll... when testing on my development device I noticed the following:

1. The scroll views do not "reset" to the top when a user moves between views and back again. ...I wish that they would.

2. The content size that needs to be set (e.g. as set in the viewdidload method scroller.contentSize=CGSizeMake(280,1000) ) always varies significantly from the scrollview size displayed in the interface builder library after I build a view. The content size that I need to set in the Viewdidload needs to be much larger in order for the scrollview to display properly on the device. (...Interestingly, I did not have this problem when I was just working with the simulator.)

If anyone knows anything about either of these issues, I'd really love to learn!

Thank you!!
Thoughts:

1. You can move it back to where it was with code....scrollto
2. Can you explain this a bit more...confused.
QuantumDoja is offline   Reply With Quote
Old 01-01-2010, 03:09 PM   #3 (permalink)
MMS
Registered Member
 
Join Date: Nov 2009
Location: Connecticut
Posts: 95
Default

Quote:
Originally Posted by QuantumDoja View Post
Thoughts:

1. You can move it back to where it was with code....scrollto
2. Can you explain this a bit more...confused.
Thank you for writing. Yes, I can explain more:

I just build a view- coding for a scrollview, and then adding the scrollview and elements in interface builder. (And of course connecting the scrollview etc..) In Interface Builder, in the scrollview size window it tells me that the view is H: 1230. But if I set the contentsize in the viewdidload method to (280,1230), then build and run the app on my iPhone, I can not scroll through the entire view. (e.g. it doesn't make it all the way to the bottom.) So, I had to set the contentSize at 1700 and now it scrolls perfectly.

I am concerned because this didn't happen in the iPhone simulator...and now I'm wondering if it's going to perform on other devices the way it performs on mine or the way it performs in the simulator.

It feels like a lot of random guesswork...and that feels wrong.
MMS is offline   Reply With Quote
Reply

Bookmarks

Tags
contentsize, scroller, uiscrollview, uiview, viewdidload

Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 262
21 members and 241 guests
ADY, bookesp, ckgni, dacapo, Dani77, DarkAn, Davey555, Desert Diva, glenn_sayers, HemiMG, jakerocheleau, JasonR, LEARN2MAKE, nobre84, prchn4christ, Rudy, ryantcb, Speed, themathminister, theone8one
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,766
Top Poster: BrianSlick (7,129)
Welcome to our newest member, bookesp
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 02:38 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0