-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7518eb6
commit 3a498b6
Showing
3 changed files
with
139 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
# Swifty - Make swift code swifty | ||
|
||
[中文](README.md) | English | ||
|
||
[![CI Status](https://img.shields.io/travis/RyukieSama/RyukieSwifty.svg?style=flat)](https://travis-ci.org/RyukieSama/RyukieSwifty) | ||
[![Version](https://img.shields.io/cocoapods/v/RyukieSwifty.svg?style=flat)](https://cocoapods.org/pods/RyukieSwifty) | ||
[![License](https://img.shields.io/cocoapods/l/RyukieSwifty.svg?style=flat)](https://cocoapods.org/pods/RyukieSwifty) | ||
[![Platform](https://img.shields.io/cocoapods/p/Swifty.svg?style=flat)](https://cocoapods.org/pods/RyukieSwifty) | ||
|
||
## 1. Example | ||
|
||
To run the example project, clone the repo, and run `pod install` from the Example directory first. | ||
|
||
## 2. All install | ||
|
||
```ruby | ||
pod 'RyukieSwifty' | ||
``` | ||
|
||
## 3. Subspec install | ||
|
||
### 3.1 UIKit Extension | ||
|
||
```ruby | ||
pod 'RyukieSwifty/UIKit' | ||
``` | ||
|
||
### 3.2 CloudKit Extension | ||
|
||
```ruby | ||
pod 'RyukieSwifty/CloudKit' | ||
``` | ||
|
||
### 3.3 Foundation Extension | ||
|
||
```ruby | ||
pod 'RyukieSwifty/Foundation' | ||
``` | ||
|
||
### 3.4 FullScreen Extension | ||
|
||
```ruby | ||
pod 'RyukieSwifty/FullScreen' | ||
``` | ||
|
||
### 3.5 Router Protocol | ||
|
||
```ruby | ||
pod 'RyukieSwifty/Router' | ||
``` | ||
|
||
### 3.6 Service Protocol - MoyaStyleProtocol | ||
|
||
Make network request code more `Moya` style more `Swifty`. Didn`t depend on any framework, easy to change and extend. | ||
|
||
```ruby | ||
pod 'RyukieSwifty/SwiftyServiceProtocol' | ||
``` | ||
|
||
### 3.7 ScreenShield (>= iOS13) - 截屏防护 | ||
|
||
Light way to protect content in view form screenshort and record. Add contents you want to protect in `ScreenShieldView`, they will be hide during screenshort and record. | ||
|
||
![ScreenShield](ScreenShield.gif) | ||
|
||
```ruby | ||
pod 'RyukieSwifty/ScreenShield' | ||
``` | ||
|
||
Swift - Demo: | ||
|
||
```Swift | ||
import UIKit | ||
import RyukieSwifty | ||
|
||
class ViewController: UIViewController { | ||
override func loadView() { | ||
view = ScreenShieldView.create() | ||
} | ||
... | ||
} | ||
``` | ||
|
||
OC - Demo: | ||
|
||
```C++ | ||
#import "OCScreenShieldViewController.h" | ||
@import RyukieSwifty; | ||
|
||
@interface OCScreenShieldViewController () | ||
|
||
@end | ||
|
||
@implementation OCScreenShieldViewController | ||
|
||
- (void)loadView { | ||
self.view = [ScreenShieldView createWithFrame:UIScreen.mainScreen.bounds]; | ||
} | ||
|
||
- (void)viewDidLoad { | ||
[super viewDidLoad]; | ||
|
||
UIView *cubeView = [[UIView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; | ||
cubeView.backgroundColor = [UIColor redColor]; | ||
[self.view addSubview:cubeView]; | ||
|
||
self.view.backgroundColor = [UIColor grayColor]; | ||
} | ||
|
||
@end | ||
``` | ||
## 4. Author | ||
RyukieSama, [email protected] | ||
## License | ||
Swifty is available under the MIT license. See the LICENSE file for more info. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,63 @@ | ||
# Swifty - Make swift code swifty | ||
|
||
中文 | [English](README-EN.md) | ||
|
||
[![CI Status](https://img.shields.io/travis/RyukieSama/RyukieSwifty.svg?style=flat)](https://travis-ci.org/RyukieSama/RyukieSwifty) | ||
[![Version](https://img.shields.io/cocoapods/v/RyukieSwifty.svg?style=flat)](https://cocoapods.org/pods/RyukieSwifty) | ||
[![License](https://img.shields.io/cocoapods/l/RyukieSwifty.svg?style=flat)](https://cocoapods.org/pods/RyukieSwifty) | ||
[![Platform](https://img.shields.io/cocoapods/p/Swifty.svg?style=flat)](https://cocoapods.org/pods/RyukieSwifty) | ||
|
||
## Example | ||
## 一、 示例程序 | ||
|
||
To run the example project, clone the repo, and run `pod install` from the Example directory first. | ||
|
||
## Requirements | ||
|
||
## Installation | ||
|
||
Swifty is available through [CocoaPods](https://cocoapods.org). To install | ||
it, simply add the following line to your Podfile: | ||
|
||
## All install - 安装全部 | ||
## 二、 CocoaPods 完整安装 | ||
|
||
```ruby | ||
pod 'RyukieSwifty' | ||
``` | ||
|
||
## Subspec install - 子模块安装 | ||
## 三、 按功能安装 | ||
|
||
### UIKit Extension | ||
### 3.1 UIKit Extension | ||
|
||
```ruby | ||
pod 'RyukieSwifty/UIKit' | ||
``` | ||
|
||
### CloudKit Extension | ||
### 3.2 CloudKit Extension | ||
|
||
```ruby | ||
pod 'RyukieSwifty/CloudKit' | ||
``` | ||
|
||
### Foundation Extension | ||
### 3.3 Foundation Extension | ||
|
||
```ruby | ||
pod 'RyukieSwifty/Foundation' | ||
``` | ||
|
||
### FullScreen Extension | ||
### 3.4 全屏控制 | ||
|
||
```ruby | ||
pod 'RyukieSwifty/FullScreen' | ||
``` | ||
|
||
### Router Protocol | ||
### 3.5 路由协议 | ||
|
||
```ruby | ||
pod 'RyukieSwifty/Router' | ||
``` | ||
|
||
### Service Protocol - MoyaStyleProtocol | ||
### 3.6 网络请求接口协议 - MoyaStyleProtocol | ||
|
||
混编项目(AFN)或者自定义网络库,通过该协议可以使 `Swift` 内容中的网络请求实现有 `Moya` 的风格,更加 `Swifty` | ||
通过该协议可以使 `Swift` 内容中的网络请求实现有 `Moya` 的风格,更加 `Swifty`,不依赖具体第三方网络库,易于切换拓展。 | ||
|
||
```ruby | ||
pod 'RyukieSwifty/SwiftyServiceProtocol' | ||
``` | ||
|
||
### ScreenShield (>= iOS13) - 截屏防护 | ||
### 3.7 截屏防护 (>= iOS13) | ||
|
||
极其轻量化的截屏防护方案,任何需要被保护的 `View` 作为子视图放入 `ScreenShieldView` 即可达到截屏时隐藏内容的效果。 | ||
|
||
|
@@ -115,7 +110,7 @@ OC - Demo: | |
@end | ||
``` | ||
## Author | ||
## 四、 作者 | ||
RyukieSama, [email protected] | ||
|