zoukankan      html  css  js  c++  java
  • iOS

    一、UTI概念

    1、什么是UTI

    Uniform Type Identifier,是字符串,格式标识符。

    根据UTI,可得到相应的其他类型的格式标识符。比如public.jpeg对应于:

    • A four-character file type code (an OSType) of 'JPEG'
    • A filename extension of .jpg
    • A filename extension of .jpeg
    • A MIME type of image/jpeg

    2、可包含的字符集

    可包含字符:字母,数字,点号,连字符。

    3、UTI句法

    反域名语法

    • com.apple.quicktime-movie
    • com.mycompany.myapp.myspecialfiletype
    • public.html
    • com.apple.pict
    • public.jpeg

     

    4、继承

    UTI与其他格式标识符的特点是可继承。比如 public.html 继承自 public.text ,声明可以打开 public.text 的应用同样可以打开 public.html。

    支持多继承。比如 com.apple.application-package 继承自 com.apple.bundle 和 com.apple.package。

    UTI可以说明物理和逻辑上两方面的类型。物理上分为文件夹、文件等类型;逻辑上分为图片、音频等类型。

    5、Identifier Tags

    每个UTI都可以有任意个Identifier Tags,这些Identifier Tags是UTI的等价替代物,比如filename extension, MIME type, or NSPasteboard type。

    二、UTI相关函数

    定义在MobileCoreServices库的UTType.h中

    三、声明新的UTI

    然后你就可以使用com.kingreader.umd标识符了~

    苹果文档:
    https://developer.apple.com/library/prerelease/watchos/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319-CH201-SW1

  • 相关阅读:
    switch语句相关
    大根堆的创建过程
    总结Java中线程的状态及多线程的实现方式
    用直接路径(direct-path)insert提升性能的两种方法
    Oracle的日志记录模式
    针对WebLogic Server 12.1.3版本打补丁
    Oracle Service Bus中的线程
    简化调用Web Service
    网络知识收集
    WebLogic MBean Monitor
  • 原文地址:https://www.cnblogs.com/tangjuanj/p/6015794.html
Copyright © 2011-2022 走看看