Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push]
jobs:
build:

runs-on: macos-latest
runs-on: macos-26

steps:
- name: Checkout
Expand All @@ -15,12 +15,12 @@ jobs:
uses: futureware-tech/simulator-action@v2
with:
model: 'iPhone 16e'
os_version: '=18.6'
os_version: '=26.2'

- name: Run unit tests
run: |
xcodebuild \
-project TORoundedButtonExample.xcodeproj \
-scheme TORoundedButtonTests \
-destination 'platform=iOS Simulator,name=iPhone 16e,OS=18.6' \
-destination 'platform=iOS Simulator,name=iPhone 16e,OS=26.2' \
clean test
18 changes: 14 additions & 4 deletions TORoundedButton/TORoundedButton.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//
// TORoundedButton.h
//
// Copyright 2019-2023 Timothy Oliver. All rights reserved.
// Copyright 2019-2026 Timothy Oliver. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
Expand All @@ -26,6 +26,13 @@ NS_ASSUME_NONNULL_BEGIN

@class TORoundedButton;

/// The types of static/dynamic visual styles that can be applied to the background.
typedef NS_ENUM(NSInteger, TORoundedButtonBackgroundStyle) {
TORoundedButtonBackgroundStyleSolid,
TORoundedButtonBackgroundStyleBlur,
TORoundedButtonBackgroundStyleGlass
};

NS_SWIFT_NAME(RoundedButtonDelegate)
@protocol TORoundedButtonDelegate <NSObject>

Expand Down Expand Up @@ -65,12 +72,15 @@ IB_DESIGNABLE @interface TORoundedButton : UIControl
/// (Default value is 15 points inset from each edge).
@property (nonatomic, assign) UIEdgeInsets contentInset;

/// Replaces the solid color background with a blur view. (Default is NO)
@property (nonatomic, assign) BOOL isTranslucent;
/// The style, whether static or dynamic of the button's background view.
@property (nonatomic, assign) TORoundedButtonBackgroundStyle backgroundStyle;

/// When `isTranslucent` is `YES`, the amount of blur the background view has.
/// When `backgroundStyle` is set to `.blur`, the specific blur style to apply.
@property (nonatomic, assign) UIBlurEffectStyle blurStyle;

/// When `backgroundStyle` is set to `.glass`, the specific glass style to apply.
@property (nonatomic, assign) UIGlassEffectStyle glassStyle API_AVAILABLE(ios(26.0));

/// The text that is displayed in center of the button (Default is nil).
/// This adds an internally controlled label view to the main content view.
@property (nonatomic, copy, nullable) IBInspectable NSString *text;
Expand Down
Loading