uilabel

Enable copy and paste on UITextField without making it editable

I want the text in a UITextField (or ideally, a UILabel) to be non-editable, but at the same time give the user the ability to copy and paste it. ...

"My account" or "Your account" labels

I have somewhat of a strange question that is not really technical, but I do hope to collect meaningful advice. I'm building a large web application, basically a photo sharing community site. As part of this site, logged-in users can go to their profile, from which they can see their own things (images, comments, votes) as well as edit...

UITableViewCell reorganize subviews when the 'delete' button appears

Hi everyone! Does anyone knows any method to resize subviews(I.E. UILabelView) when Delete button appears. There could be two methods: 1.Capture a notification, if there's one, when the button appears in the UITableViewCell 2.Tell the framework re-arange it automatically. ...

dynamic calculation of UILabel width in UITableViewCell

Hi everyone, I am building a custom, in-application settings view based on UITableViewCellStyle1 (or so). I'm trying to dynamically calculate the width of the left label (title) of a cell in order to determine how wide my text field on the right can be. When I launch the app in the simulator and the view loads, the width of the title la...

Zoom UILabel & Re-render font at correct size

I have a multi-line UILabel that I want to enable zooming on. I embedded it with a UIScrollView and set min zoom to .25 and max zoom to 4. This works well, however my UILabel's font looks rather gross at any zoom level other than 1. I can handle this method: - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView ...

Resize UILabel text with swipe to delete

I am having some trouble getting my application to properly resize the text of UILabels when the user does a swipe to delete or other type of delete. Currently, the delete button is covering up the text that is in the cell (if it is really long). I would like for them to operate like how SMS (move clipped text down a line) or iPod (del...

Blurry UILabel as programmatic subview of UITableViewCell contentView

I am adding a UILabel instance as a subview of my custom UITableViewCell instance's contentView. When I select the cell, the row is highlighted blue, except for the background of the label. The label text is sharp. When I set the label and content view backgroundColor property to [UIColor clearColor], the label text becomes blurry. Ho...

UISegmentedControl delegate/Touch Events

I have a UISegmentedControl that has six segments, I want them to call a method when the value changes, but also when each segment gets a UIControlEventTouchDragIn because I want a UILabel to show up with it's name when the person is trying to select something on it and drags their finger across the control, but the segmented control doe...

UILabel starts wrapping text at the wrong spot

I have a UILabel that breaks text into multiple lines and I would like it to break on a "-" rather than the middle of the first chunk. Say I have this text: Center-World I want my label to display: Center- Word It is displaying: Cente r-Word There is space for at least the "r" in the first ch...

Is there a japanese kana font on the iphone by default?

I was wondering if there is a built-in font for Japanese kana in the iPhone OS? I was wanting to display kana characters and figured it would be easier to generate them in a UILabel as text versus creating a .PNG and display them in a UIImageView. I would want this to be available to non-Japanese iPhones/iPods. I'm not 100% aware if...

Multiple UILabel or just one?

I have a text which looks like the following, the url of the page is http://www.myurl.com, and the phone # is (999)999-9999, blah blah blah... And I want to show it in a way such that the URL and the phone # are both in different color and bolded. Can I do it using just one UILabel control, or I need to parse them out and put them on...

Objective-C Cocoa-Iphone Bind label to variable

Hi all, I am a complete newbie to mac/objective-c. My question is: I wonder if it's possible to bind a UILabel text to a variable, for not having to manually set the text when value change. I explain it better, on mac os, when I open a new finder window and delete a file, then the global free space in the taskbar is changing. And that ...

Align the text to center in headerlabel in iphone

I am new to iphone development.I have displayed the text in the header label.Now i want to align the text to center. I using the following code - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { UIView* customView = [[UIView alloc] initWithFrame:CGRectMake(10.0, 0.0,300.0,44.0)]; UILabel * heade...

Can font size of UILabel be changed with smooth animation on iPhone?

I want a UILabel to swell slightly when selected like in some game menu screens. To get smooth resizing I presume I should put some change to the label's properties in an animation block. The obvious thing to try is to change the label.font.pointSize property but that's readonly. Scaling the label's .transform property with CGAffineTra...

Problem setting Value for UILabel (iPhone SDK)

Hi all, I'm reasonably new at the iPhone SDK, so please forgive me if this answer's ridiculously obvious. I have a ViewController connected to a .xib file (they are called FirstViewController) I also have a custom class called MyCustomClass. In this class, I have a method like this: - (void)setTheText { [myLabel setText:@"foo"]; ...

Is fast UILabel rotation possible?

Hello all, I want to work in landscape mode only and so far the only way I can get the appropriate coordinate frame in the rest of the application is by rotating the main window using: CGAffineTransformMakeRotation(3.1415/2.0f); which rotates all subviews as well. It works great, except when I want to draw UILabel, frame rate drops li...

Calculating multiline text height for UILabel/UITableViewCell: different results when calculating vs actual drawing

This general topic has been asked here multiple times: how to render UITableViewCells with varying amount of text and thus varying height. The canonical answer is: you calculate the height in table view controller delegate in heightForRowAtIndexPath using sizeWithFont:constrainedToSize:lineBreakMode:. Later, the cell gets drawn, and you ...

Add a UILabel in iPhone

Hi all, I have a tableView which displays a list of songs, when i tap on any one it gets played. -(void) PlaySelectedSong:(id) sender{ Song *aSong=[aCategory.Items objectAtIndex:appDelegate.selectedSong]; NSString *content1=[[NSString alloc] initWithFormat:@"http://192.168.50.108:8888/%@",[aSong.Link stringByTrimmingCharactersIn...

Updating/Removing UILables from View

hi, i'm creating some UILabels in my UIView, filling them with data, adding them to view and releasing them UILabel *speed = [self scrollLabel:@"some Text" x:455.0f y:75.0f]; [scrollView addSubview:speed]; [speed release]; the method: - (UILabel *)scrollLabel:(NSString *)text x:(float)x_ y:(float)y_ { UILabel *label = [[UILabel al...

UILabel strike/cross out

Has anyone a idea how can i strike/cross out a UILable with Anmimation - like a "Todolist function"? In Objective C.. ;) ...