Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 14 lines (13 sloc) 1.673 kb
05f7dfa @Cocoanetics Added demo for rounded rectangle text boxes.
authored
1 <h3>Text Boxes</h3>
2 <p>Block-Level tags (like P or DIV) can have a padding and background color.</p>
edd03f7 @Cocoanetics Fixed problem with text box padding
authored
3 <p>Note: Only one level of boxing is properly supported. This is a crude workaround as CoreText does not support NSTextBlock on iOS.</p>
05f7dfa @Cocoanetics Added demo for rounded rectangle text boxes.
authored
4 <pre>&lt;p style="background-color:yellow;padding:20px;"&gt;...&lt;/p&gt;</pre>
5 <p>By default the background is rectangle drawn for the entire width of the content view. There is a delegate method which you can override to do your own drawing. For example a stretchable UIImage. Or a rounded rectangle as shown here.</p>
6 <p style="background-color:yellow;padding: 20px;">
7 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
8 </p>
edd03f7 @Cocoanetics Fixed problem with text box padding
authored
9 <h3>Some test cases</h3>
10 <p style="background-color:#aabbcc;padding:10 10 10 10;">Before the list with 10px padding</p>
11 <ul style="background-color:#cc2233;padding:30 30 30 30;">
12 <li style="line-height:50px;">These items</li><li style="line-height:50px;">have a fixed line height of 50px</li><li style="line-height:50px;">Note: The line-height becomes the ascender. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</li></ul>
13 <p style="background-color:#aabbcc;padding:25 25 25 25;font-size:50px">After the list with 25 px padding</p>
Something went wrong with that request. Please try again.