How can we set an equal spacing between two labels where contents dynamically loaded in iphone SDK - iphone

In my iphone app, i have a requirement for quote of the day.
I want to display the quote in the manner as quote and its author name.
I want that no matter how big or how small the quote is the author name should come below the quote leaving one blank line.
I tried using the two labels but it works well for bigger quotes but for small quotes the author name seems too far away from the quote.
I want equal spacing between quote and author name no matter how big or small the quote is.
What should I do?
Please Help and suggest.
Your suggestions are most welcome
Thanks

Why don't you size the text dynamically using size and constraint and depending on them create/set the two frames needed for the two labels? See this basic example:
http://www.cimgf.com/2009/09/23/uitableviewcell-dynamic-height/

Related

Crystal Report is automatically (randomly) adding white space after a sequence of text X's before a number in a field. Want to prevent the whitespace

I have a field that I'm sure does not have white space in it at a certain location, but for some reason Crystal Reports is automatically adding space to the field but only after X's in certain scenarios. This is a text field which I'm sure is pulling down from a text field in the db as well.
This is hard to explain without a pictured example, so here's what I mean:
Random Spaces
As you can see, there is whitespace after the X's. it should not be there, as this is not what is coming from the db. And strangely, when copy/pasted from the report, there is no white space either! Here it is when copy/pasted straight from the report:
"Test 15dig w spaces XXXXXXXXXXX2345"
Why is this occurring, and how can it be corrected? Currently there is no real formula for the field, it is just taking whatever it coming from the db straight into that field. The whitespace is being added automatically somehow, and I'm not sure at all why.
Here is what I've tried: Have tried calling ToText on the field (even though it is already a text field). Have also tried formatting the field in various different ways. Tried asking on SAP forum but no help as of yet.
Copy & Paste the text "Test 15dig w spaces XXXXXXXXXXX2345" into a text object in Crystal. Apply the same font and formatting (use the brush toolbar button to clone the formatting).
If you don't see the same strange space, the problem is due to non-printable characters in the database field. In that case, you can strip away such characters using a formula and the Replace() function.

Apache fop : Unable to handle if single Word in text is larger than the containing block

I am new to fop , will be greatful if i get help from someone...,
I am not using XSLT tranformation but creating XSLFO file directly using Java code. Everything works fine but the problem comes when particular word(long text without space) is inserted into a cell of a table-column . That bigger word is overlapping the successive block.
I have an fo:block element in fo:table-cell which is in fo:table-row of a fo:table. This table has 6 columns, obviously column width is small. Now, when a Word in the block is larger than the block it is overlapping the next block. Give me some attribute value or any other solution to change my XSLFO file ,so that the bigger word breaks into the new line at end of the column.
Thanks in advance...
The things you need to look into are:
For the fo:table-cell: number-columns-spanned="3"
For setting the width of fo:table-column: column-width="proportional-column-width(1.5)"
The number-columns-spanned is used as attribute of and provides you with a means to select a bigger area where your fo:block fits.
The column-width makes it easy to define absolute width or, when using proportional-column-width, a width relative to the other columns.
I don't know of a way that lets FOP break words into multiple parts when they don't fit.

Star symbol too small in a dialer-like view

I'm trying to create a dialer-like application:
I'm using [UIFont systemFontOfSize:33]. The problem is that the Asterisk symbol is too small in comparison to the numbers and '#'.
I printed 123*# in all 61 available iOS6 fonts and the star is smaller than other chars in all of them.
Does somebody have an idea how to solve this?
One thing I tried is changing font size only for * button. That works, but when I hit this button it appears small [off course] in the input above...
Hope my Question is clear.
Thanks.
Use a different character for the display. In Xcode, click on the Edit menu and select Special Characters. When the character viewer appears, type "asterisk" into the search field. Try one of the many other related symbols.
Depending on how you do this, you may need to replace the used symbol with a proper asterisk internally to use the result in a tel URL.
You can use attributedString and change the font size to big enough of all asterisks

How to display a lot of read only text in GWT?

I have a requirement to display a somewhat large amount of text, read only to the user. It can be up to a maximum of 500 characters, which isn't excessive, but it's still a lot. Since it's read only I was thinking of a label a versus text area box, if it can handle that much. Is there a better way to do this than I'm not aware of?
Thanks,
James
Label works fine. Just remember that the default css for white-space collapses whitespace rather aggressively. If your text includes line breaks you may want to switch to pre or pre-wrap.
The most straightforward (if not necessarily most correct) way to do that is:
Label myLabel = new Label();
myLabel.getElement().getStyle().setProperty("whiteSpace", "pre");
Note the Camel Case on the CSS attribute.
Either a Label or a TextBox will definitely be able to handle 500 characters.
Think of all the blog posts, Wikipedia articles, Stack Overflow questions, longer than that that have been written. They were all composed in a text box and displayed in a div. You'll be fine.
500 chars is no big deal so it will be ok. Label is ultimately calling element.innerHTML = text which is a browser-native Javacript function that can handle any amount of text.

Where to get a reference image for any unicode code point?

I am looking for an online service (or collection of images) that can return an image for any unicode code point.
Unicode.org does not have an image for each one, consider for example
http://www.unicode.org/cgi-bin/GetUnihanData.pl?codepoint=31cf
EDIT: I need to use these images programmatically, so the code chart PDFs provided at unicode.org are not useful.
The images in the PDF are copyrighted, so there are legal issues around extracting them. (I am not a lawyer.) I suspect that those legal issues prevent a simple solution from being provided, unless someone wants to go to the trouble of drawing all of those images. It might happen, but seems unlikely.
Your best bet is to download a selection of fonts that collectively cover the entire range of characters, and display the characters using those fonts. There are two difficulties with this approach: combining characters and invisible characters.
The combining characters can easily be detected from the Unicode database, and you can supply a base character (such as NBSP) to use for displaying them. (There is a special code point intended for this purpose, but I can't find it at the moment.)
Invisible characters could be displayed with a dotted square box containing the abbreviation for the character. Those you may have to locate manually and construct the necessary abbreviations. I am not aware of any shortcuts for that.