How to add text below images in Marp? - marp

I'm writing slides with Marp. I have several images and I want to add discription about them. How can I add suitable layout?
That's what I want. I try to use [bg] but the text will cover images.

Related

How to approach for creation of below Custom View?

I have a view as below. Which have dynamic image whose height can vary and the text on right side of image and below the image. Both text should come as paragraph as we see in textbook. So what is best approach to achieve this. Is it possible to have both paragraph in implementing with one UILabel?

Rectangle Layout in IOS Collage App

I want to make a collage application like "Pic Collage"
https://itunes.apple.com/in/app/pic-collage/id448639966?mt=8
Here I am stuck in a functionality in which we can make collage for predefined rectangular layouts.
When we select any layout the pictures on screen automatically fitted in the selected layout design and layouts are dynamic with number of pictures on the screen.
Please suggest how this functionality of creating layouts and fitting images in the layout can be implemented?
Following is link to layout that I am looking for:
1. https://www.dropbox.com/s/ge4mhx9vkyb9s2n/IMG_4914.PNG
If you going to use templates as shown in the application then you can be sure of how many grids would be needed. In that case based on the selected template you could use variations of UITableview and AQGridView. You can customize it according to requirement.
Also you could look into Collection Views.
I would have probably added multiple UIImageViews based on the templates and provide feature for addition of images by handling the touch event.

RichText label or 'flow' layout for text in iOS (Xamarin/MonoTouch)

I am trying to repduce a similar sort of layout as in the screenshot below from the Digg app..
Notice that each list entry has a title in bold followed by the source, posted time and finally if there is enough space the start of the description line.
The question is what is the best way to achieve this in iOS? With some posts having longer titles than others I cannot simply say that the title label is 40px high and then place the Source label at 45 as the title will sometimes be longer and sometimes shorter.
Do I have to calculate the height of the label based on its contents before arranging the layout or is there some better way of doing this in iOS so that the views 'below' are automatically moved down?
Another alternative would be some sort of rich text label that I could add all the text to and have it automatically wrap round moving the later text down but I cannot find any sort of control in standard iOS / Xamarin (MonoTouch).
Any pointers would be greatly appreciated?
If you are using a storyboard the simplest way to achieve this result is to define different prototype cells. For example, you could define four different prototype cells, each one with a different layout like those shown in the example picture you provided. You can dequeue the appropriate cell based on the content you want to display so there is no need to adjust the layout in the code.
If you are doing everything in code, it's a lot more complicated since you have to build your own "layout engine" to adjust size and position of the views in your cell. You can have a look at XibFree or use MonoTouch.Dialog as suggested in the comments.

Best way to create a bar graph with UIImageView?

I have a UITableView with several sections. In each section are rows with various items. I have a custom UITableViewHeaderFooterView for each section and I would like to set the background image for each one to illustrate a particular percentage associated with each section.
I was thinking I could have a simple image with a line and two colors on either side and somehow scale/translate this image so that the line and bar color would fill up the table header from left to right in accord with the percentage value for that section. This changes so I would need to be able to re-draw it whenever the values change.
I figured that if the image did not scale to fit, but rather the left and right edges were set to bleed instead of tile, then I could just reposition the image in the view. But I'm not quite sure how to go about that, or even if that's a reasonable thing to do. Just looking for advice on a good approach for this sort of effect.
You can add image to the image view and can show the percentage of the image to the image view as per the percentage you get in that particular sections.Fill your image view with full image and display the percentage accordingly.
Instead of using an image, create a custom UIView subclass. Give it a property or two to represent the data. Then implement the drawRect: method to draw the graph.
Use this custom view in the table header/footer view instead of an image.
This has the advantage of being more flexible. If you want the graph to be fancier or different, just update the drawRect: method as needed.

Embed images within a block of text on iPad

I would like to embed an image within a block of text. The image would be 1 line high. I am able to drag the image around over the text but I want to be able to insert it between words (with the words wrapping in the textview accordingly)
Any ideas how I can go about this?
Thanks.
You could try to use CoreText, and create text boxes on all four sides of the image.
http://developer.apple.com/mac/library/documentation/Carbon/Conceptual/CoreText_Programming/Introduction/Introduction.html

Resources