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 03-16-2010, 03:13 AM   #1 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 1
Default Implementing multiple views in a scrollview after 'drawRect'

I have a scrollview that should contain multiple subviews.
The content of each view needs to be created during 'drawRect' and the content of each view depends on the content of the view before it.

e.g. I have 5 subviews, view1 draws as much as it can, then view2 will draw its content based on the content (text) that did not fit in to the previous view.

I thought of a couple of ways to do this but none seem to work correctly:

1.) Implement all the drawing in one very long view. Here I am not sure what to do about setting the width of the frame as I will only know this once that drawing has completed.

2.) Add a delegate to the view drawing itself and call back to its superview when drawing has completed. The superview may then send itself a notification/delayed call/immediate call(?) to add the next view.
This works fine the first time and crashed the second...

Any suggestions appreciated.
uglybobby is offline   Reply With Quote
Reply

Bookmarks

Tags
cocoa touch, ipad development, iphone development, sdk 3.2

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
18 members and 244 guests
14DEV, @sandris, ADY, ArtieFufkin10, ckgni, Dani77, HemiMG, IphoneSdk, jakerocheleau, JasonR, MACralik, NSeven, prchn4christ, Rudy, silverwiz, spiderguy84
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,885
Threads: 89,230
Posts: 380,767
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:54 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0