uilabel

How to change an UILabel/UIFont's letter spacing?

Hi, I've searched loads already and couldn't find an answer. I have a normal UILabel, defined this way: UILabel *totalColors = [[[UILabel alloc] initWithFrame:CGRectMake(5, 7, 120, 69)] autorelease]; totalColors.text = [NSString stringWithFormat:@"%d", total]; totalColors.font = [UIFont fontWithName:@"Arial-BoldMT" size:60...

draw line over uilable after loading from nib

here is my code CGContextRef c = UIGraphicsGetCurrentContext(); CGContextBeginPath(c); CGContextMoveToPoint(c, 277.0f, 21.0f); CGFloat newpoint = 277.0f + (CGFloat)(self.msrp.text.length * 8); //NSLog(@"%f", newpoint); CGContextAddLineToPoint(c, newpoint, 21.0f); CGContextStrokePath(c); i am trying to draw a line over UIlabel, i am lo...

Custom UITableViewCell with 2 UILabel's resized

I'm struggling to create a custom UITableViewCell (in IB) that has a UIImageView on the left, fixed to the top left corner, then 2 UILabel's adjacent to it, side by side. So the cell looks something like: +---------------------------+ | IMAGE LABEL1 LABEL2 > | +---------------------------+ What I cannot seem to do is to change the...

Line breaks not working in UILabel

Hi folks, I'm loading some help text from a plist and displaying the same in the form of UILabels housed in a UIScrollView. Portion of the code follows: UILabel *sectionDetailLabel = [[[UILabel alloc] initWithFrame:CGRectMake(34, myOriginForThisSection, 286, 20)] autorelease]; sectionDetailLabel.backgroundColor = [UIColor cle...

UITableViewCell color issues with custom table view background

I have a UITableView with a custom background image set like this: self.tableView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"mybg.png"]]; The background appears fine, but my UITableViewCells (default cells, not custom) have some sort of weird tint to them, and the UILabel containing the "New Project" text a...

How do I update blackberry UI items from a thread?

public class PlayText extends Thread { private int duration; private String text; private PlayerScreen playerscrn; public PlayText(String text, int duration) { this.duration = duration; this.text = text; this.playerscrn = (PlayerScreen)UiApplication.getUiApplication().getActiveScreen(); } ...

Make UILabel show "No results" instead of "nan"

I have a small app, where user can make some calculations and solve equations. For example, if in a square equation discriminant is less than zero, the x1 and x2 values are "nan", so when I assign x1 and x2 values to UILabels they show "nan" as well. Writing a lot of if's like if(D<0) [label setText:[NSString stringWithFormat: @"No solu...

Uilabel effect like in games

hi all ! Does anyone know how to make a UILabel appear letter by letter like you can see in some games or other. thanks ...

UILabel fade-in fade-out question

Hi there, I got the following code inside an NSTimer selector: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:2.0]; [infoLbl setAlpha:0]; [UIView commitAnimations]; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:2.0]; [infoLbl setAlpha:1]; [UIView commitAnimations]; So I want to imple...

Password authentication in sqlite3 for iphone

Hey Guys .. I am new to programming in Objective C . I checked many tutorials on reading data in sqlite3 , but almost all of them have show the data in UITableView . I have a page where the user types in the password, the password lets say 1234 is saved in the database ( I have created a table already ) . I have got the database into th...

how to generate an event

Hello everyone I created a subclass from UIView #import <UIKit/UIKit.h> @interface MeeSelectDropDownView : UIView { UILabel *mainText; UIImage *bgImg; UIImageView *bgView; UIImageView *originView; NSMutableArray *labelArray; int selectedItem; BOOL inSelectTag; float _defaultHeight; } @property (nonato...

iPhone: UILabel applying CGAffineTransformMakeRotation causing mysterious crash

In -(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil parentController:(GameViewController *)myGameController{ Have a series of transforming labels like so: deg90 = 1.570796326794897; //....transforms background.center = CGPointMake(160,230); background.transform = CGAffineTransformMakeRotatio...

iPhone: How to Display Underlined Text in a Button?

I want to display the mail ID in my view such that clicking the mail ID should open the mail composer view. I want to display the button text as underlined to show it is a hyperlink and for the button click event to call the mail composer view. At present, I am not able to show the button text underlined. I thought of placing a label a...

bigger UITableViewCellStyleValue1 detailTextLabel

I am trying to make a UITableView. Table cells are done in style UITableViewCellStyleValue1. When text in either textLabel or detailTextLabel is too long, it gets shortened with ellipsis... This happens for both labels; the problem really occurs, when both labels are too long. What is a preferred way to disable this or make detailText...

How to make the 1st line in certain amount of text in a Label bold?

I have about 400 character length string with a heading called Details. In this 'Details' is to be bold and of fontsize 19. While all the remaining text starts in the next line and should be of fontSize 18 like the contents. How can I do all this by using a UILabel? Plz help me... ...

how do I copy UITextField data into a UILabel

I have a textfield and a label. When you touch the textfield, the keyboard appears In IB, the textfield's properties are Keyboard: ASCII Capable Return Key: Done I wired the IBOutlet to the label and the textfield. How do I get the keyboard to go away when I'm done entering text. How do I get to copy the text to the UIlabel? thanks...

how do I create or assign a delegate?

How do I make a delegate? I have a class called CustomSign. The class has a view associated with it. The view has 2 elements. A textfield and a uilabel. I want to copy the textfields data to the uilabel when you click the done button. Here's my code in the CustomSign.m I don't know how to make it a delegate. -(void)textFieldDidEndEditi...

how do I set a delegate in a view that is not my main view

I have a xib. the xib has a button that swaps another xib. the second xib has a uitextfield and a uilabel. how do I make the keyboard go away when I'm done typing? what do I need to wire or code? the second xib has it's own class (called CustomSign.m) Inside CustomSign.m, I've implemented the following method -(void)textFieldDidEndEd...

How to find the only UILabel in a view and hide it?

I am adding a UILabel as a subview to a UIView and sometime later I want to hide it. It is assigned to a variable but I don't think setting the variables property Hidden after it's been added to the view will work (well it doesn't seem to anyway). Is there a way to loop through the subviews in a view and then find the one that has a spe...

How to add padding to an UILabel?

The text inside an UILabel is smashed against the left and right borders. Is there an way of adding some inner padding to the UILabel, so that text won't touch the inner borders so closely? ...