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-04-2009, 05:08 PM   #1 (permalink)
New Member
 
Join Date: Jun 2009
Posts: 3
Default Updating one UITextView from another?

Essentially I have one UITextView that a user types text into. Then, when they press a button, the view changes and I would like the text to be the same in the second UITextView as to what they typed in the first, just different formatting (type, color etc..which I control with the second view.)

I have achieved this on a single view using the Hello World sample app that takes a UITextField text and adds it to a UITextView on the same view, and have been unsuccessful to carrying text across views.

How would I go about displaying the text from one UITextView on one UIView, to another UITextView on another UIView?

Any help or example would be appreciated. Thanks!
dirkweiss is offline   Reply With Quote
Old 06-06-2009, 06:03 PM   #2 (permalink)
New Member
 
Join Date: Jun 2009
Posts: 3
Default Solution

Was easier than anticipated. Below, attached to a button,

Code:
-(IBAction)printmyposter {
	
	textViewToBeUpdated.text = view.OriginalTextView.text;	
}
When the button is pressed the empty textView will update with the first textView. Dont forget to import the @class for the first view in the .m, and create an IBOutlet in the .h.
Code:
IBOutlet ThisView *textViewToBeUpdated;
Seems to be working. If I have missed something let me know.
dirkweiss is offline   Reply With Quote
Old 12-31-2009, 12:56 AM   #3 (permalink)
Banned
 
Join Date: Jan 2009
Posts: 69
Default

Not sure why nobody likes to ever post their solutions correctly here, but whatever.

This does not work.

charm
RMN Jobs

Last edited by mesohorny; 04-19-2011 at 01:08 PM.
mesohorny is offline   Reply With Quote
Reply

Bookmarks

Tags
uitextview, uiview

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,884
Threads: 89,229
Posts: 380,763
Top Poster: BrianSlick (7,129)
Welcome to our newest member, karlam963
Powered by vBadvanced CMPS v3.1.0

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