iOS11-PDFKit-Example 项目教程

iOS11-PDFKit-Example 项目教程

iOS11-PDFKit-ExampleSample code for PDFKit on iOS 11.项目地址:https://gitcode.com/gh_mirrors/io/iOS11-PDFKit-Example

1. 项目的目录结构及介绍

iOS11-PDFKit-Example/
├── README.md
├── iOS11-PDFKit-Example
│   ├── AppDelegate.swift
│   ├── Assets.xcassets
│   │   ├── AppIcon.appiconset
│   │   └── Contents.json
│   ├── Base.lproj
│   │   ├── LaunchScreen.storyboard
│   │   └── Main.storyboard
│   ├── Info.plist
│   ├── ViewController.swift
│   └── main.swift
└── iOS11-PDFKit-Example.xcodeproj
    ├── project.pbxproj
    └── xcuserdata

目录结构说明

  • README.md: 项目说明文件。
  • iOS11-PDFKit-Example: 项目主目录。
    • AppDelegate.swift: 应用程序的入口和生命周期管理。
    • Assets.xcassets: 应用的资源文件,包括应用图标。
    • Base.lproj: 本地化资源,包含启动屏幕和主故事板。
    • Info.plist: 应用的配置文件。
    • ViewController.swift: 主视图控制器。
    • main.swift: 应用的启动文件。
  • iOS11-PDFKit-Example.xcodeproj: Xcode 项目文件。

2. 项目的启动文件介绍

main.swift

import UIKit

UIApplicationMain(
    CommandLine.argc,
    CommandLine.unsafeArgv,
    nil,
    NSStringFromClass(AppDelegate.self)
)

main.swift 是应用程序的启动文件,负责调用 UIApplicationMain 函数来启动应用,并指定 AppDelegate 作为应用的委托类。

3. 项目的配置文件介绍

Info.plist

Info.plist 是应用的配置文件,包含应用的基本信息和配置选项,例如应用的显示名称、版本号、权限设置等。以下是一些常见的配置项:

<key>CFBundleDisplayName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
    <string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
    <string>UIInterfaceOrientationPortrait</string>
    <string>UIInterfaceOrientationLandscapeLeft</string>
    <string>UIInterfaceOrientationLandscapeRight</string>
</array>

配置文件说明

  • CFBundleDisplayName: 应用的显示名称。
  • CFBundleExecutable: 可执行文件的名称。
  • CFBundleIdentifier: 应用的唯一标识符。
  • CFBundleName: 应用的名称。
  • CFBundlePackageType: 包类型,APPL 表示应用程序。
  • CFBundleShortVersionString: 应用的版本号。
  • CFBundleVersion: 应用的构建版本号。
  • LSRequiresIPhoneOS: 表示应用需要在 iOS 设备上运行。
  • UILaunchStoryboardName: 启动屏幕的故事板文件名。
  • UIMainStoryboardFile: 主故事板文件名。
  • UIRequiredDeviceCapabilities: 应用所需的设备功能。
  • UISupportedInterfaceOrientations: 支持的界面方向。

以上是 iOS11-PDFKit-Example 项目的目录结构、启动文件和配置文件的详细介绍

iOS11-PDFKit-ExampleSample code for PDFKit on iOS 11.项目地址:https://gitcode.com/gh_mirrors/io/iOS11-PDFKit-Example

  • 15
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

包椒浩Leith

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值