惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
雷峰网
雷峰网
The Register - Security
The Register - Security
The Cloudflare Blog
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
I
InfoQ
博客园 - 三生石上(FineUI控件)
H
Help Net Security
博客园 - 司徒正美
Vercel News
Vercel News
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
云风的 BLOG
云风的 BLOG
B
Blog
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
L
LangChain Blog
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recorded Future
Recorded Future
小众软件
小众软件
Martin Fowler
Martin Fowler
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
腾讯CDC
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Apple Machine Learning Research
Apple Machine Learning Research
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
Y
Y Combinator Blog
V
Visual Studio Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
V
V2EX
Blog — PlanetScale
Blog — PlanetScale

Posts on Changkun's Blog

Why High-Output Systems Are Often the First to Stop Growing Dark Forest Theory: A Formal Derivation Agents (or Humans) in Goal-Directed and Goalless Environments: On Pipelines, Priors, and the Rhythm Between Exploration and Exploitation At the Boundary of Self-Reference: From Stable Structures in Artificial Intelligence to the Self as a Recursive Model in an Open Dissipative System 2023 Reading List 2022 Reading List 2021 Reading List Are PSS/USS and RSS Actually the Same Thing? Performance Differences from Page Faults vs. Prefetching 2020 Year-End Review Migration with Zero Downtime 2020 Reading List The All in Go Stack Pointers Might Not Be Ideal for Parameters Eliminating A Source of Measurement Errors in Benchmarks Setup Wordpress in 10 Minutes 我为什么不再写博客了? 2019 年终总结 2018-2019 读书清单 Ten years of blogging Rethinking the Reflections on Communications and Trusts 2018 年终总结 Go source code study is open source Go source study: unsafe Pattern Go source study: sync.Pool Go runtime programming A Million WebSocket and Go Designing Asynchronous RESTful APIs 分布式杂谈01:CAP 理论的误解 Issues of Human-Bot Interaction 压缩法与深度网络的泛化性 Go in 1 Hour UMSLT04: The Past and Present of SGD UMSLT03: A Gentle Start of Learning Theory UMSLT02: A Breif History of Neural Networks UMSLT01: A Breif History of Regularization 不笑不足以为道 论文笔记:Generalization in Deep Learning 2017 年终总结 2017 读书清单 深度学习的泛化理论简介 删除 GitHub 上已经提交的敏感信息 硕士生涯的第一年就这样告一段落了 人肉计算(10): 系统参与激励 人肉计算(9): 陷阱的解法 别聊,一聊你就暴露 人肉计算(8): 人肉计算与数据科学中的陷阱 人肉计算(7): 社会行为分析 Hexo + GitHub + Travis CI + VPS 自动部署 人肉计算(6): 预测市场 人肉计算(5): 信用风险评级模型 读书与回报 瞎扯: 对现代企业理论与当下IT企业的商业模式和信息产业链的规律性的思考 人肉计算(4): 输入数据聚合与PageRank 又一次打整了一下博客 人肉计算(3): 输入数据聚合与链路预测 人肉计算(2): 意图博弈 GWAPs 人肉计算(1): 众包与群众智慧 对后辈同学在计算机专业上的答疑与解惑 在德国的医疗及住院体验 这可能不是一个技术博客了 实验楼楼赛第3期-Python-题解 迅速更换了 DISQUS Electron 深度实践总结 良好的编码体验的三个方面 2016 年终总结 2016 读书清单 最近在着手写的文章 微信小程序文档极致总结 谈谈过去三个月在实验楼的实习经历 Built a Desktop Client for My Blog Guacamole 源码分析与 VNC 中 RFB 协议的坑 《高速上手 C++11/14》正式发布 Docker 极速入门教程02 - 镜像与容器管理 Docker 极速入门教程01 - 基本概念和操作 阶段性沉默 ELK+Redis 最佳实践 终于全面启用了 HTTPS 苹果开源了LZFSE无损压缩 Hash 碰撞的一种思路 记一次完整的 Kaldi-TIMIT 示例运行 Kaldi 上的 TIMIT 例子 Kaldi 安装与部署 从科研写作谈起 Swift API 设计指南 有趣的人类 所以其实论文并没有什么鬼用 Githug 通关记录及指南 小结一下这学期的收获 2015 读书清单 2015 年终总结 负能量爆表 转眼就快两个月了 博客迁移记录 大三总结 这个世界,终究不会是我们的。 Linux 内核分析 之六:Linux 内核创建进程的过程 小说「泽缘」 Linux 内核分析 之五:system_call中断处理过程的简要分析 大创项目的标题真是每年都在考验同学们的想象力啊
WatchKit框架与WatchApp交互初窥
Changkun Ou · 2014-11-20 · via Posts on Changkun's Blog

