yonat / radiogroup Goto Github PK
View Code? Open in Web Editor NEWThe missing iOS radio buttons group.
License: MIT License
The missing iOS radio buttons group.
License: MIT License
One small suggestion on the docs in the README--
Add an example usage of fixedSize() -- and what it's needed for. The radio buttons were spread out for me too far and I didn't realize how to change this, initially.
Description of the problem:
Not able to do archive from Xcode; if installed through swift package manager; if its Pods then no issues..
attaching the screen shot for your review....
Minimal project that reproduces the problem (so I'll be able to figure out how to fix it):
[link to a Minimal Reproducible Example as described at https://ootips.org/yonat/repex ]
Swift PM n archive from Xcode Version 12.1 (12A7403)
CocoaPods version 1.10.0
Is it possible to change the outer ring's color if it's selected?
something like this
@IBInspectable open dynamic var selectedTintColor: UIColor? {
didSet {
layer.borderColor = selectedTintColor.cgColor ?? selectedColor
}
}
Let me know if it's possible or not, if so, I can make the PR
Thank you.
Invalid manifest (compiled with: ["/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swiftc", "-vfsoverlay", "/var/folders/mk/sw0zk_d16sb3qjfbq50z2dgc0000gn/T/TemporaryDirectory.c7f6pl/vfs.yaml", "-L", "/Applications/Xcode.app/Contents/PlugIns/IDESwiftPackageCore.framework/Versions/A/Frameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-lPackageDescription", "-Xlinker", "-rpath", "-Xlinker", "/Applications/Xcode.app/Contents/PlugIns/IDESwiftPackageCore.framework/Versions/A/Frameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-target", "arm64-apple-macos12.0", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk", "-swift-version", "5", "-I", "/Applications/Xcode.app/Contents/PlugIns/IDESwiftPackageCore.framework/Versions/A/Frameworks/SwiftPM.framework/SharedSupport/ManifestAPI", "-sdk", "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk", "-package-description-version", "5.1.0", "-Xfrontend", "-serialize-diagnostics-path", "-Xfrontend", "/Users/mohammadfarhan/Library/Caches/org.swift.swiftpm/manifests/ManifestLoading/sweeterswift.dia", "/Package.swift", "-disallow-use-new-driver", "-o", "/var/folders/mk/sw0zk_d16sb3qjfbq50z2dgc0000gn/T/TemporaryDirectory.8LuBtQ/sweeterswift-manifest"])
Description:
titles support for NSLocalizedString(<#T##key: String##String#>, comment: <#T##String#>)
or LocalizedStringKey()
Problems I encountered when trying to implement this myself:
Description of the problem:
When running, I am seeing that one of the constraints is 0 for a table size so the constraint is being ignored(dropped).
v 1.4.1
Loaded with cocoaPods.
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600002030fa0 'UIView-bottomMargin-guide-constraint' V:[UILayoutGuide:0x600003a281c0'UIViewLayoutMarginsGuide']-(0)-| (active, names: '|':UIStackView:0x7fb001407cf0 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2020-11-08 18:44:01.921289-0500 RadioGroupBug[90413:13898342] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x60000202c640 h=--& v=--& RadioGroup.width == 0 (active, names: RadioGroup:0x7fb001407b00 )>",
"<NSLayoutConstraint:0x600002074d70 H:|-(0)-UIStackView:0x7faff2b136b0 (active, names: RadioGroupItem:0x7faff2b11f20, '|':RadioGroupItem:0x7faff2b11f20 )>",
"<NSLayoutConstraint:0x600002074dc0 UIStackView:0x7faff2b136b0.right == RadioGroupItem.right (active, names: RadioGroupItem:0x7faff2b11f20 )>",
"<NSLayoutConstraint:0x6000020317c0 H:|-(0)-[UIStackView:0x7fb001407cf0] (active, names: RadioGroup:0x7fb001407b00, '|':RadioGroup:0x7fb001407b00 )>",
"<NSLayoutConstraint:0x600002030cd0 UIStackView:0x7fb001407cf0.rightMargin == RadioGroup.rightMargin (active, names: RadioGroup:0x7fb001407b00 )>",
"<NSLayoutConstraint:0x600002011b30 'UISV-alignment' RadioGroupItem.leading == RadioGroupItem.leading (active, names: RadioGroupItem:0x7faff2b0fd00, RadioGroupItem:0x7faff2b11f20 )>",
"<NSLayoutConstraint:0x600002010be0 'UISV-alignment' RadioGroupItem.trailing == RadioGroupItem.trailing (active, names: RadioGroupItem:0x7faff2b0fd00, RadioGroupItem:0x7faff2b11f20 )>",
"<NSLayoutConstraint:0x600002010960 'UISV-canvas-connection' UIStackView:0x7fb001407cf0.leading == RadioGroupItem.leading (active, names: RadioGroupItem:0x7faff2b0fd00 )>",
"<NSLayoutConstraint:0x600002010c80 'UISV-canvas-connection' UIStackView:0x7faff2b136b0.leading == RadioButton.leading (active, names: RadioButton:0x7faff2b12320 )>",
"<NSLayoutConstraint:0x600002010b40 'UISV-canvas-connection' H:[UIView:0x7faff2b0d560]-(0)-| (active, names: '|':UIStackView:0x7faff2b136b0 )>",
"<NSLayoutConstraint:0x600002012440 'UISV-canvas-connection' H:[RadioGroupItem]-(0)-| (active, names: RadioGroupItem:0x7faff2b0fd00, '|':UIStackView:0x7fb001407cf0 )>",
"<NSLayoutConstraint:0x600002010e60 'UISV-spacing' H:[RadioButton]-(4)-[UIView:0x7faff2b0d560] (active, names: RadioButton:0x7faff2b12320 )>",
"<NSLayoutConstraint:0x6000020316d0 'UIView-leftMargin-guide-constraint' H:|-(0)-UILayoutGuide:0x600003a281c0'UIViewLayoutMarginsGuide' (active, names: '|':UIStackView:0x7fb001407cf0 )>",
"<NSLayoutConstraint:0x600002031810 'UIView-leftMargin-guide-constraint' H:|-(8)-UILayoutGuide:0x600003a28380'UIViewLayoutMarginsGuide' (active, names: RadioGroup:0x7fb001407b00, '|':RadioGroup:0x7fb001407b00 )>",
"<NSLayoutConstraint:0x600002030d20 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x600003a281c0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':UIStackView:0x7fb001407cf0 )>",
"<NSLayoutConstraint:0x600002030b40 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x600003a28380'UIViewLayoutMarginsGuide']-(8)-|(LTR) (active, names: RadioGroup:0x7fb001407b00, '|':RadioGroup:0x7fb001407b00 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600002010e60 'UISV-spacing' H:[RadioButton]-(4)-[UIView:0x7faff2b0d560] (active, names: RadioButton:0x7faff2b12320 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
2020-11-08 18:44:01.972791-0500 RadioGroupBug[90413:13898342] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x60000202c640 h=--& v=--& RadioGroup.width == 0 (active, names: RadioGroup:0x7fb001407b00 )>",
"<NSLayoutConstraint:0x6000020317c0 H:|-(0)-[UIStackView:0x7fb001407cf0] (active, names: RadioGroup:0x7fb001407b00, '|':RadioGroup:0x7fb001407b00 )>",
"<NSLayoutConstraint:0x600002030cd0 UIStackView:0x7fb001407cf0.rightMargin == RadioGroup.rightMargin (active, names: RadioGroup:0x7fb001407b00 )>",
"<NSLayoutConstraint:0x6000020316d0 'UIView-leftMargin-guide-constraint' H:|-(0)-UILayoutGuide:0x600003a281c0'UIViewLayoutMarginsGuide' (active, names: '|':UIStackView:0x7fb001407cf0 )>",
"<NSLayoutConstraint:0x600002031810 'UIView-leftMargin-guide-constraint' H:|-(8)-UILayoutGuide:0x600003a28380'UIViewLayoutMarginsGuide' (active, names: RadioGroup:0x7fb001407b00, '|':RadioGroup:0x7fb001407b00 )>",
"<NSLayoutConstraint:0x600002030d20 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x600003a281c0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':UIStackView:0x7fb001407cf0 )>",
"<NSLayoutConstraint:0x600002030b40 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x600003a28380'UIViewLayoutMarginsGuide']-(8)-|(LTR) (active, names: RadioGroup:0x7fb001407b00, '|':RadioGroup:0x7fb001407b00 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600002030d20 'UIView-rightMargin-guide-constraint' H:[UILayoutGuide:0x600003a281c0'UIViewLayoutMarginsGuide']-(0)-|(LTR) (active, names: '|':UIStackView:0x7fb001407cf0 )>
Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.
Minimal project that reproduces the problem (so I'll be able to figure out how to fix it):
[link to a Minimal Reproducible Example as described at https://ootips.org/yonat/repex ]
You should be able to download it from here.
Xcode 12.1
https://github.com/rlegault33/RadioGroupBug
Description of the problem:
[description]
I have three items showing horizontally but sometimes they don't show correctly!
It's in a Vstack with some other items but as it is horizontal, some times it draw normal, sometimes draw like the image above!
Minimal project that reproduces the problem (so I'll be able to figure out how to fix it):
[link to a Minimal Reproducible Example as described at https://ootips.org/yonat/repex ]
[LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this:
(1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
(
"<NSAutoresizingMaskLayoutConstraint:0x600001f93d90 RadioGroup.RadioGroup:0x7fa74196d5c0.height == 0>",
"<NSLayoutConstraint:0x600001f8c960 UIStackView:0x7fa74196d7d0.topMargin == RadioGroup.RadioGroup:0x7fa74196d5c0.topMargin>",
"<NSLayoutConstraint:0x600001f8ca00 UIStackView:0x7fa74196d7d0.bottomMargin == RadioGroup.RadioGroup:0x7fa74196d5c0.bottomMargin>",
"<NSLayoutConstraint:0x600001f8c730 UIStackView:0x7fa74196d7d0.bottom == UILayoutGuide:0x600000562e60.bottom>",
"<NSLayoutConstraint:0x600001f8c870 RadioGroup.RadioGroup:0x7fa74196d5c0.bottom == UILayoutGuide:0x600000563100.bottom + 8>",
"<NSLayoutConstraint:0x600001f8c690 UILayoutGuide:0x600000562e60.top == UIStackView:0x7fa74196d7d0.top>",
"<NSLayoutConstraint:0x600001f8c7d0 UILayoutGuide:0x600000563100.top == RadioGroup.RadioGroup:0x7fa74196d5c0.top + 8>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x600001f8c730 UIStackView:0x7fa74196d7d0.bottom == UILayoutGuide:0x600000562e60.bottom>
How to align horizontal radio buttons?
in Xcode 12 says ".....has different definitions in different modules". Please fix it !!!
Description:
Can you please add ability to unselect current selection? I see that control supports this with selectedIndex: -1 but if I tap on already selected item it doesn't unselect.
Problems I encountered when trying to implement this myself:
I tried to subclass RadioGroup but func selectIndex(item: RadioGroupItem)
isn't open + RadioGroupItem
is also internal.
Thanks!
Hey,
First of all, thanks for the great library.
I would like to import only the library RadioGroup but not SweeterSwift.
Would it be possible to remove the dependency SweeterSwift?
Thanks
I am using RadioGroup via SwiftPackage Manager in my project with target iOS 10. Its all fine but when I try to archive project for submission, I get error as shown below:
Is it due to SwiftUI code? My project is not a SwiftUI code as it targets from iOS 10.
Any suggestion or solution that could be helpful?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.