diff --git a/.all-contributorsrc b/.all-contributorsrc index f27b3a08..3ecf3ca7 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -227,6 +227,17 @@ "review", "maintenance" ] + }, + { + "login": "Wei18", + "name": "Wei", + "avatar_url": "https://avatars.githubusercontent.com/u/11254896?v=4", + "profile": "https://www.linkedin.com/in/wei-cao-67b5b315a", + "contributions": [ + "infra", + "review", + "maintenance" + ] } ], "contributorsPerLine": 7, @@ -234,5 +245,6 @@ "projectOwner": "skywinder", "repoType": "github", "repoHost": "https://github.com", - "skipCi": true + "skipCi": true, + "commitType": "docs" } diff --git a/.github/workflows/ci.yml b/.github/workflows/CIBuild.yml similarity index 78% rename from .github/workflows/ci.yml rename to .github/workflows/CIBuild.yml index 0cf8890d..aca6f959 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/CIBuild.yml @@ -1,29 +1,29 @@ -name: CI +name: CI Build on: push: branches: - develop + paths: + - 'ActionSheetPicker-3.0.podspec' + - 'Package.swift' + - 'CoreActionSheetPicker/**' jobs: - build: strategy: fail-fast: false matrix: - xcode: - # - "12.5.1" - - "13.2.1" - os: - - macos-11 - # - macos-latest - + include: + - xcode: "13.2.1" + os: macos-11 + # - xcode: "15.2" + # os: macOS-14 runs-on: ${{ matrix.os }} env: DEVELOPER_DIR: "/Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer" steps: - uses: actions/checkout@v4 - - name: "Build SwiftPackage" run: | # Starting with Xcode 11, xcodebuild supports SwiftPM packages out of the box. @@ -32,7 +32,6 @@ jobs: -scheme CoreActionSheetPicker \ -sdk iphonesimulator \ -destination "name=iPhone 11 Pro" - - name: "Build CocoaPods" run: | gem install cocoapods diff --git a/.github/workflows/UpdateChangelog.yml b/.github/workflows/UpdateChangelog.yml new file mode 100644 index 00000000..bf604082 --- /dev/null +++ b/.github/workflows/UpdateChangelog.yml @@ -0,0 +1,40 @@ +name: Update Changelog + +on: + schedule: + # Will run at 01:00 on the 1st and 15th of every month + - cron: "30 1 1,15 * *" + +concurrency: + group: update-changelog + cancel-in-progress: true + +jobs: + update: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.1' + - uses: actions/cache@v4 + with: + path: ${{ env.GEM_HOME }} + key: ${{ runner.os }} + - name: "Update CHANGELOG.md" + env: + CHANGELOG_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gem install github_changelog_generator + - name: "Commit CHANGELOG.md" + run: | + github_changelog_generator -u skywinder -p ActionSheetPicker-3.0 + git add CHANGELOG.md + if [ ! -n "$(git status -s)" ]; then + echo "NOTHING TO COMMIT" + else + git config user.name "${GITHUB_ACTOR}" + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" + git commit -m "Update CHANGELOG.md" + git push --no-verify + fi diff --git a/ActionSheetPicker-3.0.podspec b/ActionSheetPicker-3.0.podspec index 3cb55bae..c4f1038d 100644 --- a/ActionSheetPicker-3.0.podspec +++ b/ActionSheetPicker-3.0.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'ActionSheetPicker-3.0' - spec.version = '2.7.3' + spec.version = '2.7.4' spec.summary = 'Easily present an ActionSheet with a PickerView, allowing the user to select from a number of immutable options.' spec.description = <<-DESC Better version of ActionSheetPicker with support iOS9 and other improvements: diff --git a/CHANGELOG.md b/CHANGELOG.md index 02ce5780..2d460dbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,119 @@ ## [Unreleased](https://github.com/skywinder/ActionSheetPicker-3.0/tree/HEAD) -[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/2.5.1...HEAD) +[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/2.7.3...HEAD) + +**Merged pull requests:** + +- add Wei18 as a contributor for infra, review, and maintenance [\#572](https://github.com/skywinder/ActionSheetPicker-3.0/pull/572) ([allcontributors[bot]](https://github.com/apps/allcontributors)) +- Update CONTRIBUTING.md [\#553](https://github.com/skywinder/ActionSheetPicker-3.0/pull/553) ([noorulain17](https://github.com/noorulain17)) + +## [2.7.3](https://github.com/skywinder/ActionSheetPicker-3.0/tree/2.7.3) (2024-02-05) + +[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/2.7.2...2.7.3) + +**Closed issues:** + +- Need secrets.COCOAPODS\_TRUNK\_TOKEN [\#565](https://github.com/skywinder/ActionSheetPicker-3.0/issues/565) +- SWActionSheetVC.dismissTap prevents calendar from working in inline style [\#532](https://github.com/skywinder/ActionSheetPicker-3.0/issues/532) +- iOS build error while using carthage update [\#472](https://github.com/skywinder/ActionSheetPicker-3.0/issues/472) + +**Merged pull requests:** + +- Update ActionSheetPicker-3.0.podspec to 2.7.3 [\#568](https://github.com/skywinder/ActionSheetPicker-3.0/pull/568) ([Wei18](https://github.com/Wei18)) +- Add job build in ci.yml for CocoaPods, Carthage, Swift Package [\#567](https://github.com/skywinder/ActionSheetPicker-3.0/pull/567) ([Wei18](https://github.com/Wei18)) +- Fixed DeployCocoaPods Github Action [\#566](https://github.com/skywinder/ActionSheetPicker-3.0/pull/566) ([Wei18](https://github.com/Wei18)) +- Add GitHub actions to deploy CocoaPods [\#564](https://github.com/skywinder/ActionSheetPicker-3.0/pull/564) ([Wei18](https://github.com/Wei18)) +- Fix date picker dismissing when tapping on date picker in .inline style [\#551](https://github.com/skywinder/ActionSheetPicker-3.0/pull/551) ([joeboyscout04](https://github.com/joeboyscout04)) +- Migrate CI from TravisCI to GitHubActions [\#546](https://github.com/skywinder/ActionSheetPicker-3.0/pull/546) ([Econa77](https://github.com/Econa77)) + +## [2.7.2](https://github.com/skywinder/ActionSheetPicker-3.0/tree/2.7.2) (2024-01-30) + +[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/2.7.1...2.7.2) + +**Fixed bugs:** + +- Current date is not available on compact Date picker style iOS 14.4 & above [\#534](https://github.com/skywinder/ActionSheetPicker-3.0/issues/534) +- tapDismissAction broken after 2.5.1 [\#526](https://github.com/skywinder/ActionSheetPicker-3.0/issues/526) + +**Closed issues:** + +- Unable to build archieve on Xcode 14.3 [\#558](https://github.com/skywinder/ActionSheetPicker-3.0/issues/558) +- SPM Issues [\#554](https://github.com/skywinder/ActionSheetPicker-3.0/issues/554) +- ActionSheet opens in wrong display when iphone is connected to an external display. [\#548](https://github.com/skywinder/ActionSheetPicker-3.0/issues/548) +- Picker not showing on iPad but only on iPhone [\#540](https://github.com/skywinder/ActionSheetPicker-3.0/issues/540) +- Remove the pieces of the code for less than the Deployment Target [\#538](https://github.com/skywinder/ActionSheetPicker-3.0/issues/538) +- Not working with Swift Package Manager \[bug\] [\#537](https://github.com/skywinder/ActionSheetPicker-3.0/issues/537) +- "exported: true has no effect in '\_specialize' attribute" Issue at Xcode 12.5 [\#536](https://github.com/skywinder/ActionSheetPicker-3.0/issues/536) +- Data Linkage with ActionSheetMultipleStringPicker [\#529](https://github.com/skywinder/ActionSheetPicker-3.0/issues/529) +- Cannot use the library if is installed using Swift Package Manager [\#525](https://github.com/skywinder/ActionSheetPicker-3.0/issues/525) +- Minimum iOS version [\#522](https://github.com/skywinder/ActionSheetPicker-3.0/issues/522) + +**Merged pull requests:** + +- Release 2.7.2 [\#562](https://github.com/skywinder/ActionSheetPicker-3.0/pull/562) ([Wei18](https://github.com/Wei18)) +- \[Fix\] import issue on Swift Pacakge [\#555](https://github.com/skywinder/ActionSheetPicker-3.0/pull/555) ([Wei18](https://github.com/Wei18)) +- Fixed an issue building using the Swift Package Manager [\#545](https://github.com/skywinder/ActionSheetPicker-3.0/pull/545) ([Econa77](https://github.com/Econa77)) +- Issue 538 - Remove conditional statements less than iOS9 [\#539](https://github.com/skywinder/ActionSheetPicker-3.0/pull/539) ([jolyot](https://github.com/jolyot)) +- Fixed \#526 \(`tapDismissAction` broken after 2.5.1\), Improved \#491 \(Background-tap to dismiss\) [\#528](https://github.com/skywinder/ActionSheetPicker-3.0/pull/528) ([noorulain17](https://github.com/noorulain17)) +- Fix SPM issue \(\#525\) [\#527](https://github.com/skywinder/ActionSheetPicker-3.0/pull/527) ([ghost](https://github.com/ghost)) +- Reduced minimum iOS version back to 9.0 [\#523](https://github.com/skywinder/ActionSheetPicker-3.0/pull/523) ([ddaddy](https://github.com/ddaddy)) +- Fix typo in the comment [\#521](https://github.com/skywinder/ActionSheetPicker-3.0/pull/521) ([ad-sho-loko](https://github.com/ad-sho-loko)) + +## [2.7.1](https://github.com/skywinder/ActionSheetPicker-3.0/tree/2.7.1) (2020-10-26) + +[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/2.6.1...2.7.1) + +**Implemented enhancements:** + +- Use with inputView [\#266](https://github.com/skywinder/ActionSheetPicker-3.0/issues/266) + +**Fixed bugs:** + +- Presenting picker fails when picker is presented within modally presented view controller on iPad \(iOS 13.7\) with ActionSheetPicker version 2.6.1. [\#513](https://github.com/skywinder/ActionSheetPicker-3.0/issues/513) + +**Closed issues:** + +- SPM: Cannot find type 'ActionSheetStringPicker' in scope [\#512](https://github.com/skywinder/ActionSheetPicker-3.0/issues/512) +- iOS 14 unable to select date in inline datePickerStyle [\#505](https://github.com/skywinder/ActionSheetPicker-3.0/issues/505) +- Wrong format specifier in example [\#344](https://github.com/skywinder/ActionSheetPicker-3.0/issues/344) + +**Merged pull requests:** + +- update settings [\#520](https://github.com/skywinder/ActionSheetPicker-3.0/pull/520) ([skywinder](https://github.com/skywinder)) +- Present picker on topViewController instead of rootViewController [\#519](https://github.com/skywinder/ActionSheetPicker-3.0/pull/519) ([noorulain17](https://github.com/noorulain17)) +- Issue 344 - Fixed typo in ReadMe for Objective C - NSInteger [\#518](https://github.com/skywinder/ActionSheetPicker-3.0/pull/518) ([noorulain17](https://github.com/noorulain17)) +- Issue 512 - Fixed SPM file scope/path issues [\#517](https://github.com/skywinder/ActionSheetPicker-3.0/pull/517) ([noorulain17](https://github.com/noorulain17)) +- Add Swift Package Manager instruction [\#516](https://github.com/skywinder/ActionSheetPicker-3.0/pull/516) ([cutmail](https://github.com/cutmail)) +- Issue \#505: iOS 14 unable to select date in inline datePickerStyle [\#514](https://github.com/skywinder/ActionSheetPicker-3.0/pull/514) ([palmtrae](https://github.com/palmtrae)) + +## [2.6.1](https://github.com/skywinder/ActionSheetPicker-3.0/tree/2.6.1) (2020-10-07) + +[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/2.6.0...2.6.1) + +**Implemented enhancements:** + +- update deprecated classes: UIPopoverPresentationController [\#499](https://github.com/skywinder/ActionSheetPicker-3.0/pull/499) ([cutmail](https://github.com/cutmail)) + +**Fixed bugs:** + +- iOS14 datepicker style looks pretty bad! [\#500](https://github.com/skywinder/ActionSheetPicker-3.0/issues/500) + +**Closed issues:** + +- Date Picker Wheels Not Showing Anymore on iOS 14 [\#510](https://github.com/skywinder/ActionSheetPicker-3.0/issues/510) +- carthage update fails for "2.6.0", is successful for "2.5.1". [\#507](https://github.com/skywinder/ActionSheetPicker-3.0/issues/507) +- iOS 14 datePicker not centered horizontally [\#506](https://github.com/skywinder/ActionSheetPicker-3.0/issues/506) +- Swift Package Manager [\#426](https://github.com/skywinder/ActionSheetPicker-3.0/issues/426) + +**Merged pull requests:** + +- Bottom padding for iPhone X style phones [\#511](https://github.com/skywinder/ActionSheetPicker-3.0/pull/511) ([palmtrae](https://github.com/palmtrae)) +- Fixed carthage build for Xcode \<12 [\#508](https://github.com/skywinder/ActionSheetPicker-3.0/pull/508) ([ddaddy](https://github.com/ddaddy)) + +## [2.6.0](https://github.com/skywinder/ActionSheetPicker-3.0/tree/2.6.0) (2020-09-27) + +[Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/2.5.1...2.6.0) **Fixed bugs:** @@ -17,10 +129,10 @@ **Merged pull requests:** +- udpate recommended settings, fixed warrings [\#504](https://github.com/skywinder/ActionSheetPicker-3.0/pull/504) ([skywinder](https://github.com/skywinder)) - Fixed target for SPM - Package.swift file [\#503](https://github.com/skywinder/ActionSheetPicker-3.0/pull/503) ([noorulain17](https://github.com/noorulain17)) -- iOS 14 default datePickerStyle = wheels when not set in the app [\#502](https://github.com/skywinder/ActionSheetPicker-3.0/pull/502) ([noorulain17](https://github.com/noorulain17)) +- iOS 14 default datePickerStyle = wheels when not set in the app, Fixes Issue \#491 \(Background tap\) [\#502](https://github.com/skywinder/ActionSheetPicker-3.0/pull/502) ([noorulain17](https://github.com/noorulain17)) - Updated contributers list [\#497](https://github.com/skywinder/ActionSheetPicker-3.0/pull/497) ([noorulain17](https://github.com/noorulain17)) -- Update source patterns [\#458](https://github.com/skywinder/ActionSheetPicker-3.0/pull/458) ([ElfSundae](https://github.com/ElfSundae)) ## [2.5.1](https://github.com/skywinder/ActionSheetPicker-3.0/tree/2.5.1) (2020-09-01) @@ -101,6 +213,7 @@ **Merged pull requests:** - Fix rotation issues. [\#468](https://github.com/skywinder/ActionSheetPicker-3.0/pull/468) ([skywinder](https://github.com/skywinder)) +- Update source patterns [\#458](https://github.com/skywinder/ActionSheetPicker-3.0/pull/458) ([ElfSundae](https://github.com/ElfSundae)) ## [2.4.1](https://github.com/skywinder/ActionSheetPicker-3.0/tree/2.4.1) (2019-12-24) @@ -120,9 +233,9 @@ **Merged pull requests:** -- Add Discord link and fix some minor issues in README.md file [\#456](https://github.com/skywinder/ActionSheetPicker-3.0/pull/456) ([BubiDevs](https://github.com/BubiDevs)) +- Add Discord link and fix some minor issues in README.md file [\#456](https://github.com/skywinder/ActionSheetPicker-3.0/pull/456) ([andreabusi](https://github.com/andreabusi)) - Fix podspec [\#455](https://github.com/skywinder/ActionSheetPicker-3.0/pull/455) ([ElfSundae](https://github.com/ElfSundae)) -- Improve Markdown syntax several .md files [\#452](https://github.com/skywinder/ActionSheetPicker-3.0/pull/452) ([BubiDevs](https://github.com/BubiDevs)) +- Improve Markdown syntax several .md files [\#452](https://github.com/skywinder/ActionSheetPicker-3.0/pull/452) ([andreabusi](https://github.com/andreabusi)) ## [2.4.0](https://github.com/skywinder/ActionSheetPicker-3.0/tree/2.4.0) (2019-12-10) @@ -175,7 +288,7 @@ - CLI allcontributors setup [\#442](https://github.com/skywinder/ActionSheetPicker-3.0/pull/442) ([skywinder](https://github.com/skywinder)) - xcode updates with missing variables [\#434](https://github.com/skywinder/ActionSheetPicker-3.0/pull/434) ([skywinder](https://github.com/skywinder)) - should use β€œweak” [\#429](https://github.com/skywinder/ActionSheetPicker-3.0/pull/429) ([xiaoer371](https://github.com/xiaoer371)) -- Add iOS 13 support - Handle UIWindow for iOS 13 changes [\#425](https://github.com/skywinder/ActionSheetPicker-3.0/pull/425) ([BubiDevs](https://github.com/BubiDevs)) +- Add iOS 13 support - Handle UIWindow for iOS 13 changes [\#425](https://github.com/skywinder/ActionSheetPicker-3.0/pull/425) ([andreabusi](https://github.com/andreabusi)) - Support iOS 13 Dark Mode [\#421](https://github.com/skywinder/ActionSheetPicker-3.0/pull/421) ([arnoldxt](https://github.com/arnoldxt)) - Attributed strings can be used as picker rows. Fixed accessibility for picker title. [\#403](https://github.com/skywinder/ActionSheetPicker-3.0/pull/403) ([xjki](https://github.com/xjki)) - Fix run ActionSheetPickerTests on Xcode and Travis CI [\#393](https://github.com/skywinder/ActionSheetPicker-3.0/pull/393) ([nowsprinting](https://github.com/nowsprinting)) @@ -270,6 +383,7 @@ **Merged pull requests:** - Use modern objective c initializer syntax [\#235](https://github.com/skywinder/ActionSheetPicker-3.0/pull/235) ([mamnun](https://github.com/mamnun)) +- Fixes presentation issue on iPads [\#131](https://github.com/skywinder/ActionSheetPicker-3.0/pull/131) ([maciekish](https://github.com/maciekish)) ## [2.0.3](https://github.com/skywinder/ActionSheetPicker-3.0/tree/2.0.3) (2015-10-13) @@ -343,6 +457,7 @@ **Implemented enhancements:** - Dark Mode [\#102](https://github.com/skywinder/ActionSheetPicker-3.0/issues/102) +- Add methods to custom background color ... [\#195](https://github.com/skywinder/ActionSheetPicker-3.0/pull/195) ([ainopara](https://github.com/ainopara)) ## [1.6.2](https://github.com/skywinder/ActionSheetPicker-3.0/tree/1.6.2) (2015-05-07) @@ -372,7 +487,6 @@ - Integration ActionSheetPicker as dynamic framework [\#170](https://github.com/skywinder/ActionSheetPicker-3.0/issues/170) - Cancel Action unknow for `ActionSheetDistancePicker` [\#166](https://github.com/skywinder/ActionSheetPicker-3.0/issues/166) -- Add methods to custom background color ... [\#195](https://github.com/skywinder/ActionSheetPicker-3.0/pull/195) ([ainopara](https://github.com/ainopara)) - iOS 5.1.1 compatibility added [\#164](https://github.com/skywinder/ActionSheetPicker-3.0/pull/164) ([kashifhisam](https://github.com/kashifhisam)) - Added "tag" to AbstractActionSheet [\#159](https://github.com/skywinder/ActionSheetPicker-3.0/pull/159) ([Jeepston](https://github.com/Jeepston)) @@ -501,6 +615,11 @@ - UIDatePicker does not fire the target-action associated with the UIControlEventValueChanged event the first time [\#104](https://github.com/skywinder/ActionSheetPicker-3.0/issues/104) - Added workaround for a bug in UIDatePicker in count down mode. [\#105](https://github.com/skywinder/ActionSheetPicker-3.0/pull/105) ([tomaskraina](https://github.com/tomaskraina)) +**Merged pull requests:** + +- Add a Bitdeli Badge to README [\#107](https://github.com/skywinder/ActionSheetPicker-3.0/pull/107) ([bitdeli-chef](https://github.com/bitdeli-chef)) +- Added minimumDate and maximumDate to contructor of ActionSheetDatePicker [\#98](https://github.com/skywinder/ActionSheetPicker-3.0/pull/98) ([emmanuelay](https://github.com/emmanuelay)) + ## [1.3.6](https://github.com/skywinder/ActionSheetPicker-3.0/tree/1.3.6) (2014-12-02) [Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/1.3.5...1.3.6) @@ -513,11 +632,6 @@ - Travis builds is broken by fix \#96 [\#99](https://github.com/skywinder/ActionSheetPicker-3.0/issues/99) -**Merged pull requests:** - -- Add a Bitdeli Badge to README [\#107](https://github.com/skywinder/ActionSheetPicker-3.0/pull/107) ([bitdeli-chef](https://github.com/bitdeli-chef)) -- Added minimumDate and maximumDate to contructor of ActionSheetDatePicker [\#98](https://github.com/skywinder/ActionSheetPicker-3.0/pull/98) ([emmanuelay](https://github.com/emmanuelay)) - ## [1.3.5](https://github.com/skywinder/ActionSheetPicker-3.0/tree/1.3.5) (2014-11-14) [Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/1.3.4...1.3.5) @@ -659,6 +773,8 @@ - Update SWActionSheet.m [\#60](https://github.com/skywinder/ActionSheetPicker-3.0/pull/60) ([zhongyang](https://github.com/zhongyang)) - add block based API to date picker [\#56](https://github.com/skywinder/ActionSheetPicker-3.0/pull/56) ([mrtj](https://github.com/mrtj)) +- update badge [\#46](https://github.com/skywinder/ActionSheetPicker-3.0/pull/46) ([skywinder](https://github.com/skywinder)) +- Add badge [\#45](https://github.com/skywinder/ActionSheetPicker-3.0/pull/45) ([skywinder](https://github.com/skywinder)) ## [1.1.13](https://github.com/skywinder/ActionSheetPicker-3.0/tree/1.1.13) (2014-09-19) @@ -668,11 +784,6 @@ - impossible to run in xcode 6 [\#48](https://github.com/skywinder/ActionSheetPicker-3.0/issues/48) -**Merged pull requests:** - -- update badge [\#46](https://github.com/skywinder/ActionSheetPicker-3.0/pull/46) ([skywinder](https://github.com/skywinder)) -- Add badge [\#45](https://github.com/skywinder/ActionSheetPicker-3.0/pull/45) ([skywinder](https://github.com/skywinder)) - ## [1.1.12](https://github.com/skywinder/ActionSheetPicker-3.0/tree/1.1.12) (2014-09-17) [Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/1.1.11...1.1.12) @@ -806,10 +917,6 @@ [Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/1.0.13...1.0.14) -**Merged pull requests:** - -- Set minimum date properly. [\#14](https://github.com/skywinder/ActionSheetPicker-3.0/pull/14) ([matt](https://github.com/matt)) - ## [1.0.13](https://github.com/skywinder/ActionSheetPicker-3.0/tree/1.0.13) (2014-07-30) [Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/1.0.12...1.0.13) @@ -826,10 +933,6 @@ [Full Changelog](https://github.com/skywinder/ActionSheetPicker-3.0/compare/1.0.11...1.0.12) -**Fixed bugs:** - -- Crash when using in 5s iOS 7.1 [\#8](https://github.com/skywinder/ActionSheetPicker-3.0/issues/8) - **Closed issues:** - i get this warning!'sizeWithFont:' is deprecated: first deprecated in iOS 7.0 - Use -sizeWithAttributes: [\#11](https://github.com/skywinder/ActionSheetPicker-3.0/issues/11) @@ -849,6 +952,7 @@ **Fixed bugs:** +- Crash when using in 5s iOS 7.1 [\#8](https://github.com/skywinder/ActionSheetPicker-3.0/issues/8) - On Iphone 4 the ActionSheetStringPicker doesn't work Well [\#5](https://github.com/skywinder/ActionSheetPicker-3.0/issues/5) ## [1.0.8](https://github.com/skywinder/ActionSheetPicker-3.0/tree/1.0.8) (2014-06-29) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bbcb65d5..682bb8c1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,6 +19,8 @@ that one isn't already logged. Fork this repository, make it awesomer (preferably in a branch named for the topic), send a pull request! +Bonus: Add a video/gif/image for your changes. + All code contributions should match our [coding conventions](https://github.com/NYTimes/objective-c-style-guide). diff --git a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/AbstractActionSheetPicker.m b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/AbstractActionSheetPicker.m index 17ff45e1..8d7cbcba 100755 --- a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/AbstractActionSheetPicker.m +++ b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/AbstractActionSheetPicker.m @@ -79,6 +79,8 @@ @interface AbstractActionSheetPicker () @property(nonatomic, assign) SEL successAction; @property(nonatomic, assign) SEL cancelAction; @property(nonatomic, strong) UIViewController *popOverViewController; +@property(nonatomic, strong) UITapGestureRecognizer *windowTapAction; +@property(nonatomic, assign) NSInteger windowTapActionRetryCount; @property(nonatomic, strong) CIFilter *filter; @property(nonatomic, strong) CIContext *context; @property(nonatomic, strong) NSObject *selfReference; @@ -287,38 +289,51 @@ - (void)showActionSheetPicker { [self presentPickerForView:masterView]; } + [self addTapDismissAction]; +} + +- (void)addTapDismissAction { + if (!self.pickerView) { + NSAssert(_pickerView != NULL, @"Picker view failed to instantiate, perhaps you have invalid component data."); + return; + } + if (self.windowTapActionRetryCount > 10) { + NSAssert(NO, @"Failed to find Picker view's window. This may cause a memory leak."); + } + if (!self.pickerView.window) { + self.windowTapActionRetryCount += 1; + dispatch_async(dispatch_get_main_queue(), ^{ + [self addTapDismissAction]; + }); + return; + } + #pragma clang diagnostic push #pragma ide diagnostic ignored "UnavailableInDeploymentTarget" { + SEL sel; switch (self.tapDismissAction) { - case TapActionDismiss: { + case TapActionDismiss: // add tap dismiss action - self.actionSheet.superview.userInteractionEnabled = YES; - UITapGestureRecognizer *tapAction = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissPicker)]; - tapAction.delegate = self; - [self.actionSheet.superview addGestureRecognizer:tapAction]; + sel = @selector(dismissPicker); break; - } - case TapActionSuccess: { + case TapActionSuccess: // add tap success action with dismissPicker - self.actionSheet.superview.userInteractionEnabled = YES; - UITapGestureRecognizer *tapAction = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(actionPickerDone:)]; - tapAction.delegate = self; - [self.actionSheet.superview addGestureRecognizer:tapAction]; + sel = @selector(actionPickerDone:); break; - } - case TapActionCancel: { + case TapActionCancel: // add tap cancel action with dismissPicker - self.actionSheet.superview.userInteractionEnabled = YES; - UITapGestureRecognizer *tapAction = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(actionPickerCancel:)]; - tapAction.delegate = self; - [self.actionSheet.superview addGestureRecognizer:tapAction]; + sel = @selector(actionPickerCancel:); break; - } }; + if (sel) { + self.actionSheet.window.userInteractionEnabled = YES; + self.windowTapAction = [[UITapGestureRecognizer alloc] initWithTarget:self action:sel]; + self.windowTapAction.delegate = self; + [self.actionSheet.window addGestureRecognizer:self.windowTapAction]; + } } #pragma clang diagnostic pop - } - (IBAction)actionPickerDone:(id)sender { @@ -339,6 +354,7 @@ - (void)dismissPicker { self.actionSheet = nil; self.popOverViewController = nil; self.selfReference = nil; + [self.pickerView.window removeGestureRecognizer:self.windowTapAction]; } #pragma mark - Custom Buttons @@ -797,6 +813,13 @@ - (void)presentPopover:(UIViewController *)viewController { #pragma mark UIGestureRecognizerDelegate +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldBeRequiredToFailByGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { + if (IS_IPAD) { + return YES; + } + return NO; +} + - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer { CGPoint toolbarLocation = [gestureRecognizer locationInView:self.toolbar]; CGPoint actionSheetLocation = [gestureRecognizer locationInView:self.actionSheet]; diff --git a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/ActionSheetDatePicker.m b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/ActionSheetDatePicker.m index 25174d92..2cc6e89c 100755 --- a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/ActionSheetDatePicker.m +++ b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/ActionSheetDatePicker.m @@ -41,7 +41,7 @@ @implementation ActionSheetDatePicker @synthesize datePickerStyle = _datePickerStyle; --(UIDatePickerStyle)datePickerStyle { +- (UIDatePickerStyle)datePickerStyle { if (_datePickerStyle != UIDatePickerStyleAutomatic) { return _datePickerStyle; } else { @@ -168,7 +168,7 @@ - (instancetype)initWithTitle:(NSString *)title } - (UIView *)configuredPickerView { - CGRect datePickerFrame = CGRectMake(0, 40, self.viewSize.width, 216); + CGRect datePickerFrame = CGRectMake(0, 44, self.viewSize.width, self.getDatePickerHeight); UIDatePicker *datePicker = [[UIDatePicker alloc] initWithFrame:datePickerFrame]; datePicker.datePickerMode = self.datePickerMode; datePicker.maximumDate = self.maximumDate; @@ -290,14 +290,13 @@ - (void)customButtonPressed:(id)sender { } } -- (CGFloat)getDatePickerHeight -{ +- (CGFloat)getDatePickerHeight { CGFloat height = 216.0; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 140000 // Xcode 12 and iOS 14, or greater if (@available(iOS 14.0, *)) { - if (_datePickerStyle == UIDatePickerStyleCompact) { + if (self.datePickerStyle == UIDatePickerStyleCompact) { height = 90.0; - } else if (_datePickerStyle == UIDatePickerStyleInline) { + } else if (self.datePickerStyle == UIDatePickerStyleInline) { switch (_datePickerMode) { case UIDatePickerModeDate: height = 350.0; diff --git a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetCustomPicker.h b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetCustomPicker.h index b2d88c3f..85ef262c 100644 --- a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetCustomPicker.h +++ b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetCustomPicker.h @@ -6,8 +6,8 @@ // Copyright (c) 2012 Club 15CC. All rights reserved. // #import -#import -#import +#import "AbstractActionSheetPicker.h" +#import "ActionSheetCustomPickerDelegate.h" @interface ActionSheetCustomPicker : AbstractActionSheetPicker { diff --git a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetCustomPickerDelegate.h b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetCustomPickerDelegate.h index e7a1a3ec..954839ff 100644 --- a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetCustomPickerDelegate.h +++ b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetCustomPickerDelegate.h @@ -7,7 +7,7 @@ // #import -#import +#import "AbstractActionSheetPicker.h" @protocol ActionSheetCustomPickerDelegate diff --git a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetDatePicker.h b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetDatePicker.h index 41175901..04eb9a02 100755 --- a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetDatePicker.h +++ b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetDatePicker.h @@ -25,7 +25,7 @@ //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#import +#import "AbstractActionSheetPicker.h" @class ActionSheetDatePicker; diff --git a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetDistancePicker.h b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetDistancePicker.h index 0fa4a15b..408f254d 100644 --- a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetDistancePicker.h +++ b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetDistancePicker.h @@ -25,8 +25,8 @@ //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#import -#import +#import "AbstractActionSheetPicker.h" +#import "DistancePickerView.h" @interface ActionSheetDistancePicker : AbstractActionSheetPicker diff --git a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetLocalePicker.h b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetLocalePicker.h index d4bd7466..bdbfdc1a 100644 --- a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetLocalePicker.h +++ b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetLocalePicker.h @@ -25,7 +25,7 @@ //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#import +#import "AbstractActionSheetPicker.h" @class ActionSheetLocalePicker; typedef void(^ActionLocaleDoneBlock)(ActionSheetLocalePicker *picker, NSTimeZone * selectedValue); diff --git a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetMultipleStringPicker.h b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetMultipleStringPicker.h index 8bb03246..d486cdbb 100644 --- a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetMultipleStringPicker.h +++ b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetMultipleStringPicker.h @@ -28,7 +28,7 @@ //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#import +#import "AbstractActionSheetPicker.h" @class ActionSheetMultipleStringPicker; typedef void(^ActionMultipleStringDoneBlock)(ActionSheetMultipleStringPicker *picker, NSArray *selectedIndexes, id selectedValues); diff --git a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetStringPicker.h b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetStringPicker.h index 8b318d1e..610c2cb4 100644 --- a/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetStringPicker.h +++ b/CoreActionSheetPicker/CoreActionSheetPicker/Pickers/include/ActionSheetStringPicker.h @@ -25,7 +25,7 @@ //SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // -#import +#import "AbstractActionSheetPicker.h" @class ActionSheetStringPicker; typedef void(^ActionStringDoneBlock)(ActionSheetStringPicker *picker, NSInteger selectedIndex, id selectedValue); diff --git a/README.md b/README.md index 722d7f55..b0952b1e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,9 @@ [![Build Status](https://travis-ci.org/skywinder/ActionSheetPicker-3.0.svg?branch=master)](https://travis-ci.org/skywinder/ActionSheetPicker-3.0) [![Issues](http://img.shields.io/github/issues/skywinder/ActionSheetPicker-3.0.svg)](https://github.com/skywinder/ActionSheetPicker-3.0/issues?state=open) [![License](https://img.shields.io/cocoapods/l/ActionSheetPicker-3.0.svg)](http://cocoadocs.org/docsets/ActionSheetPicker-3.0) -[![Platform](https://img.shields.io/cocoapods/p/ActionSheetPicker-3.0.svg)](http://cocoadocs.org/docsets/ActionSheetPicker-3.0)[![All Contributors](https://img.shields.io/badge/all_contributors-21-orange.svg?style=flat-square)](#contributors-) +[![Platform](https://img.shields.io/cocoapods/p/ActionSheetPicker-3.0.svg)](http://cocoadocs.org/docsets/ActionSheetPicker-3.0) +[![All Contributors](https://img.shields.io/badge/all_contributors-24-orange.svg?style=flat-square)](#contributors-) + ## Important update @@ -280,45 +282,49 @@ You can join our Discord using [this link](https://discord.gg/68NeeUx). Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Petr Korolev

