I've seen at least one application that uses a grouped UITableView with a cell containing paragraphs of text, and the cell is taller or shorter based on the length of the text, but I don't quite get how this is done.
How does one, given a variable width font, figure out how high a UITextField or something needs to be in order to display...
Sometimes when I program for the iPhone, I wonder when you have to allocate and initialize objects and when not to. When you are using UI controls, it seems as if you don't have to do so. Is this true and why?
(Assume that they have been declared in the .h of the view controller.)
Example:
label1.text = @"Hello";
vs
label1 = [[UILa...
Hi,
I'm experiencing issues when converting decimal to currency for Korean Won, Cambodian Riel and Iranian Rial and showing the result to the UILabel text.
Conversion itself passes just fine and I can see correct currency symbol at the debugger, even the NSLog prints the symbol well.
If I assign this NSString instance to the UILabel t...
Alright so I have a situation here that is making me go crazy. I am loading a UITableView with a custom UITableViewCell. Now this cell has couple of UILabel's in it.
so the order is:
Label1
Label2
Label3
Label4
Now Label2 has a fixed height. Label1, Label3 and Label4 will need to change their height according to the size of string. I...
The Situation:
Somewhere in my app I start downloading data from my server. Before downloading starts, I would like to update a UILabel to say @"Now Downloading...". And set it back to blank when downloading is over.
The Problem: It seems like the download takes up all of the computers attention, and the UILabel never gets updated unt...
Hola! I have an issue I thought I would throw out to the S.O. world before I spent a lot of time on it.
Basically I have a requirement where I am getting a string of text which has inline images, like for a chat bubble in a UITableView. These images are akin to sparklines and/or emoticons.
Normally for something like this I would use a...
Hi,
I have a UILabel that displays the current date for the current view of my scroll view. When I scroll this view to the left (to the left pages), I'd like this label to change to the day before, with a crossing effect between the 2 dates.
I take as reference the fading effect of the Springboard when you scroll to the Spotlight page....
I'm adding a UILabel to each cell in my table view. This presents no problem innitially. When I round the corners of the UILabel using layer.cornerRadius scrolling the table view grinds to a halt.
UILabel *label1 = [[UILabel alloc] initWithFrame:CGRectMake(cell.bounds.origin.x+10 ,5, 30, 30)];
label1.backgroundColor = ([[managedObjec...
I'm trying to sum the integers from five UITextFields and post them to a UILabel.
This is the code I have tried, but it doesn't work properly. The number that shows up in the label is not the sum of my textfields. I have also tried to post to a textfield instead of a label, with the same result. No errors or warnings when I build.
int ...
Hi
I have a UILabel in UITableView. Here is the code i have written in cellForRowAtIndexPath
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithFrame:CGRectMake(30.0, 5.0, 250.0, 35.0) reuseIdentifier:CellIdentifier] autorelea...
Hey All.
Im trying to do something that I think is super simple.
i have 3 integers - prevgues1 , 2 and 3
and i have 3 UILabels prevguess1, 2 and 3
the ints have 1 less s.
When I set the text of the label so
prevguess1.text = [NSString stringWithFormat:@"%d", prevguess1]
prevguess2.text = [NSString stringWithFormat:@"%d", prevgu...
I have two UIPickerViews set up on one view under the same view controller. The picker's seem to be populated with values as expected. I also have a label for each picker. The label updates with each value change, but the value displayed on the label is not correct. It's always off by 10. The codes are below.
Interface:
#import <UIKit/...
Hi,
How can we show asian unicode values in UILabel
\U2013\U00ee\U2013\U00e6\U2013\U2202\U2013\U220f\U2013\U03c0 \U2013\U00ee\U2013\U220f\U2013\U03c0\U2013\U00aa\U2013\U221e\U2014\U00c5
Thanks
...
Hello all,
I have a feeling there is a simple way to do this. I have a number between 1 and 100 and it is stored in a variable called firstValue. This variable is then put into a UILabel. When the user exits my app, I want this firstValue to be saved so that when the app is loaded by the user this number can be re-inserted into the UILa...
Is there a way for UILabel to draw a border around itself? This is useful for me to debug the text placement and to see the placement and how big the label actually is.
...
Is it possible to alter the text of a UILabel whist its superview is being animated by UIView animations?
Say I have labelView as a sub view of containerView. timerFired is being called during containerView being animated (never before or after). I'm calling setText of labelView during the animation, but its text doesn't change. Is ther...
Let see that I have a string look like this:
NSString *longStr = @"AAAAA\nBBBBB\nCCCCC";
How do I make it so that the UILabel display the message like this
AAAAA
BBBBB
CCCCC
I dont think, '\n' recognize by UILabel, so is there anything that I can put inside NSString, so that UILabel know that it has to create a line ...
I need to place labels with a transparent background over a variable-content UIImage. Readability will vary significantly depending on the relationship between the color of the label's text and the color/luminosity of the area of the image displayed under the label. Since the image will be constantly changing, the color of the label's te...
Hello All,
I'm actually starting to loose the will to live, this piece of code is driving me nuts!
I'm trying to get the content of mathspractice.txt into *myLabel
I'm using an array which is:
-(void)loadText
{
NSArray *wordListArray = [[NSArray alloc] initWithArray:
[[NSString stringWithContentsOfFile:[[NSBundle mainBundle...
Ok I am trying to show a number using a series of Images.
eg. show int 123 by using images 1.png, 2.png and 3.png
can someone tell me how can this be done using on iPhone? There are few apps that display time using dotted numbers etc.
OR should i embed a font to display the number in fancy way?
...