Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
ming1016
study
Repository navigation
Code
Issues
8
(8)
Pull requests
3
(3)
Actions
Projects
Wiki
Security and quality
Insights
More
items
TextKit
Jump to bottom
Edit
New page
戴铭 edited this page
Mar 10, 2015
·
1 revision
功能
字距调整(Kerning)
连写:
图像附件:可以向TextView里添加图像了
断字:设置hyphenationFactor就可以启用断字
可定制性:
更多的富文本属性:设置不同的下划线,双线,粗线,虚线,点线或者他们的组合。
序列化:
文本样式:全局预定义文本类型
文本效果:iOS7仅仅只有一个效果,使用这个效果的文本看起来就像盖纸上面一样。
结构
NSTextStorage:中枢,管理所有文本和属性信息。它的父类是NSAttributedString。
UITextView:作用是绘制视图和处理所有的用户交互。TextView实现UITextInput的协议处理键盘时间,对文本不做任何改变,直接将改变的请求转发给Text Storage
NSTextContainer:精确的描述可用区域,简单说是个垂直无限大的矩形区域。定义每页最大高度和宽度,文本沿着图片边缘重新排版也是用的这个。
NSLayoutManager:中心,将所有组件合在一起:
示例
小演示项目:
https://github.com/objcio/issue-5-textkit
里面包括了配置Text View(Configuration)范例,语法高亮(Highlighting)的范例,布局修改(Layout)范例。范例讲解:(中文)
http://objccn.io/issue-5-1/
(英文)
http://www.objc.io/issue-5/getting-to-know-textkit.html
Wiki pages
Pages
78
Loading
Home
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
A
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
App 启动提速实践和一些想法
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Apple 操作系统可执行文件 Mach O
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
A站 的 Swift 实践
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Block
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Camera
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
CFRunLoop
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Cocoapods
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Collection View动画
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Core Animation
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Core Data
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Core Image
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
GPU处理图像
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
HTML 转原生 HTN 项目开发记录
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS Background Tasks
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS 开发舆图
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS书籍推荐
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS函数响应式编程以及ReactiveCocoa的使用
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS基础集合类
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS多线程操作时一些要注意的安全问题
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS字符串
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS并发编程
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS性能优化
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS视频
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS设计模式
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS页面响应、电量、流量分析
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
iOS预加载Web页面方案
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Layer动画
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
markdown
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Masonry
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
NSURLConnection
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
NSURLSession
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Objc Runtime
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
OpenCV
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
PhotoKit
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
PHP
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
RSS分类整理
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Scene Kit
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
swift
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Swift 演进之路
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Swift 项目中涉及到 JSONDecoder,网络请求,泛型协议式编程的一些记录和想法
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
TextKit
功能
结构
示例
Loading
UICollectionView
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
UIView
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
View Controller转场
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Why Swift? Generics(泛型), Collection(集合类型), POP(协议式编程), Memory Management(内存管理)
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
WWDC Session
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Xcode command line tools
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Xcode调试之LLDB
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
“RSSRead已阅”技术分析
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
从ReactiveCocoa中能学到什么?不用此库也能学以致用
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
优秀的博客和技术网站
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
使用ReactiveCocoa开发RSS阅读器
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
使用Swift3开发了个macOS的程序可以检测出objc项目中无用方法,然后一键全部清理
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
制作一个类似苹果VFL(Visual Format Language)的格式化语言来描述类似UIStackView那种布局思路,并解析生成页面
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
如何对 iOS 启动阶段耗时进行分析
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
如何将自己的库或控件通过制作podspec提交到Cocoapods官方git上供所有人用或者设置为私有库给自己团队来使用
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
如何用 SwiftUI Combine Swift Concurrency Aysnc Await Actor 欢畅开发
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
感叹在开发中冥思苦想后灵光一现的那些思路
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
我为什么写了《跟戴铭学iOS编程》这本书
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
我写技术文章的一点心得
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
戴铭的 Swift 小册子 4.0
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
构建iOS稳定应用架构时方案选择的思考
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
校招iOS面试题
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
检测iOS的APP性能的一些方法
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
深入剖析 iOS 性能优化
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
深入剖析 iOS 编译 Clang LLVM
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
深入剖析 JavaScript 编译器 解释器引擎 QuickJS 多了解些 JavaScript 语言
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
深入剖析 JavaScriptCore
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
深入剖析 WebKit
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
深入剖析Auto Layout,分析iOS各版本新增特性
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
用 Swift 编写的工程代码静态分析命令行工具 smck
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
竭尽全力的去解耦的一次实践,封装一个TableView和一些功能组合的控件
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
算法
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
细说GCD(Grand Central Dispatch)如何用
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
给未接触iOS开发的同学推荐的入门资料,不多,但都是精华
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
读 SnapKit 和 Masonry 自动布局框架源码
Uh oh!
There was an error while loading.
Please reload this page
.
Show 63 more pages…
Add a custom sidebar
Clone this wiki locally
You can’t perform that action at this time.