πŸ’» πŸ‘€ πŸ’¬ πŸ’‘

Tim Cinel

πŸ’» πŸ‘€ πŸ“–

JurΔ£is ΔΆirΕ‘akmens

πŸ’¬ πŸ’‘

Nikos

πŸ“–

Vinh Tran

πŸ’» πŸ›‘οΈ

Kashif Hisam

πŸ’»

DYY_Xiaoer

πŸ’» πŸ›‘οΈ

Seth Delackner

πŸ’»

Zheng Li

πŸ’»

Andrea

πŸ’¬ πŸ’» πŸ–‹ 🚧

Bino90

πŸ’»

arnoldxt

πŸ’»

Koji Hasegawa

πŸš‡

Ali Ersoz

πŸ’»

KAWASHIMA Yoshiyuki

πŸ“–

Ricardo Hernandez

πŸ’»

Vincent Narbot

πŸ“–

Ezequiel França

πŸ“–

Nikola Mladenovic

πŸ“–

Umer Asif

πŸ›

longjun

πŸ’»

Manuel Kunz

πŸ’» πŸ‘€ πŸ“–

Noor ul Ain Ali

πŸ’» πŸ‘€ 🚧
- - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Petr Korolev
Petr Korolev

πŸ’» πŸ‘€ πŸ’¬ πŸ’‘
Tim Cinel
Tim Cinel

