Skip to content
Closed
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
76 changes: 52 additions & 24 deletions RaceSync.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "2640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "2640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "2640"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
12 changes: 0 additions & 12 deletions RaceSync/Assets.xcassets/btn_arrow_bkgd.imageset/Contents.json

This file was deleted.

Binary file not shown.

This file was deleted.

Binary file not shown.
19 changes: 18 additions & 1 deletion RaceSync/Constants/ImageConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,27 @@ enum SystemImg {
static let chevronRight = UIImage(systemName:"chevron.right") // iOS 13.0+

static let pin_small = UIImage(systemName:"mappin.and.ellipse") // iOS 13.0+
static let globe = UIImage(systemName:"globe") // iOS 13.0+
static let search = UIImage(systemName: "magnifyingglass") // iOS 13.0+
static let badge_cross_small = UIImage(systemName: "xmark.square.fill") // iOS 13.0+
static let trashFill = UIImage(systemName:"trash.fill") // iOS 13.0+
static let star = UIImage(systemName:"star") // iOS 13.0+
static let starFill = UIImage(systemName:"star.fill") // iOS 13.0+

static var globe: UIImage? {
if #available(iOS 15.0, *) {
return UIImage(systemName:"globe.americas") // iOS 15.0+
} else {
return UIImage(systemName:"globe") // iOS 13.0+
}
}

static var globeFill: UIImage? {
if #available(iOS 15.0, *) {
return UIImage(systemName:"globe.americas.fill") // iOS 15.0+
} else {
return UIImage(systemName:"globe.fill") // iOS 13.0+
}
}

static var flagCheckeredCrossed: UIImage? {
if #available(iOS 18.0, *) {
Expand Down
38 changes: 34 additions & 4 deletions RaceSync/UI Components/ApproveButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,30 @@ class ApproveButton: CustomButton {
updateAnimation()
}
}

fileprivate static let minHeight: CGFloat = 32
fileprivate static let minWidth: CGFloat = 82
fileprivate static let cornerRadius: CGFloat = 6

static let minHeight: CGFloat = {
if #available(iOS 26.0, *) {
return 36
} else {
return 32
}
}()

static let minWidth: CGFloat = {
if #available(iOS 26.0, *) {
return 86
} else {
return 82
}
}()

static let cornerRadius: CGFloat = {
if #available(iOS 26.0, *) {
return minHeight/2
} else {
return 6
}
}()

// MARK: - Private Variables

Expand Down Expand Up @@ -82,6 +102,7 @@ class ApproveButton: CustomButton {
setContentHuggingPriority(.required, for: .horizontal)
setContentCompressionResistancePriority(.required, for: .horizontal)

layer.cornerCurve = .continuous
layer.cornerRadius = Self.cornerRadius
layer.borderWidth = 0
}
Expand Down Expand Up @@ -147,6 +168,15 @@ class ApproveButton: CustomButton {
return CGSize(width: Self.minWidth, height: Self.minHeight)
}
}

override func layoutSubviews() {
super.layoutSubviews()

if #available(iOS 26.0, *) {
layer.cornerRadius = bounds.height / 2
layer.cornerCurve = .continuous // matches Apple's "squircle" style
}
}
}

extension ApproveState {
Expand Down
4 changes: 2 additions & 2 deletions RaceSync/UI Components/DatePickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class DatePickerViewController: FormBaseViewController {

fileprivate lazy var rightBarButtonItem: UIBarButtonItem = {
let title = self.delegate?.formViewControllerRightBarButtonTitle?(self) ?? "OK"
let barButtonItem = UIBarButtonItem(title: title, style: .done, target: self, action: #selector(didPressOKButton))
let barButtonItem = UIBarButtonItem(title: title, style: .plain, target: self, action: #selector(didPressOKButton))
return barButtonItem
}()

Expand Down Expand Up @@ -118,7 +118,7 @@ class DatePickerViewController: FormBaseViewController {

fileprivate func configureButtonBarItems() {
if let nc = navigationController, nc.viewControllers.count == 1 {
navigationItem.leftBarButtonItem = UIBarButtonItem(image: ButtonImg.close, style: .done, target: self, action: #selector(didPressCloseButton))
navigationItem.leftBarButtonItem = UIBarButtonItem(image: ButtonImg.close, style: .plain, target: self, action: #selector(didPressCloseButton))
}

navigationItem.rightBarButtonItem = rightBarButtonItem
Expand Down
36 changes: 30 additions & 6 deletions RaceSync/UI Components/JoinButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,33 @@ class JoinButton: CustomButton {
updateAnimation()
}
}

var cornerRadius: CGFloat {
get {
if #available(iOS 26.0, *) {
return self.isCompact ? 6: Self.minHeight/2
} else {
return 6
}
}
}

static let minHeight: CGFloat = 32
static let minWidth: CGFloat = 76
static let cornerRadius: CGFloat = 6

static let minHeight: CGFloat = {
if #available(iOS 26.0, *) {
return 36
} else {
return 32
}
}()

static let minWidth: CGFloat = {
if #available(iOS 26.0, *) {
return 80
} else {
return 76
}
}()

// MARK: - Private Variables

fileprivate lazy var spinnerView: UIActivityIndicatorView = {
Expand Down Expand Up @@ -87,7 +109,7 @@ class JoinButton: CustomButton {
setContentHuggingPriority(.required, for: .horizontal)
setContentCompressionResistancePriority(.required, for: .horizontal)

layer.cornerRadius = Self.cornerRadius
layer.cornerCurve = .continuous
layer.borderWidth = 0
}

Expand Down Expand Up @@ -117,6 +139,8 @@ class JoinButton: CustomButton {
tintColor = state.titleColor
imageView?.tintColor = state.titleColor
isUserInteractionEnabled = !isCompact

layer.cornerRadius = cornerRadius

if let borderColor = state.outlineColor {
layer.borderColor = borderColor.cgColor
Expand Down Expand Up @@ -158,7 +182,7 @@ class JoinButton: CustomButton {
override var intrinsicContentSize: CGSize {
return CGSize(width: Self.minWidth, height: Self.minHeight)
}

override var isHighlighted: Bool {
get {
if !joinState.interactionEnabled {
Expand Down
20 changes: 19 additions & 1 deletion RaceSync/UI Components/MemberBadgeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,24 @@ class MemberBadgeView: CustomButton {
setTitle("\(count)", for: .normal)
}
}

fileprivate var cornerRadius: CGFloat {
get {
if #available(iOS 26.0, *) {
return Self.minHeight/2
} else {
return 6
}
}
}

fileprivate static let minHeight: CGFloat = {
if #available(iOS 26.0, *) {
return 28
} else {
return 26
}
}()

// MARK: - Initialization

Expand All @@ -39,7 +57,7 @@ class MemberBadgeView: CustomButton {
contentEdgeInsets = UIEdgeInsets(top: 5, left: 15, bottom: 5, right: 12)

backgroundColor = Color.gray50
layer.cornerRadius = 6
layer.cornerRadius = cornerRadius
}

override var isSelected: Bool {
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading