iOS: Create dynamic contracts with iOS - ios

I want to create a native ios application where people have to sign different contracts. Each contract contains text and input fields such as drop down and textbox. Now each contract might have different number of input fields and these might be totally different.
Any input in the best way to solve this problem? It seems like a lot of work to dynamically generate UI in code and reformat the contracts in a way that can be rendered by ios? As I cant send the pdf or doc itself.

One solution may be you can have categories(sector-1,sector-2 etc) and related sample contract from. In those sample forms you can handle dynamic controls which definitely a few.

Related

Handling hidden input on Google Sheets

How would you tackle the following problem, using Google Sheets:
User A and B bot need to submit an input (some text) to a shared sheet. The input must be hidden from the other user until both have submitted. Both users can change the input until the reveal, but not afterwards. Think of it as simultaneous action selection, except it's on different time zones so we can't just shout one two three go.
Currently, we are using salted hashes. That is inefficient and time consuming. I'd like to automate it. However, I don't know of any tool inside Google Sheets that allows you to hide inputs from other users under certain conditions, or anything that locks the input after both submit either (the submission shouldn't be tampered with unless both users agree, unless it's done before the other user submits).
This might need to be done with external coding, and I'm up to that (although I currently have no idea how to integrate it in google sheets). However I have never programmed something that read input from anything other than a terminal (or a txt file that one time it was required in class) so please provide some reference for that too. :)
Many thanks in advance!
Use a Google Form as the input tool. Then after both users have sent the input, share the spreadsheet with them. This could be done manually or with Google Apps Script.
References
Create a survey using Google Forms - Docs editors Help
Extend Google Docs, Sheets, and Forms with Apps Script - Docs editors help

PDF4NET pdf's not showing the bound content when viewed on iOS default pdf reader

I am using Version 4.4.1.0 of O2S.Components.PDF4NET
I am using this in an MVC project to run through a series of 6 views and fill an object with the data required for the PDF.
When the PDF is bound and emailed in the last step it works great. all except for when it is viewed by default PDF reader on iOS devices.
My company purchased this product on the cheaper plan so the 90 support is over and I cannot access any sort of forums from there site.
I read a similar issue regarding a button not being displayed on iOS but there was no resolution other then to email the company.
I hope that there is a viable solution as I would prefer not to have to cut my losses and change to a different product over something as short sighted as not supporting/testing against one of the more common platforms people use to consume media.
I'm not sure what you mean by 'bound content' but I assume you are talking about form fields.
Forms fields and annotations are not displayed by the CGPDF API in iOS, only the main page content is displayed. It is not a limitation of PDF4NET, it is a limitation of the iOS PDF display engine. The workaround is to flatten the form fields thus making them part of the page content.
If this is not your situation, please send a mail to support and they will help you.
Disclaimer: I work for the company that develops PDF4NET.

How iOS Google Now can show different card template

I wanted to know the technology decision behind the iOS Google app.
As we can see, in the app's Google Now feature it renders many different card templates for different scenarios, and those templates seems to be very flexible based on server inputs.
I was wondering if this is implemented all based on HTML5? or they just have many templates built in and render them locally? I'd vote for the HTML5 route but not sure if this still involved some native code to make it more responsive?
Thanks!
As we (well, most of the community) are not Google employees we can't tell you what they really did, but I'd say that it is possible to do this dynamically in the app.
We did develop something similar that responds to definitions sent by the server and transforms them to custom designed forms following basic rules.
Google reuses the design of those cards for different plattforms, the easiest solution should be showing some WebView and using HTML5.
I agree with Kevin, as this answer is entirely based on personal opinion, too.
The way I would go is to create a card class which will load some JSON data and format it with HTML and CSS. Looking at each card it would be hell to format things that way natively. I mean, attributed strings is not the way to go. Too much logic for deciding which card get a bigger text or a picture.
Additionally, the top header is most likely "localized" as well, so you get the location and load a localized image. But that is Google by nature.

How to make inline LabelFields

I'm working in a Blackberry app (OS 5.0) and need to show recent tweets of the user.
I'm able to get the data from Twitter's end. Now after parsing the entities (hashtags, urls, user-mentions etc), I need to display them with separate formatting (color, bold etc). So I'm using different LabelFields for different parts of the tweet.
But LabelFields are by default block elements. How do I put those LabelFields inline, so that it looks like how it is shown in Twitter?
like this:
Others have suggested RichTextField but you'd have to write your own text filter to colour the syntax - it's going to be a lot of effort. If having the clickable links inline is a must then personally I'd use a BrowserField but that would mean your logic would have to output a full screens worth of tweets into html (screens don't like having more than one browserfield - it's doable with more than one but there's some hacks) and manage the click events - more complications.
Alternatively you could do something like this: http://devblog.blackberry.com/2009/10/how-to-use-table-view-layout/ You wouldn't have clickable regions within the text body but it'd still be using native fields instead of 'cheating' with markup, probably the best way.
I've found that there's a component in Blackberry SDK called ActiveRichTextField which automatically scans its contents and parses links making them focusable and clickable. Furthur it'll also parse entities if Twitter app is installed in that device. For now it solves my problem. Thanks guys.

Rails Sanitize: Safety + Allowing Embeds

We're building a user generated content site where we want to allow users to be able to embed things like videos, slideshares, etc... Can anyone recommend a generally accepted list of tags / attributes to allow in rails sanitize that will give us pretty good security, while still allowing a good amount of the embedable content / html formatting?
As long as is turned off, you should be able to allow objects. You might even be able to to define the actual acceptable parameters of object tags, so that you only allow a whitelist, and abitrary objects cannot be included.
However, it may be better to provide some UI support for embedding. For example, I prompt the user for a YouTube URL and then derive the embed code for the video from that.
Several benefits:
- the default YouTube code is not standards compliant so I can construct my own Object code
- I have complete control over the way embedded elements are included in the output page
Honestly saying allowing users to use WYSIWYG Html editors might sound good, but in practice it just doesn't work well for both users and developers. The reasons are:
Still too different behavior in different browsers.
Whitelist allows to secure site, but users will end up calling and asking to allow another parameter for OBJECT tag or similar. Blacklists are just not secure.
Not many users know what HTML tag is.
For users it is hard to format text (how can you tell them to use HEADER instead of BOLD+FONT-SIZE).
Generally it is pretty painful and you cannot really change the site design if needed because of users did not properly use HTML.
If I would be doing CMS-like system now, I would probably go with semantic markup.
Most users, get used to it quickly and it is just plain text (as here at SO).
Also YOU can generate proper HTML and support needed tags.
For example if you need to embed picture you might write something like:
My Face:image-http://here.there/bla.gif
Which would generate HTML for you like this:
<a class='image-link' title='My Face' href='http://here.there/bla.gif'>
<img alt='My Face' src='http://here.there/bla.gif' />
</a>
There are plenty of markup languages around, so just pick the one is more appropriate to you and add your own modifications.
For example, GitHub uses modified markdown and the code to parse it is just a couple of lines.
One disadvantage is that users need to learn the language and it is NOT WYSIWYG.
Regards,
Dmitriy.
There's a great project for this. It even has embed-analysis to only allow youtube embeds, for example
https://github.com/rgrove/sanitize

Resources