πŸ’» πŸ‘€ πŸ“–
JurΔ£is ΔΆirΕ‘akmens
JurΔ£is ΔΆirΕ‘akmens

πŸ’¬ πŸ’‘
Nikos
Nikos

πŸ“–
Vinh Tran
Vinh Tran

πŸ’» πŸ›‘οΈ
Kashif Hisam
Kashif Hisam

πŸ’»
DYY_Xiaoer
DYY_Xiaoer

πŸ’» πŸ›‘οΈ
Seth Delackner
Seth Delackner

πŸ’»
Zheng Li
Zheng Li

πŸ’»
Andrea
Andrea

πŸ’¬ πŸ’» πŸ–‹ 🚧
Bino90
Bino90

πŸ’»
arnoldxt
arnoldxt

πŸ’»
Koji Hasegawa
Koji Hasegawa

πŸš‡
Ali Ersoz
Ali Ersoz

πŸ’»
KAWASHIMA Yoshiyuki
KAWASHIMA Yoshiyuki

πŸ“–
Ricardo Hernandez
Ricardo Hernandez

πŸ’»
Vincent Narbot
Vincent Narbot

πŸ“–
Ezequiel França
Ezequiel França

πŸ“–
Nikola Mladenovic
Nikola Mladenovic

πŸ“–
Umer Asif
Umer Asif

πŸ›
longjun
longjun

πŸ’»
Manuel Kunz
Manuel Kunz

πŸ’» πŸ‘€ πŸ“–
Noor ul Ain Ali
Noor ul Ain Ali

πŸ’» πŸ‘€ 🚧
Wei
Wei

πŸš‡ πŸ‘€ 🚧
+ + + + This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!