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

Add SPM support. #171

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
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.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.

---

## [1.4.13](https://github.com/DavydLiu/DLRadioButton/releases/tag/1.4.13) (03/25/2024)
* Add SPM support.

## [1.4.12](https://github.com/DavydLiu/DLRadioButton/releases/tag/1.4.12) (04/19/2018)
* Move selection inversion logic from `setSelect` to `touchUpInside` for multiple selection buttons
* Break otherButtons retain cycle
Expand Down
30 changes: 30 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// swift-tools-version:5.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "DLRadioButton",
platforms: [
.iOS(.v9),
],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "DLRadioButton",
targets: ["DLRadioButton"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "DLRadioButton",
dependencies: [],
path: "DLRadioButton",
publicHeadersPath: "."),
]
)
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![License](https://img.shields.io/cocoapods/l/DLRadioButton.svg?style=flat)](http://cocoadocs.org/docsets/DLRaidoButton)
[![Platform](https://img.shields.io/cocoapods/p/DLRadioButton.svg?style=flat)](http://cocoadocs.org/docsets/DLRadioButton)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![SPM compatible](https://img.shields.io/badge/SPM-compatible-4BC51D.svg?style=flat)](https://github.com/apple/swift-package-manager)

`DLRadioButton` is an easy to use and highly customizable radio buttons control for iOS. It's a subclass of `UIButton`, and works smoothly with both `Objective-C` and `Swift`.

Expand All @@ -19,6 +20,7 @@ Since its release, DLRadioButton has become the most popular radio buttons contr
* Option 1: simply put `DLRadioButton.h` and `DLRadiobutton.m` in your project.
* Option 2: add `pod 'DLRadioButton', '~> 1.4'` to your `Podfile`.
* Option 3: add `github "DavydLiu/DLRadioButton" ~> 1.4` to your `Cartfile`.
* Option 4: add `https://github.com/DavydLiu/DLRadioButton` as a `Package Dependency`.

#### To add radio buttons in interface builder:

Expand Down