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 01-09-2009, 01:41 PM   #1 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 8
Default Resizable UILabel which scrolls across the screen

Right, I'm trying to get a label with text in it (done already obviously), which scrolls across the screen.

The text that is input into the label is done by a UITextField and a UIButton. This updates fine.

But I'm trying to get the UILabel to resize accordingly to the amount of text input, so that the WHOLE lot of text scrolls across the screen.

This is the code I have at the moment for the scrolling label:

Code:
[lblMessage setText: txtEnter.text];

	
	CABasicAnimation *scrollText;
	
	scrollText=[CABasicAnimation animationWithKeyPath:@"position.x"];
	scrollText.duration = 3.0;
	scrollText.repeatCount = 10000;
	scrollText.autoreverses = NO;
	scrollText.fromValue = [NSNumber numberWithFloat:500];
	scrollText.toValue = [NSNumber numberWithFloat:-120.0];
	
	[[lblMessage layer] addAnimation:scrollText forKey:@"scrollTextKey"];
The problem is, sometimes is starts scrolling in the middle of the screen, and sometimes vanishes before it has fully gone acrosss.

It also cuts of text due to the label being one size.. I don't know how to change this.

Thanks in advance.

Dom
domness is offline   Reply With Quote
Old 01-10-2009, 07:21 AM   #2 (permalink)
New Member
 
Join Date: Jan 2009
Posts: 8
Default

Bump* I never usually do this but these forums just never finish answering questions...
domness is offline   Reply With Quote
Old 11-18-2010, 02:04 AM   #3 (permalink)
Registered Member
 
Join Date: Nov 2010
Posts: 10
Default

Hi Dom,

Did you actually find a solution to this problem ? I having the same issue for an Iphone app I am trying to develop. Thanks
__________________
Apple store : enemy of friend ?
iphone casino
sebastien is offline   Reply With Quote
Reply

Bookmarks

Tags
label, scroll, text, 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,885
Threads: 89,230
Posts: 380,765
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:34 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0