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 07-02-2008, 09:15 PM   #1 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 71
halusha is an unknown quantity at this point
Default UITextView with word wrap?

Is there way to make a UITextView word wrap, instead of allowing the text to just go off the screen?
halusha is offline   Reply With Quote
Old 07-03-2008, 02:48 PM   #2 (permalink)
I live @ iDevKit.com
 
Join Date: Jul 2008
Posts: 142
mxweas is an unknown quantity at this point
Default Re: UITextView with word wrap?

If you set the frame to allow more than one line along with setting the numberOfLines property this is easily possible. If you plan to put more than one UIlabel on top of one another, for example in a video description page. Here's a nice guide on making a function that can determine the correct UILabel height for a fixed width, # of lines and font size & face:
http://idevkit.com/forums/showthread.php?t=9

According to the docs, sizeToFit _should_ take into account the numberOfLines property, but it simply does not.

Max
mxweas is offline   Reply With Quote
Old 07-05-2008, 09:54 PM   #3 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 71
halusha is an unknown quantity at this point
Default Re: UITextView with word wrap?

UILabel is the only class that has a numberOfLines property. I was talking about UITextView, which is a multiline text entry control.
halusha is offline   Reply With Quote
Old 07-06-2008, 02:36 AM   #4 (permalink)
New Member
 
Join Date: Apr 2008
Posts: 53
turinreza is an unknown quantity at this point
Default Re: UITextView with word wrap?

Quote:
Originally Posted by mxweas
If you set the frame to allow more than one line along with setting the numberOfLines property this is easily possible. If you plan to put more than one UIlabel on top of one another, for example in a video description page. Here's a nice guide on making a function that can determine the correct UILabel height for a fixed width, # of lines and font size & face:
http://idevkit.com/forums/showthread.php?t=9

According to the docs, sizeToFit _should_ take into account the numberOfLines property, but it simply does not.

Max
that website is not accessible even after registering in it.. no one has access to thread.
can you post the function?
turinreza 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
UITextView keyboard Fastrak iPhone SDK Development 19 03-09-2012 07:00 AM
How to Wrap Text in UITableViewCell ? satyanarayanagv iPhone SDK Development 7 12-16-2009 05:05 AM
UITextView mutiline paos iPhone SDK Development 3 04-17-2009 05:18 PM


» Advertisements
» Online Users: 330
6 members and 324 guests
blueorb, guusleijsten, Kryckter, LEARN2MAKE, n00b, SLIC
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,113
Posts: 402,880
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

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