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 06-13-2009, 11:59 AM   #1 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 211
Default How do I make a side-scroller-like view

I have a UIImageView in a nib with a static image as a background. I want the user to keep one finger down in another view, and move it around to change a height setting.

The other view overlaps the image view with the same height but a narrow width. The image view should have a line drawn to a point with a constant width, but the height should depend on the location of touch in the other view. I have attached an illustration, in case my wording is not clear. The grey, transparent view to the right of the center of the picture is the view where the user holds down, and the background is the image view with the lines as part of the image.

I want the new line to always draw to the same x value, but a variable y value in the image view, and I want the former lines to shift to the left, kind of like in a side scroller game, but the foreground will change, not the background.

I will update the image view's drawing very frequently, so that the resulting drawing over the image view will be a smooth curve keeping track of all of the former heights.

Do I use a CGMutablePath, and add more linesToPoint to that path every update frequency milli-seconds, shift the path to the left, then redraw the path? I don't know how to do this, so could someone help me out.

Thanks.
Attached Images
File Type: jpg view screenshot.jpg (13.0 KB, 0 views)
csnplt is offline   Reply With Quote
Reply

Bookmarks

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
» Stats
Members: 158,474
Threads: 89,090
Posts: 380,122
Top Poster: BrianSlick (7,091)
Welcome to our newest member, logwoodsplitter
Powered by vBadvanced CMPS v3.1.0

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