uilabel

How do I get the UIToolbar font to match UINavigation Controller?

Using the following post, I was able to add a UILabel to a UIToolbar, however, it looks crappy. Anyone know how to get the text size / color / shadow to match the title for a UINavigationController? Navigation Controller UIToolbar with UILabel What steps do I need to take to make them match? ...

how to fit a text in UILabel when the size is not proportionally

as title how to fit a text into a UILabel when the width and height is not proportionally. in my application, the label width is 100.0, height is 500.0, and the font size is 400, the result show up in simulator was the text out of frame and cannot display completely, if i enable the auto adjust to fit property, the font size no longer be...

is it possible to set the UILabel distance between the line?

is it possible to set a UILabel's distance between the line, as i had a UILabel contain 3 lines,and linebreakmode is wordwrap ...

UILabel: Using the userInteractionEnabled method on a label

Hello again. I am wondering if anyone has used the userInteractionEnabled method on a UILabel to allow the label to act like a button (or just to fire off a method). Any help would be greatly appreciated. Cheers! Update (4/30/09 @1:07pm) Clarification: I have a standard InfoButton and next to it I want to place a label with the text...

UILabel memory leak?

I have an NSTimer that fires off every second, and on that second I update a UILabel by setting the text property like so: remainglbl.text = [NSString stringWithFormat:@"%i:%02i", var1, var2]; It works fine, but when I run it in xcode with Start With Performance Tool -> Leaks, it appears that the memory just keeps on climbing and clim...

Why is UILabel 0x0?

I'm loading a nib as: ContentViewController *theController = [[ContentViewController alloc] initWithNibName:@"ContentView" bundle:nil]; which has a label on it. The view controller has an IBOutlet of UILabel with a @property of retain and synthesized variable. When I load the nib as above from another class and reference the label's...

Easy way to make a UILabel cover and exactly match contents of a UITextField?

UI crimes aside... I'd like to have a UILabel replace a UITextField after some user input. Is there an easy way to accomplish this so when the UITextField is hidden its value gets replaced by a UILabel that doesn't appear to move...appearing to "set" into the background so to speak? I've managed to do this by nudging the fields around i...

UIScrollView - Adding / Removing labels

I am trying to add/remove UILabels to a ScrollView. The adding takes place just fine, but I can not seem to get the labels removed, before adding new ones. Can anyone shed some light on this situation? -(void)setMessage:(MessageData *)m{ //Attempting to remove any previous labels iPhone_PNPAppDelegate *mainDelegate = (iPhone_P...

Why isn't my UILabel being changed?

Why isn't my UILabel being changed? I am using the following code, and nothing is happening: - (void)awakeFromNib { percentCorrect.adjustsFontSizeToFitWidth; percentCorrect.numberOfLines = 3; percentCorrect.minimumFontSize = 100; } Here is my Implemintation code: - (void) updateScore { double percentScore = 100.0 * va...

How can I underline part of the text like iPhone SMS?

I use an UILabel to show my text, in a multi-line and UILineBreakModeWordWrap mode, and the maximum width is 200. For example, here is the text: I really really want to underline first word and second word, could you help me? And I want to underline "first word" and "second word". If the text is shown in a single-line mode, with siz...

Multi-colored UILabel text

Is is possible to create multi-colored text within a UILabel? I.e, if my text was: "The quick brown fox" have the q and b in blue with the rest of the text in black? I get the feeling I'd have to use a UIWebView and render the text in HTML to accomplish this. Thoughts? ...

How do I fix a multi-line UILabel that is overflowing it's containing UITableViewCell?

I'm having trouble displaying a multi-line UILabel in a custom UITableView cell. I'm currently using this to calculate both the height of the cell... NSString *cellText = [howtoSection objectAtIndex:row]; UIFont *cellFont = [UIFont fontWithName:@"Helvetica" size:15.0]; CGSize constraintSize = CGSizeMake(260.0f, MAXFLOAT); CGSize labelS...

How to create NSMutableArray of UILabels?

hi!! I have a problem here, Im creating UILabels dynamically to be displayed into a UIView, here is the code: for (flower in flowerList) { // Create the Qty label CGRect rectQty = CGRectMake(x , y, 25, labelHeight); UILabel *flowerQuantityLabel = [[UILabel alloc] initWithFrame:rectQty]; NSString *fQty = [[NSStrin...

iphone set a fixed font size for UILabels

I have several UILabels of various sizes on my Views. I want all the UILabels to have the same font size no matter how wide or tall my UILabels are. I have tried several settings in IB but nothing seems to get me that fixed font size. I am sure I am missing something simple. Can someone please clue me in? ...

Menu in uikit

I have been into cocos2d-iphone for ages, and today when i came back to uikit, i toally forgot how to create menu in uikit. UIButton isn;t really an option, a UILabel might sound good good. What do you say? ...

UILabel Strikethrough

Is it possible to stikethrough a UILabel at all? I can't seem to find the option... ...

UILabel: vertical alignment

Hi, I have an UILabel with two lines. Sometimes it's text is short. Then the text gets displayed in the center (vertically) of the UILabel. How do I align my text at the top (vertically)? Regards... ...

View loaded from nib will not update contents of UILabel while running in a method

Hi, I am having an issue with updating the contents of an "myInfoBox" object I created to be displayed while some background processes are done. In the delegate method I am creating a new viewController: -(void)loadMainView { myFirstViewController = [[MyFirstViewController alloc] initWithNibName:@"MyFirstView" bundle:nil]; ...

Can't get UILabel to display more than 3 lines

I have a tableivew with a bunch of cells and I am trying to get the uilabel to display more than 3 lines. I set the linebreakmode and the numberoflines appropriately, but it's still not displaying more than three lines. Any suggestions? The table cell automatically adjusts its height to accomodate the number of chars/lines, but the text ...

UISlider smooth update problem

Hi, I have a tableview with 2 labels and 1 slider on each cell. Now, the problem is when I change the value on the slider, I want to update one of the label on respective row. I tried attaching a selector [mySlider addTarget:self action:@selector(sliderAction:) forControlEvents:UIControlEventValueChanged]; and I set [tableView reload...