uilabel

What are UILabel's initWithCoder encoded keys?

I have a subclass of a UILabel that overloads initWithCoder and I was wondering if anyone has any documentation on how the coder is encoded so that I might be able to get information that comes from IB myself. Thanks. EDIT Reason for doing this: I would like the font name given in the xib file. Apple's implementation of initWithCoder ...

Way to draw NSString on a curved path?

I have been looking for any example code for drawing a UILabel (or just an NSString or something) on a curved path, but have come up empty handed. Does anyone know whether it's possible to draw text on a curved path, like a circle or something, without using separate pieces of graphics for every single letter? ...

Background of UILabel visible after a composite.

I am doing something a bit unusual. I'm trying to tint all the components in my application red (you may have seen some other postings from me about this, but this is something more specific). To do so, I'm intercepting all calls to CALayer's drawInContext: and after calling the original method, I composite red onto the layer using kCG...

iPhone's UILabel with URL detection

I'm looking for an iPhone control that can simply display some text and detect URL's (http, email, tel) inside that text. UILabel doesn't support URL detection. UITextView can do that, but it's too heavy for use in chat application that I'm developing. Any suggestions will be appreciated. ...

Language Based Scanning in a UILabel

Hello, I'm developing a twitter client (YES, another one) for the RTL languages. How can a UILabel alignment be configured depending on the language of a tweet. So if language of the tweet is Arabic for example the alignment would be UITextAlignmetRight and vice versa. ...

Placing UILabels next to each other programatically

I have three UILabels of varying widths that I'd like to line up next to each other. How do I get update the frame's X value? Here's what I have: UILabel *contractLabel = (UILabel *) [cell viewWithTag:200]; contractLabel.text = [board getDisplayLevel]; UILabel *contractSuit = (UILabel *) [cell viewWithTag:201]; contractSuit.text = [b...

How to display the copyright icon in UILabel text?

Hi, Does any one know how to display the copyright icon in UILabel text? This is the icon with a circle around c. The html code for it is: © or ©. I tried the following code: UILabel *contactInfo = [[UILabel alloc] initWithFrame:CGRectMake(-55,135,420,100)]; contactInfo.text = @"'©):'2009 Nationwide "; or contactInfo....

how to prevent uilabel text from shrinking?

i am showing digits on uilabel and using timer to update text something like counting down.. i am using this font to show time like lcd clock [CountdownLabel setFont:[UIFont fontWithName:@"DBLCDTempBlack" size:48.0]]; i am facing two problems in this. using this font the dots(:) between the digits is smaller than the digits. the dig...

UITableViewCell - how to make right UILabel truncate instead of left one?

I have created a UITableViewCell using UITableViewCellStyleValue1, which the Apple docs define as: A style for a cell with a label on the left side of the cell with left-aligned and black text; on the right side is a label that has smaller blue text and is right-aligned. The Settings application uses cells in this style. I am tryin...

Variable height UILabel

I'm working on a iPhone product page where some of the fields can be fairly long (product name etc.) I've created the page layout in IB, and use UILabels to show the text fields. For those long text labels I'd like the height of the label to scale and push the other labels further down. Is this possible using IB, or would I have to do ev...

iPhone UILabel text soft shadow

I know soft shadows are not supported by the UILabel our of the box, on the iPhone. So what would be the best way to implement my own one? EDIT: Obviously I will subclass the UILabel and draw in the -drawRect: My question is, how do I get the contents of the label as graphics and draw around them, blur them etc... ...

Animating Frame of UILabel smoothly

Hello all, I've been trying to figure out a decent way to smoothly animate a frame size change on a UILabel, without a weird starting jump redraw. What happens by default is that when I do something like this: // Assume myLabel frame starts as (0, 0, 100, 200) [UIView beginAnimations:@"myAnim" context:NULL]; [UIView setAnimationBegi...

Where to place the update logic for a custom UITableViewCell? (iPhone)

Hi I just have a quick "best practice" question regarding custom cells in a UITableView. My problem arises when I have build a custom cell in the if(cell == nil) block in the - (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath (1) If I build labels and set the text property of the...

How to create multiple labels for iPod Touch

I want to use two labels on the same view in an iPod Touch application. I have created the two labels, but I only know how to access on of them. Does any one have an example of how to do this? ...

iPhone - Memory leak while displaying UILabel.

hi, I am using a simple function to display messages to user through a label. The function is as follows: -(void) showMessage:(NSString*) message { Message.text = message; [message release]; } There is no memory leak if I call this function from the main thread. But if I call this function from a separate thread, the instruments m...

UILabel only displaying odd objects in NSArray

I have an int which defines the objectAtIndex, which gives it to the string, which then displays it in the UILabel, HOWEVER, when I modify the array (add a word to it in this case) when I have the UILabel go through the array it only displays the odd ones. I have done an NSLog and found out that it DOES PASS EVERY SINGLE THING to the st...

UIPickerView with Multiline UILabel

I'm currently working on a program that populates a picker view dynamically from my Core Data set up. I have everything working data-wise but the problem i'm running into now is formatting on my labels. The picker is presented with it's own toolbar in an actionsheet with a button on the right side of the toolbar. It's initial state is ...

Simple Q about UIPickerView properties

Ok this is probably so simple that it's laughable, but I can't figure the answer. What is the property of the uipickerview? For the UIDatePicker, its datePicker.date, for label you can do label.text, etc etc. Is there a pickerView.XX syntax where I can get the value selected similar to the datePicker? Please let me know. Thanks ...

Multi-line UITableViewCell using UITableViewCellStyleValue2 style

I'm trying to figure out how to replicate the UITableViewCellStyleValue2 style so that the detail text can be multiple lines - as seen in the 'address' cells in the Contacts app. Like the Contacts app, some of the fields (like street name) are optional; so it would show say 3 lines instead of 4, if the street was not nil. I'm I missing...

Is it possible to use something like an IBOutlet array?

I have a top list view in my current iPhone app, that's populated by code. I've assembled the view using Interface Builder, so it contains lot of UILabels. Obviously I wouldn't like to have name1, name2, etc. outlets in my class, but prefer a name[10] array. Is it possible to do so, and connect each item to the appropriate label? ...