TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Unclaimed.
An open source Objective-C interface component that makes use of the CoreText framework to render static text content using a highly customisable markup syntax.
FTCoreText
sources from repositoryFTCoreText
folder to your projectCoreText.framework
in your project#import FTCoreTextView.h
FTCoreTextView
FTCoreTextStyle
// Draw text closed in <red> tag in red color
// Example: <red>this will be drawn red</red>
FTCoreTextStyle *redStyle = FTCoreTextStyle *imageStyle = [FTCoreTextStyle styleWithName:@"red"];
redStyle.color = [UIColor redColor];
[ftCoreTextInstance addStyles:@[style1, style2, style3]];
FTCoreTextView
instanceftCoreTextInstance.text = @"My text with <red>red</red> word.";
See the included examples project highlighting various features.
FTCoreText provides some interface element types for rendering content types commonly found on the web and printed media such as lists, images, links and suchlike.
Included:
FTCoreTextTagDefault
: the default style applied to the text. FTCoreTextTagPage
: Divide the text in pages. Markup: <_page/>
FTCoreTextTagBullet
: define styles for bullets. Markup: <_bullet>content</bullet>
.FTCoreTextTagImage
: renders images. Markup: <_image>imageNameOnBundle.extension</_image>
FTCoreTextTagLink
: define style for links. Markup: <_link>link_target|link - name</_link>
. See FTCoreTextViewDelegate
for responding to touch.To use the included element types, set the name of an FTCoreTextStyle
style instance to one of the string constant types above and use the markup specified. Example: linkTypeFTCoreTextStyleInstance.name = FTCoreTextTagLink
, and in the static content: <_link>http://fuerteint.com|Fuerte International</_link>
Use of the CoreText framework is available for iOS versions 3.2 and above.
Although FTCoreTextView uses a similar markup syntax to HTML, most of the properties defined in the HTML specification are unsupported.
FTCoreText is developed by FuerteInt. Please drop us an email to let us know you how you are using this component.
Open Source Initiative OSI - The MIT License (MIT):Licensing [OSI Approved License] The MIT License (MIT)
Copyright (c) 2013 Fuerte International
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.