Swift可滑动不定宽SegmentControl

想要一个不定宽、可滑动的 SegmentControl 吗?这个项目叫做 swift-一个可滑动的不定宽按钮的 SegmentControl,挺有意思的。它改变了传统 SegmentControl 固定宽度的限制,允许每个 segment 根据内容自适应宽度,并且支持滑动,给用户带来更流畅的交互体验。开发者可以直接在 Storyboard 中定制,省去了多手动设置的麻烦。需要注意的是,这个控件利用了 Auto Layout 和手势识别(比如PanGestureRecognizer)来实现自适应和滑动效果。这样一来,每个 segment 就可以根据内容自动调整宽度,而且滑动时还能带来平滑的过渡。你可以用它做出更灵活的 UI 界面,满足不同设计需求。如果你想在项目中使用它,不仅可以自定义颜色、文字样式,甚至可以通过委托协议监听用户交互。挺实用的,适合需要细节和互动性较高的场景。

zip
swift-一个可滑动的不定宽按钮的SegmentControl.zip 预估大小:67个文件
folder
WDScrollableSegmentedControl-master 文件夹
file
.travis.yml 553B
file
WDScrollableSegmentedControl.podspec 2KB
file
screenshot.gif 305KB
folder
Example 文件夹
folder
WDScrollableSegmentedControl.xcworkspace 文件夹
file
contents.xcworkspacedata 246B
file
Podfile 212B
folder
WDScrollableSegmentedControl 文件夹
file
main.m 345B
file
WDViewController.m 3KB
file
WDScrollableSegmentedControl-Prefix.pch 321B
file
WDViewController.h 224B
folder
Base.lproj 文件夹
file
LaunchScreen.storyboard 2KB
file
WDScrollableSegmentedControl-Info.plist 2KB
file
WDAppDelegate.m 2KB
folder
Images.xcassets 文件夹
folder
AppIcon.appiconset 文件夹
file
Contents.json 1KB
folder
YTPageController 文件夹
file
YTPageController.h 8KB
file
YTPageController.m 23KB
file
YTPageControllerSegue.h 305B
file
YTPageControllerSegue.m 3KB
folder
en.lproj 文件夹
file
InfoPlist.strings 45B
file
WDAppDelegate.h 286B
file
Main.storyboard 8KB
file
Podfile.lock 344B
folder
WDScrollableSegmentedControl.xcodeproj 文件夹
folder
project.xcworkspace 文件夹
file
contents.xcworkspacedata 173B
file
project.pbxproj 32KB
folder
xcshareddata 文件夹
folder
xcschemes 文件夹
file
WDScrollableSegmentedControl-Example.xcscheme 4KB
folder
Pods 文件夹
folder
Target Support Files 文件夹
folder
Pods-WDScrollableSegmentedControl_Tests 文件夹
file
Pods-WDScrollableSegmentedControl_Tests-frameworks.sh 3KB
file
Pods-WDScrollableSegmentedControl_Tests-resources.sh 5KB
file
Pods-WDScrollableSegmentedControl_Tests.modulemap 168B
file
Pods-WDScrollableSegmentedControl_Tests-umbrella.h 223B
file
Pods-WDScrollableSegmentedControl_Tests-acknowledgements.plist 805B
file
Pods-WDScrollableSegmentedControl_Tests-dummy.m 182B
file
Pods-WDScrollableSegmentedControl_Tests-acknowledgements.markdown 133B
file
Pods-WDScrollableSegmentedControl_Tests.debug.xcconfig 583B
file
Pods-WDScrollableSegmentedControl_Tests.release.xcconfig 583B
file
Info.plist 828B
folder
Pods-WDScrollableSegmentedControl_Example 文件夹
file
Pods-WDScrollableSegmentedControl_Example.release.xcconfig 654B
file
Pods-WDScrollableSegmentedControl_Example-dummy.m 186B
file
Pods-WDScrollableSegmentedControl_Example-acknowledgements.markdown 1KB
file
Pods-WDScrollableSegmentedControl_Example.debug.xcconfig 654B
file
Pods-WDScrollableSegmentedControl_Example-acknowledgements.plist 2KB
file
Pods-WDScrollableSegmentedControl_Example-resources.sh 5KB
file
Pods-WDScrollableSegmentedControl_Example.modulemap 172B
file
Info.plist 828B
file
Pods-WDScrollableSegmentedControl_Example-frameworks.sh 4KB
file
Pods-WDScrollableSegmentedControl_Example-umbrella.h 227B
folder
WDScrollableSegmentedControl 文件夹
file
WDScrollableSegmentedControl-dummy.m 160B
file
WDScrollableSegmentedControl.xcconfig 460B
file
WDScrollableSegmentedControl-prefix.pch 48B
file
Info.plist 828B
file
WDScrollableSegmentedControl.modulemap 146B
file
WDScrollableSegmentedControl-umbrella.h 242B
file
Manifest.lock 344B
folder
Local Podspecs 文件夹
file
WDScrollableSegmentedControl.podspec.json 614B
folder
Pods.xcodeproj 文件夹
folder
project.xcworkspace 文件夹
file
contents.xcworkspacedata 135B
file
project.pbxproj 37KB
folder
Tests 文件夹
file
Tests.m 648B
file
Tests-Info.plist 674B
folder
en.lproj 文件夹
file
InfoPlist.strings 45B
file
Tests-Prefix.pch 132B
file
LICENSE 1KB
file
_Pods.xcodeproj 27B
file
ibinspectable.png 66KB
folder
WDScrollableSegmentedControl 文件夹
folder
Assets 文件夹
folder
.gitkeep 文件夹
folder
Classes 文件夹
file
WDScrollableSegmentedControl.m 6KB
file
WDScrollableSegmentedControl.h 2KB
folder
.gitkeep 文件夹
file
.gitignore 619B
file
README.md 3KB
...
zip 文件大小:385.16KB