CoreText with multicolumn with image? - ios

I want to design like below:
I am using core text to draw a multicolumn, i can show it up, thats not problem, need to show image as static like image,
First three column need to show, the fourth column will show by scrolling horizontal.
1.Need to add hyper link to video url.
2.Need to design like above..
Sample tried with two ways:
https://github.com/karthisiva/CoreTextWithImage
The content will be html text.

Related

Auto page break while creating PDF in iOS (Swift)

I have to create a PDF which contains data like a quotation document (text, tables, images, etc.). The data varies from 1 page to 3-4 pages. A table cell may have combination of text and images. Also, I have custom graphics to be rendered in PDF to show different shapes.
Example format:
I have tried PDFKit provided by Apple. I was able to draw individual parts. But I don't know how can I achieve auto page break mode (which shifts data to new page when there is no more space available in a page). One way to achieve this is that I have to calculate individual heights and divide data into pages as per available page size.
Is there any better way to do it using PDFKit?
I am also aware about creating PDF using UIGraphicsBeginPDFContextToData(). It also doesn't support auto page break. We have to call UIGraphicsBeginPDFPageWithInfo() for each new page.
I have also tried TPPDF and SimplePDF. Both don't support either page break on table or custom views.
I also can't go for HTML to PDF solution as I have custom views to be drawn in PDF.
Which is the best way in iOS to create PDF with above mentioned requirements?
"One way to achieve this is that I have to calculate individual heights and divide data into pages as per available page size." - this is the only way as PDFKit does not include automatic data layout and auto page breaks.

Create edittext like stackoverflow tag text box

I want to create a multi lined edit text that can hold buttons but also have the ability to add free form text.
It should behave like the tag text box of stackoverflow that is under the body of the question when you ask a question on stackoverflow.
I thought about one layout that holds buttons (e.g. tags) and an edit text right after said layout. But as I want it to be multi-lined and if there was a line break, I'm not sure how the edit text should behave, since it couldn't be a quadratic box anymore.
Can you point me in the right direction? I've seen a post about making parts of an edittext uneditable. I could do this and put buttons over it, but the buttons might be a little bigger than the underlying text.
Do you know of alternatives?
I hope you get the point, if not I'll draw the control.
You can achieve same by using FlowLayout. Keep on adding text/button view it will automatically wraps contents to next line

Creating a signup form using a tableview in xcode (like SnapChat)

I am looking to improve my app's signup and login form from standard text boxes to using table rows (or something similar).
I am pretty much inspired by the forms which SnapChat have created, which you can see below...
I'm trying to figure out how they accomplished this, and am thinking it must be a table view with 3 cells (Static?), and the text below is part of the footer of that selection of cells.
How is one able to then capture data into it directly?
Am I right in maybe assuming that each cell is 'custom' with a text field in each one (with placeholder text) with a no-borders style on the text field?
Or has this been achieved via some other way?
Keen to hear your thoughts. Thanks!
You absolutely could do that with a table view. But I don't think this one is. Notice the divider lines start at the far left rather than at 15 pixels in (with the text). The separator lines are also two pixels tall rather than one. So I'd say it's a safe bet that it's just a simple view with 1 pixel tall UIView's for lines.

Corona sdk - displaying image inside a text body

I am using the corona sdk to create a list of items in a tableview, once and item is selected I then display a bio for that item, and also want to display an image.
I can do this fine, but how can I right align the image in the body of text and get the text like flow round the image? I am using native.newText to display the text.
Similar to having a right aligned image inside a tag in HTML.
You cannot do that automatically, you need to detect the image dimensions (I suggest using myImage.contentBounds ) then place the text near it as you wish.
In a app of mine we display a picture, some basic data, and a detailed description, what I do is put the picture, then place the basic data to its right, and then place the detailed description below both.

What UI element might this be? (Custom tab-bar?)

http://www.flickr.com/photos/fraserspeirs/4329430635/in/set-72157623224262135/
The above is a link basically showing the form fill view of the numbers app on the iPad. Any idea as to how to achieve such a functionality which sort of looks like our vanilla tabs on Chrome?
You could do it with just buttons set to Custom type and using an image for the background. Then when they are clicked, bring the specific UIView to the front.
To create the tabs from a single image use UIImage's stretchableImageWithLeftCapWidth: topCapHeight:
http://tcninja.blogspot.com/2010/09/ios-adding-stretchable-uiimage-as.html
This will let you dynamically set the image's width in a way that will use the middle of it to fill the new area rather than stretching (and warping) the outer edges.
I would have implemented this with simple UIButtons. All you need to do is to style them (pngs or whatever), and track which one is the current.

Resources