how to prevent uilabel text from shrinking? - objective-c

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 digits shrinks while counting down suppose if there is 1 and after it comes 0 then digit become large.and label acts like it increasing the font of that specific digit.
i want following things on uilabel.
a glow effect around the digits.
prevent shrinking(note-i have disabled the Adjust To Fit property of label)
also i want to know if there is any other font available than this to show text like
digital clock.
and finally a request from all of you.
is there a way to run countdown timer using images of digits.
here is an image what i want

Related

UIButtons Alignment

I am trying to implement like word cloud in my app.
The image shown is like word cloud with left alignment.
What I did was, for placing the buttons I am checking whether the width of the text is greater than total width of the screen, if it is greater place the button in next row i.e increment the y position, if it is not just place the buttons. Everything is working fine. But what I want now is , i want to move the buttons alignment, like, I want to start the first button from center of the screen. Please help me to do this...

NSTextField vertically misaligns text when using non-default typeface

I am having trouble making text fields look acceptable when using different typefaces.
See this screenshot taken from a test app I made to demonstrate the problem. It consists of a single XIB, with no code in the delegate or anywhere else. This is on OSX Mavericks with Xcode 5.1.1 but I haven't tried on other versions.
The default system font looks fine in the top text field, as you'd expect. Compare this to the one below: same exact size and shape, all I did differently was change the typeface in Interface Builder. Text is pushed downwards, and descending letters (lowercase pqjg) are clipped. The Menlo example below is also pushed downwards, though not quite as badly.
How do I fix this?
A quick test shows Lucida Grande and Helvetica require 17 pixels, and Menlo requires 19 pixels:
Note that this excludes the border and shadows, so you need your text view to be significantly larger than that to guarantee it will fit.
Interface Builder has been specifically designed for Lucida Grande, it knows it can get away with being too small because that font doesn't use all the space it has available. Doesn't work well with other fonts.
You can resolve this a couple of different ways:
• Enable "Uses Single Line Mode" on the Text Field Panel. When I first
encountered this issue it wasn't obvious that this would automatically
align the text vertically within an NSTextField.
or...
• Simply adjust the size of the NSTextField using the adjustment boxes
that appear after you click on it. You can also adjust them through
the "Control" properties.

Visual Basic 2010 Zooming

So I've created a graphing calculator style program to display vector lines and their resultant after addition.
My question is: for lines of greater size than the window size I have designated for display, how can I "zoom" in or out of that window with in the page. I have tried doubling the length of each line point, but to no avail.
Never seen a zoom on a single control. I supose you could just change the font size (on the MouseWheel event) of the textbox and that would give the same effect as zooming. If you want it keyboard based, you could use the key events and look for something like [ctrl]+ or [ctrl]-

How to resize UILabels to fit content?

My program currently has thirty UILabels that may contain numbers between one and three digits. I want my UILabels to expand and shrink horizontally as the numbers within them change size. At the moment the text is shrinking and the UILabels size remains the same.
If this can be done just using the xib file this would be preferable to doing so programmatically but if this isn't possible either would be great.
Thanks
After setting the text of the label, call sizeToFit on the label. This will make the label just big enough for the text.
BTW - why do you need to do this? Why not just make the labels big enough for the possible values and leave them that size? What benefit do you think you will get by shrinking the labels?

Fixed position for content of UILabel

I wrote simple iOS app which countdown the time til midnight. I have single text label which is used to display current time. I use NStimer to change the content of that label. The problem is that when the content of the label is changed (in every second)the content moves left and right for about 1px. Is it possible the position of label content to be fixed ?
The position of a label is fixed, make sure the text alignment isn't on center.
Why not make sure this never happens by always showing the time in HH:MM:SS format. Something like 01:11:05 etc. Make sure you override the text alignment and the minimumfontsize function to match the current font size