This repository has been archived by the owner on Apr 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Showing
87 changed files
with
2,024 additions
and
498 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Run PR-CI | ||
runs-on: macOS-latest | ||
|
||
steps: | ||
- name: Checkout the Git repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Ruby Dependencies | ||
run: | | ||
bundle install | ||
- name: Pod Install | ||
run: | | ||
bundle exec pod install --project-directory=Example | ||
- name: Build and Test | ||
run: | | ||
cd ./Example | ||
bundle exec fastlane ios execute_pull_request_ci_test | ||
cd .. | ||
- name: Codecov | ||
uses: codecov/[email protected] |
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
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,33 @@ | ||
// | ||
// BaseViewController.swift | ||
// KarrotFlex | ||
// | ||
// Created by Geektree0101 on 2021/12/12. | ||
// Copyright © 2021 CocoaPods. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
|
||
class BaseViewController<View: UIView>: UIViewController { | ||
|
||
let body: View | ||
|
||
convenience init() { | ||
self.init(view: View()) | ||
} | ||
|
||
init(view: View) { | ||
self.body = view | ||
super.init(nibName: nil, bundle: nil) | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
override func loadView() { | ||
self.view = self.body | ||
} | ||
|
||
} |
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,37 @@ | ||
// | ||
// FlexAnimationCell.swift | ||
// KarrotFlex | ||
// | ||
// Created by Geektree0101 on 2021/12/12. | ||
// Copyright © 2021 CocoaPods. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import UIKit | ||
import KarrotFlex | ||
|
||
final class FlexAnimationCell: UITableViewCell { | ||
|
||
private let labelView = UILabel() | ||
|
||
override init(style: UITableViewCellStyle, reuseIdentifier: String?) { | ||
super.init(style: style, reuseIdentifier: reuseIdentifier) | ||
self.accessoryType = .disclosureIndicator | ||
self.labelView.text = "Go to animation example" | ||
self.labelView.numberOfLines = 0 | ||
self.contentView.flex.define { | ||
FlexItem($0, view: self.labelView).margin(24.0) | ||
} | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
override func sizeThatFits(_ size: CGSize) -> CGSize { | ||
self.contentView.bounds.size.width = size.width | ||
self.contentView.flex.layout(mode: .adjustHeight) | ||
return self.contentView.bounds.size | ||
} | ||
|
||
} |
Oops, something went wrong.