Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/2024-07-13 #58

Merged
merged 5 commits into from
Jul 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat: UIView.ContentMode conforms to the CaseIterable protocol
  • Loading branch information
rakuyoMo committed Jul 13, 2024
commit cc2f763221d969bec1e041ec8c4a080da79046b0
31 changes: 31 additions & 0 deletions Sources/Core/Extensions/ContentMode+RAK.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
//
// ContentMode+RAK.swift
// RakuyoKit
//
// Created by Rakuyo on 2024/6/12.
// Copyright © 2024 LenticularStickers. All rights reserved.
//

import UIKit

#if DEBUG
extension UIView.ContentMode: CaseIterable {
public static var allCases: [UIView.ContentMode] {
[
.scaleToFill,
.scaleAspectFit,
.scaleAspectFill,
.redraw,
.center,
.top,
.bottom,
.left,
.right,
.topLeft,
.topRight,
.bottomLeft,
.bottomRight,
]
}
}
#endif