Published at发布于:   |   PV/UV: /   |   Reading阅读: 1 min

早晨起床看邮件,发现收到了水果发来的WatchKit框架发布通知,遂中午下课马上开始看框架,发现WatchKit暂时作为一个iPhone App的Extension,还算是比较简单,Apple Watch只负责显示,一切计算都由iPhone完成。但是粗略读了文档后相信水果肯定会把Apple Watch逐步打造为一个独立平台,毕竟这个框架还是beta版。

关于框架

WatchKit.framework是一个包含WatchKit扩展使用操作的应用程序接口类。一个Watch App包含一个或者多个界面控制器,每个接口可以包含table,button,slider以及其他的视觉元素。WatchKit扩展使用下面这套类框架来配置视觉元素以及响应用户的交互。

首先,三个关键类从NSObject中继承,他们分别是:WKInterfaceController、WKInterfaceDivice、WKInterfaceObject WKInterfaceController这个类主要实现我们说编写的Watch app的界面。从它这里还有一个WKUserNotificationInterfaceController类继承下来,而这个类负责管理本地或者远程Notification的用户界面。

WKIterfaceDevice这个类封装了与特定用户配对了的AppleWatch的配置信息。指的注意的一点就是,这个类里面有封装了对于图片缓存的管理方法,难以置信的是:WatchApp只能缓存20M的图像,当没有足够多的缓存给图像使用时,WatchKit会自动删除旧图像腾出空间。因此目前Apple Watch里面所有的动画效果都是在iPhone上以连续的图片预先渲染然后再传送给Apple Watch完成的。

WKInterfaceObject这个类就是界面元素最关键的一个类了。这个类下面继承了Apple Watch中可以使用的全部控件对象,包括WKInterfaceButton(按钮控件)、WKInterfaceDate(时间控件)、WKInterfaceGroup(控件容器)、WKInterfaceImage(图片控件)、WKInterfaceLabel(标签控件)、WKInterfaceMap(地图控件)、WKInterfaceSeparator(分割控件)、WKInterfaceSlider(滑块控件)、WKInterfaceSwitch(开关控件)、WKInterfaceTable(列表控件)、WKInterfaceTimer(计时器控件)。 通过这些控件,大致能够想象一个Watch App可以长成什么样子了。

关于交互

苹果在人机交互方面一直有自己独特的见解,而关于纯粹软件上的交互其实已经没什么好谈的了,但是在Watch Human Interface Guidelines中大概看到了几个比较有趣的东西:

  • Apple Watch有一个新的交互手段叫做Digital Crown,它与普通的软件导航(比如说我们iPhone上使用的是顶部的NavigationBar和通过手势滑动这两种方式来返回)有着本质的区别,因为这是一个通过硬件来控制的导航工具。

  • Apple Watch内置了一个叫做Taptic Engine的东西,当用户和Apple Watch进行交互的时候,它负责提供微妙的物理反馈。

  • Apple Watch的屏幕拥有被叫做Force Touch的功能,能够感知用户的轻点和按压,所以此项能够提供现有手机上做不到的,另一个维度上的交互体验。

所以,Apple Watch在交互上的突破是淡化了物理硬件和软件之间的界限,一个深思熟虑的Watch App设计应该让愚蠢的用户难以分辨或者忘记硬件(Digital Crown or Taptic Engine or Force Touch)和软件(Navigation Bar or Gesture)带来的交互差异。 果然在人机交互方面的深思才是Apple真正擅长的大招啊,反观Android Wear,就是一个手机。

进一步阅读的参考文献:

Framework Reference: https://developer.apple.com/library/prerelease/ios/documentation/WatchKit/Reference/WatchKit_framework/index.html#classes Programming Guide: https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/WatchKitProgrammingGuide/index.html Apple Watch Human Interface Guidelines: https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/WatchHumanInterfaceGuidelines/index.html

2014年11月19日 初稿 于成都 2014年11月20日 二稿 于成都