Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Framework/Sources/Cell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ open class Cell: UIView {
}
}

extension Cell: Comparable {
extension Cell: @MainActor Comparable {
public static func <(lhs: Cell, rhs: Cell) -> Bool {
return lhs.indexPath < rhs.indexPath
}
Expand Down
6 changes: 3 additions & 3 deletions Framework/Sources/CellRange.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

public final class CellRange {
@MainActor public final class CellRange {
public let from: Location
public let to: Location

Expand Down Expand Up @@ -48,7 +48,7 @@ public final class CellRange {
}
}

extension CellRange: Hashable {
extension CellRange: @MainActor Hashable {
public func hash(into hasher: inout Hasher) {
hasher.combine(from)
}
Expand All @@ -58,7 +58,7 @@ extension CellRange: Hashable {
}
}

extension CellRange: CustomStringConvertible, CustomDebugStringConvertible {
extension CellRange: @MainActor CustomStringConvertible, @MainActor CustomDebugStringConvertible {
public var description: String {
return "R\(from.row)C\(from.column):R\(to.row)C\(to.column)"
}
Expand Down
10 changes: 5 additions & 5 deletions Framework/Sources/CircularScrolling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ public enum CircularScrolling {
}

struct Direction: OptionSet {
static var vertically = Direction(rawValue: 1 << 0)
static var horizontally = Direction(rawValue: 1 << 1)
static var both: Direction = [.vertically, .horizontally]
static let vertically = Direction(rawValue: 1 << 0)
static let horizontally = Direction(rawValue: 1 << 1)
static let both: Direction = [.vertically, .horizontally]

let rawValue: Int
init(rawValue: Int) {
Expand All @@ -89,8 +89,8 @@ public enum CircularScrolling {
}

struct TableStyle: OptionSet {
static var columnHeaderNotRepeated = TableStyle(rawValue: 1 << 0)
static var rowHeaderNotRepeated = TableStyle(rawValue: 1 << 1)
static let columnHeaderNotRepeated = TableStyle(rawValue: 1 << 0)
static let rowHeaderNotRepeated = TableStyle(rawValue: 1 << 1)

let rawValue: Int
init(rawValue: Int) {
Expand Down
2 changes: 1 addition & 1 deletion Framework/Sources/LayoutEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import UIKit

final class LayoutEngine {
@MainActor final class LayoutEngine {
private let spreadsheetView: SpreadsheetView
private let scrollView: ScrollView

Expand Down
14 changes: 7 additions & 7 deletions Framework/Sources/ScrollPosition.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@

import Foundation

public struct ScrollPosition: OptionSet {
public struct ScrollPosition: OptionSet, Sendable {
// The vertical positions are mutually exclusive to each other, but are bitwise or-able with the horizontal scroll positions.
// Combining positions from the same grouping (horizontal or vertical) will result in an NSInvalidArgumentException.
public static var top = ScrollPosition(rawValue: 1 << 0)
public static var centeredVertically = ScrollPosition(rawValue: 1 << 1)
public static var bottom = ScrollPosition(rawValue: 1 << 2)
public static let top = ScrollPosition(rawValue: 1 << 0)
public static let centeredVertically = ScrollPosition(rawValue: 1 << 1)
public static let bottom = ScrollPosition(rawValue: 1 << 2)

// Likewise, the horizontal positions are mutually exclusive to each other.
public static var left = ScrollPosition(rawValue: 1 << 3)
public static var centeredHorizontally = ScrollPosition(rawValue: 1 << 4)
public static var right = ScrollPosition(rawValue: 1 << 5)
public static let left = ScrollPosition(rawValue: 1 << 3)
public static let centeredHorizontally = ScrollPosition(rawValue: 1 << 4)
public static let right = ScrollPosition(rawValue: 1 << 5)

public let rawValue: Int

Expand Down
2 changes: 1 addition & 1 deletion Framework/Sources/SpreadsheetViewDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import UIKit

/// Implement this protocol to provide data to an `SpreadsheetView`.
public protocol SpreadsheetViewDataSource: class {
public protocol SpreadsheetViewDataSource: AnyObject {
/// Asks your data source object for the number of columns in the spreadsheet view.
///
/// - Parameter spreadsheetView: The spreadsheet view requesting this information.
Expand Down
2 changes: 1 addition & 1 deletion Framework/Sources/SpreadsheetViewDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import UIKit
/// The `SpreadsheetViewDelegate` protocol defines methods that allow you to manage the selection and
/// highlighting of cells in a spreadsheet view and to perform actions on those cells.
/// The methods of this protocol are all optional.
public protocol SpreadsheetViewDelegate: class {
public protocol SpreadsheetViewDelegate: AnyObject {
/// Asks the delegate if the cell should be highlighted during tracking.
/// - Note: As touch events arrive, the spreadsheet view highlights cells in anticipation of the user selecting them.
/// As it processes those touch events, the collection view calls this method to ask your delegate if a given cell should be highlighted.
Expand Down
13 changes: 13 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// swift-tools-version: 6.2

import PackageDescription

let package = Package(
name: "SpreadsheetView",
products: [
.library(name: "SpreadsheetView", targets: ["SpreadsheetView"]),
],
targets: [
.target(name: "SpreadsheetView", path: "Framework/Sources", exclude: ["Info.plist", "SpreadsheetView.h"]),
]
)