ArchyVan / ARReader

A Simple Reader ,简易阅读器

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ARReader

ARReader is a simple READRER based on the ARComposing typesetting engine, complete Objective-C implementation,The implementation for part of components is reference to tangqiaoboy, ibireme source code.

Installation

CocoaPods

To integrate ARComposing into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target 'your_app' do
  pod 'ARComposing', '~> 0.0.1'
end

Then, run the following command:

$ pod install

You should open the {Project}.xcworkspace instead of the {Project}.xcodeproj after you installed anything from CocoaPods.

Manually

You can just download the lastest zip from this page and drag all things under "ARComposing" folder into your project. Then you just need to import the header file:

#import "ARComposing.h"

Usage

You can find the full API documentation at CocoaDocs.

Basic

Import ARComposing into your source files in which you want to use the framework.

#import "ARComposing.h"

Page Parser

//The Content you want to parse
NSString *content = ...

//Config The Parser
ARPageParser *parser = [ARPageParser sharedInstance];
parser.fontSize = 21;
parser.titleLength = 11;
parser.indent = YES;
parser.pageSize = CGSizeMake(ScreenWidth - 30, ScreenHeight - 80);
parser.lineSpacing = 10;
parser.textAlignment = NSTextAlignmentJustified;
pageParser parserContent:content]

Stucture

Name Description
ARComposingKit Reader UI Component
ARAsyncLayer Asynchronous Layer
ARComposingUtils Composing Utilities
ARPageData Page Data
ARPageParser The Core Parser

Features

  • 不同排版样式切分
  • 异步图层绘制
  • 可编辑属性
  • 全选文本
  • 光标可控性
  • 图文混合类型文本
  • The CocoaDocs

About

A Simple Reader ,简易阅读器

License:MIT License


Languages

Language:Objective-C 99.7%Language:Ruby 0.3%