Skip to content

Commit

Permalink
all features refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
devmehmetates committed Nov 17, 2023
1 parent 1d28662 commit 53e2099
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 297 deletions.
7 changes: 5 additions & 2 deletions Sources/SwiftyKit/ExampleView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ final class ExampleView: UIViewController {
.distribution(.equalSpacing)
}
}.padding()
}.addView(view)
}.embedTo(view)
.fillToSuperView()
}

Expand All @@ -46,13 +46,16 @@ final class ExampleView: UIViewController {
UIImageView()
.asyncImage(URL(string: image))
.contentMode(.scaleAspectFill)
.frame(width: 35.0.responsiveW, height: 35.0.responsiveW)
.cornerRadius(8)
.clipsToBounds(true)

UILabel("History")
.font(.boldSystemFont(ofSize: 15))
}.padding()
.backgroundColor(.systemBackground)
.cornerRadius(10)
.shadow()
.frame(width: 45.0.responsiveW, height: 50.responsiveW)
}
}
#endif
2 changes: 1 addition & 1 deletion Sources/SwiftyKit/Kit/Bases/BaseButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import UIKit
/// .setTitle("Button Title")
/// .padding(.horizontal)
/// ```
public final class BaseButton: UIButton {
open class BaseButton: UIButton {

/// The closure that will be called when the button is clicked.
private var didClick: (() -> Void)?
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftyKit/Kit/Bases/BaseScrollView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import UIKit
/// }
/// }
/// ```
public final class BaseScrollView: UIScrollView {
open class BaseScrollView: UIScrollView {

/// The stack view that will hold the content.
private let contentView = VerticalStack()
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftyKit/Kit/Bases/BaseSwitch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import UIKit
/// print("Switch value changed to \(value)")
/// }
/// ```
public final class BaseSwitch: UISwitch {
open class BaseSwitch: UISwitch {

private var didValueChanged: ((_ value: Bool) -> Void)?

Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftyKit/Kit/Bases/BaseTextField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import UIKit
/// print("Text editing ended: \(text)")
/// }
/// ```
public final class BaseTextField: UITextField {
open class BaseTextField: UITextField {

/// The closure that will be called when the text field's text changes.
private var onEdit: ((_ value: String) -> Void)?
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftyKit/Kit/Bases/BaseTextView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import UIKit
/// print("Text editing ended: \(text)")
/// }
/// ```
public final class BaseTextView: UITextView {
open class BaseTextView: UITextView {

/// The closure that will be called when the text view's text changes.
private var onEdit: ((_ value: String) -> Void)?
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftyKit/Kit/Bases/HorizontalStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import UIKit
/// UILabel("Third Label")
/// }
/// ```
public final class HorizontalStack: UIStackView {
open class HorizontalStack: UIStackView {

/// Initializes a new instance of `HorizontalStack` with the given subviews.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftyKit/Kit/Bases/Spacer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ import UIKit
/// UILabel("Third Label")
/// }
/// ```
public final class Spacer: UIView {}
open class Spacer: UIView {}

2 changes: 1 addition & 1 deletion Sources/SwiftyKit/Kit/Bases/VerticalStack.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import UIKit
/// UILabel("Third Label")
/// }
/// ```
public final class VerticalStack: UIStackView {
open class VerticalStack: UIStackView {

/// Initializes a new instance of `VerticalStack` with the given subviews.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/SwiftyKit/Kit/Enums/Edges.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import UIKit
import SwiftUI

/// An enum representing the edges of a rectangle or a view.
public enum Edges: Int8, CaseIterable {
@frozen public enum Edges: Int8, CaseIterable {
case top
case leading
case bottom
Expand Down
Loading

0 comments on commit 53e2099

Please sign in to comment.