Skip to content

Commit

Permalink
init project.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 21, 2024
0 parents commit 2c50faf
Show file tree
Hide file tree
Showing 12 changed files with 1,287 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: https://jaywcjlove.github.io/#/sponsor
76 changes: 76 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: CI/CD
on:
push:
branches:
- main

jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- name: Create idoc config.
run: |
cat > idoc.yml << EOF
site: "SwiftUI Tutorial"
description: "SwiftUI Tutorial" is an application designed to assist developers in creating exceptional apps using SwiftUI
keywords: SwiftUI,swift,Tutorial app,Developer,tools,Coding,document
favicon: assets/logo.png
logo: ./assets/logo.png
openSource: https://github.com/jaywcjlove/swiftui-tutorial
homepage: https://wangchujiang.com/swiftui-tutorial/
tocs: false
element:
wrapper: style=max-width:720px;
meta:
- <meta name="author" content="Kenny Wong">
- <meta property="og:site_name" content="<%= site %>">
- <meta property="og:url" content="<%=homepage%><%=RESOLVE_PATH%>">
- <meta property="og:image" content="<%=homepage%>assets/logo.png">
- <meta property="og:type" content="application">
- <meta property="og:title" content="<%= site %>">
- <meta property="og:description" content="<%= description%>">
- <meta property="twitter:image:src" content="<%=homepage%>assets/screenshots-1.png">
- <meta property="twitter:site" content="@jaywcjlove">
- <meta property="twitter:creator" content="jaywcjlove">
- <meta property="twitter:card" content="summary_large_image">
- <meta property="twitter:title" content="<%= site %> - <%= description%>">
- <meta property="twitter:description" content="<%= description%>">
- <meta name="apple-itunes-app" content="app-id=6476452351">
menus:
Home: index.html
Apps:
url: https://wangchujiang.com/#/app
target: __blank
About:
url: https://wangchujiang.com/#/about
target: __blank
sideEffectFiles:
- README.zh.md
- terms-of-service.md
- terms-of-service.zh.md
- privacy-policy.md
- privacy-policy.zh.md
footer: |
<a href="./terms-of-service.html" target="_blank">Terms of Service</a> •
<a href="./privacy-policy.html" target="_blank">Privacy Policy</a> •
<a href="https://wangchujiang.com/#/projects" target="_blank">Projects</a> •
<a href="https://wangchujiang.com/#/sponsor" target="_blank">Sponsor</a> •
<a href="https://wangchujiang.com/#/app" target="_blank">More Apps</a><br /><br />
Generated by <a href="https://github.com/jaywcjlove/idoc" target="_blank">idoc</a> v{{idocVersion}}
EOF
- run: npm install idoc@1 -g
- run: idoc

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
commit_message: ${{ github.event.head_commit.message }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
dist

.DS_Store
.cache
.vscode
.idea

*.bak
*.tem
*.temp
#.swp
*.*~
~*.*

# IDEA
*.iml
*.ipr
*.iws
.idea/
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<div align="center">
<br />
<br />
<img src="./assets/logo.png" alt="SwiftUI Tutorial LOGO" width="160" height="160">
<h1>SwiftUI Tutorial</h1>
<!--rehype:style=border: 0;-->
<p>
<a href="./README.zh.md">中文</a> •
<a target="_blank" href="https://wangchujiang.com/#/contact">Contact & Support</a>
</p>
<p>
<a target="_blank" href="https://apps.apple.com/app/swiftui-tutorial/id6471227008" title="SwiftUI Tutorial AppStore"><img alt="SwiftUI Tutorial AppStore" src="https://tools.applemediaservices.com/api/badges/download-on-the-mac-app-store/black/en-us?size=250x83&amp;releaseDate=1705968000" height="51">
</a>
</p>
</div>

"SwiftUI Tutorial" is an application designed to assist developers in creating exceptional apps using SwiftUI. It offers replicable code samples and corresponding UI previews to streamline your coding process. Additionally, it includes local offline access to the official Swift Programming Language documentation in both Chinese and English.

## Main Features

- Code Examples: Replicable samples that you can use directly in your projects.
- UI Previews: See how your code affects the appearance of your app in real-time.
- Integrated Documentation: Access to the official Swift programming language documentation in both English and Chinese, available offline.
- Third-Party Package Discovery: Explore and contribute to the collection of third-party packages in [Explore Data](./data/explore.json).
- And much more...

## About SwiftUI

SwiftUI is an innovative, declarative UI framework developed by Apple for building interfaces across iOS, macOS, watchOS, and tvOS. Launched in 2019, its goal is to simplify the development of cross-platform applications. Using the Swift programming language, developers can describe the elements and layout of user interfaces declaratively.

## Frequently Asked Questions

## Who is it for?

SwiftUI is suitable for developers of all levels, from beginners to experienced professionals, all of whom can benefit from it. Here are some groups that might find learning and using SwiftUI particularly advantageous:

1. **Beginner Developers**:
- SwiftUI's declarative syntax is easier to learn compared to traditional imperative programming because it's more intuitive. Developers just need to describe what the UI should look like, not how to implement it. This makes it easier for beginners to get started and see results quickly.
2. **Experienced iOS/macOS Developers**:
- For those already familiar with the Apple ecosystem and Swift language, SwiftUI offers a more modern, efficient way to build user interfaces. It can also help them streamline their existing UIKit or AppKit code towards a more modular and reusable design.
3. **Cross-Platform Application Developers**:
- Developers planning to create applications that run across iOS, macOS, watchOS, and tvOS will benefit from SwiftUI's cross-platform capabilities. Using the same codebase can significantly reduce development and maintenance costs.
4. **UI/UX Designers**:
- For designers looking to translate designs directly into code, SwiftUI's real-time previews and declarative syntax allow them to iterate designs quickly and see their implementation in real-time.
5. **Professionals Looking to Increase Productivity**:
- SwiftUI's efficient features, such as real-time previews and declarative syntax, can significantly speed up development time and reduce debugging, allowing professionals to release products faster.

In summary, SwiftUI's design philosophy and tool support make it a widely popular framework, valuable to anyone interested in programming, whether they are beginners or experienced professionals looking to enhance development efficiency and quality.

## What can it be used for?

SwiftUI can be used to develop a wide variety of applications for Apple's multiple platforms, including iOS, macOS, watchOS, and tvOS. Here are some specific types of applications that can be developed using SwiftUI:

1. **Mobile and Tablet Applications**:
- With SwiftUI, developers can create beautiful, responsive applications for iPhones and iPads. Whether it's social media apps, e-commerce platforms, or health and fitness trackers, SwiftUI provides all the necessary interface components and animations.
2. **Desktop Applications**:
- macOS applications can also be built using SwiftUI. These applications can range from simple utility software to complex editing tools, with SwiftUI providing everything needed to create professional-level desktop applications.
3. **Wearable Device Applications**:
- For Apple Watch, SwiftUI allows developers to design interactions for small screens. These applications are often used for quick information displays, health monitoring, or as an extension of smartphone applications.
4. **TV Applications**:
- On Apple TV, developers can use SwiftUI to create large-screen entertainment and multimedia applications, such as streaming apps or games.
5. **Multi-Platform Applications**:
- SwiftUI's cross-platform features enable developers to create a unified application experience across all of Apple's devices, simplifying the development process and ensuring consistency across platforms.
6. **Educational and Training Applications**:
- Educational applications can also leverage SwiftUI's interactivity and appeal to provide dynamic learning experiences, such as interactive textbooks and learning games.
7. **Corporate Internal Applications**:
- Companies can develop applications for internal use, such as employee communications, project management tools, or customer relationship management systems, all optimized through SwiftUI's design and functionality.
8. **Prototype Design and Testing**:
- SwiftUI's rapid iteration capabilities and real-time previews make it an ideal choice for quick prototype design. Designers and developers can quickly build and test interface designs, accelerating the development process.

SwiftUI's flexibility and ease of use make it a powerful tool for developing modern, responsive applications. Whether for personal projects or professional development, SwiftUI meets a variety of needs and expectations.
72 changes: 72 additions & 0 deletions README.zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<div align="center">
<br />
<br />
<img src="./assets/logo.png" alt="SwiftUI 教程 LOGO" width="160" height="160">
<h1>SwiftUI 教程</h1>
<!--rehype:style=border: 0;-->
<p>
<a href="./README.md">English</a> •
<a href="#常见问题解答">常见问题</a> •
<a target="_blank" href="https://wangchujiang.com/#/contact">联系&支持</a>
</p>
<p>
<a target="_blank" href="https://apps.apple.com/app/swiftui-tutorial/id6476452351" title="SwiftUI 教程 AppStore"><img alt="SwiftUI 教程 AppStore" src="https://tools.applemediaservices.com/api/badges/download-on-the-mac-app-store/black/en-us?size=250x83&amp;releaseDate=1705968000" height="51">
</a>
</p>
</div>

「SwiftUI 教程」是一款旨在帮助开发者使用 SwiftUI 创建出色应用程序的应用。它提供可复制的代码示例和相应的用户界面预览,以简化您的编码过程。此外,还包括了《Swift 编程语言》官方中英文文档的本地离线预览。

## 主要功能

- 代码示例:提供可直接在您的项目中使用的样本代码。
- 用户界面预览:实时查看您的代码如何影响应用的外观。
- 集成文档:提供官方 Swift 编程语言文档的中英文版,支持离线访问。
- 第三方包发现:探索并贡献第三方包集合,详见 [探索数据](./data/explore.json)
- 以及更多功能...

## 关于 SwiftUI

SwiftUI 是苹果公司开发的一个创新、申明式的 UI 框架,用于在 iOS、macOS、watchOS 和 tvOS 上构建用户界面。它于 2019 年发布,目标是简化跨平台应用程序开发的过程。SwiftUI 使用 Swift 编程语言,允许开发者以申明式语法来描述用户界面的元素和布局。

## 常见问题解答

## 适合什么样的人?

SwiftUI 适合各种水平的开发者,从初学者到有经验的专业人士,都可以从中受益。以下是一些可能特别适合学习和使用 SwiftUI 的不同群体:

1. **新手开发者**
- SwiftUI 的申明式语法相比较传统的命令式编程更易学习,因为它更加直观,开发者只需描述 UI 应该呈现的样子,而不是如何实现。这使得初学者更容易上手,并快速看到成效。
2. **有经验的 iOS/macOS 开发者**
- 对于已经熟悉 Apple 生态系统和 Swift 语言的开发者,SwiftUI 提供了一种更现代、高效的方式来构建用户界面。它还能帮助他们简化现有的 UIKit 或 AppKit 代码,转向更加模块化和可复用的设计。
3. **跨平台应用开发者**
- 开发者计划开发可以在 iOS、macOS、watchOS 和 tvOS 上运行的应用程序将受益于 SwiftUI 的跨平台特性。使用同一套代码基础,可以大大减少开发和维护成本。
4. **UI/UX 设计师**
- 对于希望将设计直接转化为代码的设计师,SwiftUI 的实时预览和申明式语法使他们可以快速迭代设计,并直观地看到其实现效果。
5. **想要提高生产力的专业人士**
- SwiftUI 的高效特性(如实时预览和申明式语法)可以显著提高开发速度,减少调试时间,使得专业开发者能够更快地发布产品。

总之,SwiftUI 的设计理念和工具支持使它成为广泛受欢迎的框架,无论是对编程感兴趣的新手,还是希望提升开发效率和质量的经验丰富的专业人士,都能从中找到价值。

## 可以用来做什么?

SwiftUI 可以用于开发各种类型的应用程序,适用于 Apple 的多个平台,包括 iOS、macOS、watchOS 和 tvOS。以下是一些可以利用 SwiftUI 开发的具体应用类型:

1. **手机和平板应用**
- 使用 SwiftUI,开发者可以为 iPhone 和 iPad 创建美观、响应灵敏的应用程序。无论是社交媒体应用、电子商务平台还是健康与健身追踪器,SwiftUI 都能提供所需的界面组件和动画。
2. **桌面应用**
- macOS 应用程序同样可以利用 SwiftUI 构建。这些应用程序可以从简单的实用工具软件到复杂的编辑工具等不等,SwiftUI 提供了创建专业级桌面应用所需的一切功能。
3. **可穿戴设备应用**
- 对于 Apple Watch,SwiftUI 允许开发者设计小屏幕交互。这些应用通常用于快速信息显示、健康监测或作为智能手机应用的延伸。
4. **电视应用**
- 在 Apple TV 上,开发者可以使用 SwiftUI 创建大屏幕的娱乐和多媒体应用,如视频流应用或游戏。
5. **多平台应用**
- SwiftUI 的跨平台特性使得开发者可以为 Apple 的所有设备创建统一的应用体验,从而简化开发过程,并确保各平台间的高度一致性。
6. **教育和培训应用**
- 教育应用也可以利用 SwiftUI 的互动性和吸引力,提供动态的学习体验,如互动教科书、学习游戏等。
7. **企业内部应用**
- 公司可以开发内部使用的应用程序,如员工通讯、项目管理工具或客户关系管理系统,这些都可以通过 SwiftUI 实现优化设计和功能。
8. **原型设计和测试**
- SwiftUI 的快速迭代能力和实时预览特性使其成为快速原型设计的理想选择。设计师和开发者可以迅速构建和测试界面设计,加速开发过程。

SwiftUI 提供的灵活性和易用性使其成为开发现代、响应快速的应用程序的强大工具。无论是个人项目还是专业开发,SwiftUI 都能满足不同的需求和预期。
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2c50faf

Please sign in to comment.