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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.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 05-28-2010, 04:58 AM   #1 (permalink)
Registered Member
 
chuck's Avatar
 
Join Date: Aug 2008
Location: Berlin, Germany
Posts: 87
chuck is on a distinguished road
Default UIScrollView in part of the screen?

This seems like it should be really simple, but I can't seem to get it to work. It either wants to scroll the entire view or not scroll at all. What I need is one view that stays at the top of the screen and then a bottom view that scrolls. You can see what I have so far here:


Click for full size - Uploaded with plasq's Skitch

Also, any samples that show this being done in Interface Builder would be cool too. Thanks!
__________________
German Course: Learn German anywhere! Chess Player: Study Chess anywhere!
chuck is offline   Reply With Quote
Old 05-28-2010, 05:13 AM   #2 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: UK
Posts: 1,896
harrytheshark is on a distinguished road
Default

I've thrown together a sample project.

Basically, you need to set the contentSize.
Attached Files
File Type: zip ScrollExample.zip (19.1 KB, 14 views)
harrytheshark is offline   Reply With Quote
Old 05-28-2010, 08:37 AM   #3 (permalink)
Registered Member
 
chuck's Avatar
 
Join Date: Aug 2008
Location: Berlin, Germany
Posts: 87
chuck is on a distinguished road
Default

Quote:
Originally Posted by harrytheshark View Post
I've thrown together a sample project.

Basically, you need to set the contentSize.
Wow, thanks for taking the time to make that very insightful example! Looking at IB more carefully, I found that I was setting the View Controller's main view to the scroll view... oops! But even after I had everything set up properly, things were strange. I eventually solved my specific problem with the following code:

Code:
[myScrollView setContentSize:CGSizeMake(320.0, 612.0)];
[myScrollView setClipsToBounds:YES];
[myScrollView setContentInset:UIEdgeInsetsMake(500.0, 0.0, 0.0, 0.0)];
[myScrollView setContentOffset:CGPointMake(0.0, -500.0)];
Any idea what could be happening here to cause me to need to use the content inset and offset? In any case, thank you very much for the help!!
__________________
German Course: Learn German anywhere! Chess Player: Study Chess anywhere!
chuck is offline   Reply With Quote
Reply

Bookmarks

Tags
uiscrollview

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: 318
9 members and 309 guests
ajay123123, ashaman64, baja_yu, ChrisYates, HemiMG, newDev, Objective Zero, pkIDSF, Steven.C
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,648
Threads: 94,113
Posts: 402,878
Top Poster: BrianSlick (7,990)
Welcome to our newest member, brandon6031
Powered by vBadvanced CMPS v3.1.0

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