Swift 3 - UIScrollView - json

I need a little advice on the following problem.
In my App I call JSON data from the server, however I have no control on how much text each field will have.
Say Description: it could be anything from a single word to 1000 words.
I am looking for the Best approach on displaying an unknown amount of text
i.e. My terms and conditions is 5000 Words, but the Privacy policy is only 2000 words.

In Scrollview Keep LABEL and make LINES of label as 0. set top,bottom,leading and trailing constraints.
as shown here https://stackoverflow.com/a/24136440/5413426

Related

Microsoft Access 2013 Long Text limiting to 255

I have a database that has a field of type long text. It only allows 255 characters and if I add more then it truncates. Tried creating a new table and importing and same issue. Any ideas?
By default the Long Text (which was called Memo before Office 2013) is set to Plain Text which effectively limits the field to 255 (making it not much better than Short Text).
You have to go to the design view and change your field to Rich Text.
(taken from http://answers.microsoft.com/en-us/office/forum/office_2013_release-access/long-text-limit-254/7b927011-769f-416d-b0f7-352770270808?db=5&page=2)
Useful answer. Except if the field is full of HTML tags (which one wants to keep as tags). If one makes the field 'Rich Text' it interprets the contents and one loses the tags. A less than ideal condition.
Check the Format property of your long text field in both the database and any forms for the # character.
I removed the format character of # and everything appeared. All data over 255 characters was correctly saved in the database but subsequent views of the data only displayed the first 255 characters.
I don't like using Rich Text because it easily causes problems if you try and export the data to Excel or other formats because of the additional formatting characters in Rich Text format.
I found my solution was to set the query's Subdatasheet name to [Auto] (although after re-opening the query this field appears blank) the query now exports the long text in full. I hope this helps.
When you are in the export window, click advanced. It shows a grid of field information.
If you put your mouse over the 'Field name' heading and then move it right the cursor turns to a line with 2 arrows, move farther to the right and it turns to 2 lines with a space and 2 arrows. Click and drag right and you by magic get the skip field, go back to field name heading , do the same again and you magic the indexed, repeat and magic the width then the start and next time the data type. Ah the data type says it will be exported as a short text field, change it to long text and that is what it exports.

Would it be more appropriate to use a type="tel" attribute for a postcode rather than ="text"?

As the title says.
Would this would be better than type = number or text because of the fact that it automatically only allows user input of a number, rather than the user still being able to type in letters even when a constraint has been placed on the text.
Edit: I know that this is obviously not semantically and correct to do this as it is a different data type and also is not yet fully supported in browsers. But could it (in theory) be used to substitute text for a page that had really no server side interaction and is basically used as a 'example' for what the user should expect when filling in the postcode section of a form. This is considering the website user are also from the same country with the postcodes all being numbers.
"To be used for aesthetic display purposes only?"
No, it would not be appropriate. tel is for telephone numbers. And some postcodes contain characters. (for instance: Nova Scotia - B4V 2K4 )
You shouldn't use either, they are really not supported yet (tel and number).
Instead, I'd create an input text, and check the format by using a regular expression (or a list of a limited range of postcodes if you need so).
hope it helps.

Scroll Multiple Text Fields using Action Script 3.0

I am trying to build a Flash application which would display data from a external source and scroll it from left to right.
I am new to action script world, i have found an example in which text is scrolling but here there is only one text field. I would like to have multiple text field depending upon my data loaded from external source. How can i achieve it. Do i need to create 10 text fields if my external data returns 10 records.
Any advice on this would be appreciated. Thanks
It depends on your task, if you need 10 lines of text information that moves independently, so you will need 10 text fields. Or you could scroll one text field and change it's content with a new information (next record). For scrolling of the text field you will need Timer or Enter frame handler or Tweening engine, as for changing text you will need some logic, like if text goes offscreen - show another text data.
For me, your question looks very similar to this one, check it, maybe it will be helpful for you.

Scroll a number of lines in a Spark textarea

I am writing a database program that allows searches for imported books. On the left hand side of my screen is a Spark TextArea and on the right is a List that shows the results of the search.
When I click on the List, I load the chapter into the TextArea. Here is my problem that I simply cannot figure out. I want the top sentence in the TextArea to be the sentence that was clicked in the List.
I know how many sentences are in my TextArea because I control the "\n". How do I get line xx at the top of TextArea?
For instance, the user searches for "truth" and finds 20 entries for this book. He clicks on a choice in List. That chapter is loaded into the TextArea. This particular chapter has 400 lines. The line I want at the top is line 230. The user can immediately see the context for what follows his choice. He may scroll up to see what precedes.
I've searched and tried a host of ideas but with no success.
Can anyone help with this?
Thanks!
Use TextArea#scrollToRange(). You just pass in the index of the first character of the result and it will scroll to the position you want. I've used it in the past and I remember it working, though it can take some work to get it working exactly as you want.

Some of the page numbers are repeated when exporting to word

I have a report with 50 pages. I have one list control, and this list control contains a table control. I am using grouping in the list, with a page break at the end. I want each group on one page. For example, if the size of my data is bit more for some of the pages then it moves to the second page.
The problem is I am getting some of the pages with the same number where data for one group is more than one page. I am using this expression in the footer:
format(Globals!PageNumber & "of" & Globals!TotalPages)
When I have 50 pages then after exporting to Word I will get 45, becuase 5 or 6 pages will be repeated, giving "1 of 45" instead of "1 of 50".
Note that I am using SSRS 2005.
This is an older question but recently ran into this issue myself so it might help someone else.
There are a lot of examples out there that use casting in the examples for the page number display (CStr or ToString()). Whenever I invoked those methods, the counts would be off when exporting to Word (either doc or docx).
The only way I could get it to work is with three separate text boxes in the footer with these expressions:
=Globals!PageNumber
"of"
=Globals!TotalPages
Avoid the use of those other approaches (including the wrapping Format function -- I don't think that's doing anything). Three separate text boxes was the only way I could get this to work.