├── .gitignore
├── CollectionLibrarySwift.xcodeproj
├── project.pbxproj
└── xcshareddata
│ └── xcschemes
│ └── CollectionLibrarySwift.xcscheme
├── CollectionLibrarySwift
├── AppDelegate.swift
├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── a.imageset
│ │ ├── Contents.json
│ │ └── a.jpg
│ ├── b.imageset
│ │ ├── Contents.json
│ │ └── b.jpg
│ ├── back_btn.imageset
│ │ ├── Contents.json
│ │ ├── btn_back.png
│ │ ├── btn_back@2x.png
│ │ └── btn_back@3x.png
│ ├── datashowview
│ │ ├── Contents.json
│ │ └── loading_fail.imageset
│ │ │ ├── Contents.json
│ │ │ └── loading_fail.png
│ ├── pageview
│ │ ├── Contents.json
│ │ ├── background_dark.imageset
│ │ │ ├── Contents.json
│ │ │ └── background_dark@2x.png
│ │ ├── d.imageset
│ │ │ ├── Contents.json
│ │ │ └── d.jpg
│ │ ├── e.imageset
│ │ │ ├── Contents.json
│ │ │ └── e.jpg
│ │ ├── f.imageset
│ │ │ ├── Contents.json
│ │ │ └── f.jpg
│ │ ├── g.imageset
│ │ │ ├── Contents.json
│ │ │ └── g.jpg
│ │ ├── point.imageset
│ │ │ ├── Contents.json
│ │ │ └── point.png
│ │ └── selectpoint.imageset
│ │ │ ├── Contents.json
│ │ │ └── selectpoint.png
│ ├── qq.imageset
│ │ ├── Contents.json
│ │ └── qq@3x.png
│ ├── qqvideo
│ │ ├── Contents.json
│ │ ├── loading00.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading00@2x.png
│ │ │ └── loading00@3x.png
│ │ ├── loading01.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading01@2x.png
│ │ │ └── loading01@3x.png
│ │ ├── loading02.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading02@2x.png
│ │ │ └── loading02@3x.png
│ │ ├── loading03.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading03@2x.png
│ │ │ └── loading03@3x.png
│ │ ├── loading04.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading04@2x.png
│ │ │ └── loading04@3x.png
│ │ ├── loading05.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading05@2x.png
│ │ │ └── loading05@3x.png
│ │ ├── loading06.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading06@2x.png
│ │ │ └── loading06@3x.png
│ │ ├── loading07.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading07@2x.png
│ │ │ └── loading07@3x.png
│ │ ├── loading08.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading08@2x.png
│ │ │ └── loading08@3x.png
│ │ ├── loading09.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading09@2x.png
│ │ │ └── loading09@3x.png
│ │ ├── loading10.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading10@2x.png
│ │ │ └── loading10@3x.png
│ │ ├── loading11.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading11@2x.png
│ │ │ └── loading11@3x.png
│ │ ├── loading12.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading12@2x.png
│ │ │ └── loading12@3x.png
│ │ ├── loading13.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading13@2x.png
│ │ │ └── loading13@3x.png
│ │ ├── loading14.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading14@2x.png
│ │ │ └── loading14@3x.png
│ │ ├── loading15.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading15@2x.png
│ │ │ └── loading15@3x.png
│ │ ├── loading16.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading16@2x.png
│ │ │ └── loading16@3x.png
│ │ ├── loading17.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading17@2x.png
│ │ │ └── loading17@3x.png
│ │ ├── loading18.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading18@2x.png
│ │ │ └── loading18@3x.png
│ │ ├── loading19.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading19@2x.png
│ │ │ └── loading19@3x.png
│ │ ├── loading20.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading20@2x.png
│ │ │ └── loading20@3x.png
│ │ ├── loading21.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading21@2x.png
│ │ │ └── loading21@3x.png
│ │ ├── loading22.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading22@2x.png
│ │ │ └── loading22@3x.png
│ │ ├── loading23.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading23@2x.png
│ │ │ └── loading23@3x.png
│ │ ├── loading24.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading24@2x.png
│ │ │ └── loading24@3x.png
│ │ ├── loading25.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading25@2x.png
│ │ │ └── loading25@3x.png
│ │ ├── loading26.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading26@2x.png
│ │ │ └── loading26@3x.png
│ │ ├── loading27.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading27@2x.png
│ │ │ └── loading27@3x.png
│ │ ├── loading28.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading28@2x.png
│ │ │ └── loading28@3x.png
│ │ └── loading29.imageset
│ │ │ ├── Contents.json
│ │ │ ├── loading29@2x.png
│ │ │ └── loading29@3x.png
│ ├── tab
│ │ ├── Contents.json
│ │ ├── favor.imageset
│ │ │ ├── Contents.json
│ │ │ ├── favor.png
│ │ │ └── favor@2x.png
│ │ ├── favor_1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── favor_1.png
│ │ │ └── favor_1@2x.png
│ │ ├── find.imageset
│ │ │ ├── Contents.json
│ │ │ ├── find.png
│ │ │ └── find@2x.png
│ │ ├── find_1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── find_1.png
│ │ │ └── find_1@2x.png
│ │ ├── home.imageset
│ │ │ ├── Contents.json
│ │ │ ├── home.png
│ │ │ └── home@2x.png
│ │ ├── home_1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── home_1.png
│ │ │ └── home_1@2x.png
│ │ ├── me.imageset
│ │ │ ├── Contents.json
│ │ │ ├── me.png
│ │ │ └── me@2x.png
│ │ ├── me_1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── me_1.png
│ │ │ └── me_1@2x.png
│ │ ├── message.imageset
│ │ │ ├── Contents.json
│ │ │ ├── message.png
│ │ │ └── message@2x.png
│ │ ├── message_1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── message_1.png
│ │ │ └── message_1@2x.png
│ │ ├── photo_verybig.imageset
│ │ │ ├── Contents.json
│ │ │ ├── photo_verybig.png
│ │ │ └── photo_verybig@2x.png
│ │ ├── photo_verybig_1.imageset
│ │ │ ├── Contents.json
│ │ │ ├── photo_verybig_1.png
│ │ │ └── photo_verybig_1@2x.png
│ │ ├── tips.imageset
│ │ │ ├── Contents.json
│ │ │ └── tips@2x.png
│ │ └── tips2.imageset
│ │ │ ├── Contents.json
│ │ │ └── tips2@2x.png
│ └── thumb.imageset
│ │ ├── Contents.json
│ │ └── thumb.jpg
├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
├── Info.plist
├── MainViewController.swift
├── ViewController.swift
└── demo
│ ├── baseui
│ ├── atuolayout
│ │ └── AutoLayoutController.swift
│ ├── baseconfig
│ │ ├── AppNameMultiLanguageViewController.swift
│ │ ├── BaseFunctionListController.swift
│ │ └── MultiLanguageViewController.swift
│ ├── commonHeaderview
│ │ └── ScaleHeaderView.swift
│ ├── commoncell
│ │ ├── CommonTableViewCell.swift
│ │ └── CommonUICollectionViewCell.swift
│ └── commonview
│ │ ├── tableview
│ │ ├── AutoCalHeightController.swift
│ │ ├── DeleteController.swift
│ │ ├── TableViewViewListController.swift
│ │ ├── category
│ │ │ ├── CategoryController.swift
│ │ │ └── cell
│ │ │ │ └── CategoryCell.swift
│ │ ├── driver
│ │ │ ├── CustomDriverController.swift
│ │ │ └── cell
│ │ │ │ └── CustomDriverCell.swift
│ │ ├── expanablelist
│ │ │ ├── ExpandableListController.swift
│ │ │ └── cell
│ │ │ │ ├── ExpanableListCell1.swift
│ │ │ │ ├── ExpanableListCell2.swift
│ │ │ │ └── ExpanableListCell3.swift
│ │ ├── mutilelayout
│ │ │ ├── MutileLayoutController.swift
│ │ │ ├── PictureCell.swift
│ │ │ └── TextCell.swift
│ │ ├── scaleheader
│ │ │ └── TableViewScaleHeaderController.swift
│ │ └── selection
│ │ │ ├── SelectionHeader.swift
│ │ │ └── SelectionHeaderController.swift
│ │ └── uicollectionview
│ │ ├── CommonUICollectionViewController.swift
│ │ ├── ScrollListController.swift
│ │ ├── ScrollViewHeaderViewController.swift
│ │ └── UICollectionViewHeadrController.swift
│ ├── data
│ ├── DataManagerViewController.swift
│ ├── File
│ │ └── FileUseControllerView.swift
│ ├── http
│ │ ├── download
│ │ │ ├── DownLoadRequestViewController.swift
│ │ │ └── DownloadCell.swift
│ │ └── normal
│ │ │ ├── ContentInfo.swift
│ │ │ ├── NormalHttpRequestViewController.swift
│ │ │ ├── ShowCell.swift
│ │ │ └── common
│ │ │ └── Result.swift
│ ├── sqlite
│ │ ├── SQLiteUseControllerView.swift
│ │ └── SqliteData.swift
│ └── userDefaults
│ │ ├── UserDeBean.swift
│ │ └── UsersDefaultsSaveController.swift
│ ├── dataShowView
│ ├── DataShowViewController.swift
│ ├── DataShowViewDemoViewController.swift
│ ├── custom
│ │ ├── CustomDataShowVIewController.swift
│ │ └── CustomDataShowView.swift
│ └── default
│ │ ├── DefaultLoadingViewController.swift
│ │ ├── DefaultNoDataViewController.swift
│ │ └── DefaultNoNetWorkViewController.swift
│ ├── dialog
│ ├── CustomAlertDialog.swift
│ ├── CustomLoadingDialog.swift
│ └── DialogViewController.swift
│ ├── en.lproj
│ └── ProjectStr.strings
│ ├── imageLoader
│ └── ImageLoaderViewController.swift
│ ├── mvp
│ ├── MVPUseControllerView.swift
│ └── presenter
│ │ └── MvpPresenter.swift
│ ├── nav
│ ├── NavShowViewController.swift
│ └── cell
│ │ ├── NavigationViewSliderCell.swift
│ │ └── NavigationViewSwitchCell.swift
│ ├── pagemenu
│ ├── ChildPageViewController.swift
│ └── PageMenuController.swift
│ ├── pageview
│ ├── PageViewController.swift
│ └── cell
│ │ ├── CumstonPageViewCell.swift
│ │ └── PageViewItemSliderCell.swift
│ ├── refresh
│ ├── RefreshListViewController.swift
│ ├── custom
│ │ ├── CumstonRefreshFooterAnimator.swift
│ │ ├── CumstonRefreshHeaderAnimator.swift
│ │ └── CumstonRefreshViewController.swift
│ └── default
│ │ └── DefaultRefreshViewController.swift
│ ├── resoure
│ ├── en.lproj
│ │ ├── InfoPlist.strings
│ │ └── Localizable.strings
│ ├── zh-HK.lproj
│ │ ├── InfoPlist.strings
│ │ └── Localizable.strings
│ └── zh-Hans.lproj
│ │ ├── InfoPlist.strings
│ │ └── Localizable.strings
│ ├── tabbar
│ ├── TabBarListController.swift
│ ├── animation
│ │ ├── TabBarBgBouncesController.swift
│ │ ├── TabBarBgChangeAnimationController.swift
│ │ ├── TabBarBgHightlightController.swift
│ │ ├── TabBarRemindUseClickController.swift
│ │ └── TabBarSpringAnimationController.swift
│ ├── basic
│ │ ├── BasicCommonTabBar.swift
│ │ ├── TabBarCumstomColorController.swift
│ │ ├── TabBarDefaultIndexController.swift
│ │ ├── TabBarIrregularityController.swift
│ │ └── TabBarWithNavigationBarController.swift
│ ├── content
│ │ ├── CommonWithNavController.swift
│ │ └── CommonWithoutNavController.swift
│ ├── cumstom
│ │ ├── CumstonBounceController.swift
│ │ └── CumstonSettingItemView.swift
│ └── remind
│ │ └── TabBarDefaultRemindController.swift
│ └── tagview
│ └── TagViewControllerView.swift
├── CollectionLibrarySwiftTests
└── Info.plist
├── CollectionLibrarySwiftUITests
├── CollectionLibrarySwiftUITests.swift
└── Info.plist
├── LICENSE
├── README.md
└── collectionlibrary
├── CollectionLibrarySwift-Bridging-Header.h
├── async
└── Async.swift
├── autolayout
└── YYAutoLayout.swift
├── base
└── AutoHeightUIViewController.swift
├── collectionflow
└── CommonCollectionViewLayout.swift
├── customtableview
├── YYExpandTreeCellItem.swift
├── YYTableViewCell.swift
├── YYTableViewItem.swift
├── YYTableViewManager.swift
└── YYTableViewSection.swift
├── data
├── DataManager.swift
├── DataResult.swift
├── http
│ ├── base
│ │ ├── AFError.swift
│ │ ├── DispatchQueue+Alamofire.swift
│ │ ├── HttpBaseResult.swift
│ │ ├── MultipartFormData.swift
│ │ ├── NetworkReachabilityManager.swift
│ │ ├── Notifications.swift
│ │ ├── ParameterEncoding.swift
│ │ ├── Request.swift
│ │ ├── Response.swift
│ │ ├── ResponseSerialization.swift
│ │ ├── ServerTrustPolicy.swift
│ │ ├── SessionDelegate.swift
│ │ ├── SessionManager.swift
│ │ ├── TaskDelegate.swift
│ │ ├── Timeline.swift
│ │ ├── Validation.swift
│ │ └── YYHttpRequestOperator.swift
│ ├── cache
│ │ ├── AsyncStorage.swift
│ │ ├── CacheResult.swift
│ │ ├── DataSerializer.swift
│ │ ├── Date+Extensions.swift
│ │ ├── DiskConfig.swift
│ │ ├── DiskStorage.swift
│ │ ├── Entry.swift
│ │ ├── ExpirationMode.swift
│ │ ├── Expiry.swift
│ │ ├── HybridStorage.swift
│ │ ├── ImageWrapper.swift
│ │ ├── JSONArrayWrapper.swift
│ │ ├── JSONDecoder+Extensions.swift
│ │ ├── JSONDictionaryWrapper.swift
│ │ ├── KeyObservationRegistry.swift
│ │ ├── MD5.swift
│ │ ├── MemoryCapsule.swift
│ │ ├── MemoryConfig.swift
│ │ ├── MemoryStorage.swift
│ │ ├── ObservationToken.swift
│ │ ├── Optional+Extension.swift
│ │ ├── Storage+Transform.swift
│ │ ├── Storage.swift
│ │ ├── StorageAware.swift
│ │ ├── StorageError.swift
│ │ ├── StorageObservationRegistry.swift
│ │ ├── SyncStorage.swift
│ │ ├── Transformer.swift
│ │ ├── TransformerFactory.swift
│ │ ├── TypeWrapper.swift
│ │ ├── Types.swift
│ │ └── UIImage+Extensions.swift
│ ├── convert
│ │ ├── Array+YYConvert.swift
│ │ ├── Convertible.swift
│ │ ├── ConvertibleConfig.swift
│ │ ├── ConvertibleEnum.swift
│ │ ├── Data+YYConvert.swift
│ │ ├── Descriptor
│ │ │ ├── ClassDescriptor.swift
│ │ │ ├── Descriptor.swift
│ │ │ ├── EnumDescriptor.swift
│ │ │ ├── FieldDescriptor.swift
│ │ │ └── StructDescriptor.swift
│ │ ├── Dictionary+YYConvert.swift
│ │ ├── HttpCoding.swift
│ │ ├── JSON.swift
│ │ ├── JSONSerialization+YYConvert.swift
│ │ ├── Metadata.swift
│ │ ├── Model.swift
│ │ ├── NSObject+YYConvert.swift
│ │ ├── Optional+YYConvert.swift
│ │ ├── Pointer+YYConvert.swift
│ │ ├── Property.swift
│ │ ├── String+YYConvert.swift
│ │ ├── TypeProxy.swift
│ │ ├── Values.swift
│ │ ├── YYConvert.swift
│ │ ├── layout
│ │ │ ├── BaseLayout.swift
│ │ │ ├── ClassLayout.swift
│ │ │ ├── EnumLayout.swift
│ │ │ ├── FieldList.swift
│ │ │ ├── FunctionLayout.swift
│ │ │ ├── Layout.swift
│ │ │ ├── ProtocolLayout.swift
│ │ │ ├── StructLayout.swift
│ │ │ └── TupleLayout.swift
│ │ └── type
│ │ │ ├── BaseType.swift
│ │ │ ├── ClassType.swift
│ │ │ ├── EnumType.swift
│ │ │ ├── ForeignClassType.swift
│ │ │ ├── FunctionType.swift
│ │ │ ├── Kind.swift
│ │ │ ├── MetaType.swift
│ │ │ ├── ModelType.swift
│ │ │ ├── ObjCClassType.swift
│ │ │ ├── OptionalType.swift
│ │ │ ├── ProtocolType.swift
│ │ │ ├── StructType.swift
│ │ │ ├── TupleType.swift
│ │ │ └── Type.swift
│ └── provider
│ │ ├── ParamsSerializationJsonTool.swift
│ │ ├── YYHttpCacheManager.swift
│ │ ├── YYHttpValue.swift
│ │ ├── YYNetCacheKey.swift
│ │ ├── download
│ │ ├── HttpDownloadRequestParams.swift
│ │ └── YYHttpDownloadManager.swift
│ │ ├── normal
│ │ ├── HttpRequestParams.swift
│ │ └── YYHttpRequestManager.swift
│ │ └── upload
│ │ ├── HttpUploadRequestParams.swift
│ │ ├── YYHttpUploadManager.swift
│ │ └── YYHttpUploadUtils.swift
└── sqlite
│ ├── Core
│ ├── Blob.swift
│ ├── Connection.swift
│ ├── Errors.swift
│ ├── Statement.swift
│ └── Value.swift
│ ├── Extensions
│ ├── FTS4.swift
│ ├── FTS5.swift
│ └── RTree.swift
│ ├── Foundation.swift
│ ├── Helpers.swift
│ ├── SQLite.h
│ ├── SQLiteObjc.m
│ ├── Typed
│ ├── AggregateFunctions.swift
│ ├── Coding.swift
│ ├── Collation.swift
│ ├── CoreFunctions.swift
│ ├── CustomFunctions.swift
│ ├── DateAndTimeFunctions.swift
│ ├── Expression.swift
│ ├── Operators.swift
│ ├── Query.swift
│ ├── Schema.swift
│ └── Setter.swift
│ ├── fts3_tokenizer.h
│ ├── include
│ └── SQLiteObjc.h
│ └── privoder
│ ├── SQLMirrorModel.swift
│ ├── SQLPropertyModel.swift
│ ├── SQLiteDataBase.swift
│ ├── SQLiteDataBaseTool.swift
│ ├── SQLiteModel.swift
│ └── SQLiteVersionMigrate.swift
├── dataShowView
├── DefaultDataShowViewParams.swift
├── YYDataShowView.swift
└── base
│ └── BaseDataShowContentView.swift
├── dialog
├── YYDialog.swift
├── alert
│ └── YYAlertDialog.swift
├── base
│ ├── BaseDialog.swift
│ └── BaseDialogContentView.swift
├── loading
│ └── YYLoadingDialog.swift
└── toast
│ └── YYToast.swift
├── headerscale
├── UIScrollView+YYStretchyHeaderView.h
├── UIScrollView+YYStretchyHeaderView.m
├── UIView+YYTransplantSubviews.h
├── UIView+YYTransplantSubviews.m
├── YYGeometry.c
├── YYGeometry.h
├── YYStretchyHeaderView+Protected.h
├── YYStretchyHeaderView.h
└── YYStretchyHeaderView.m
├── imageLoader
├── CGImageSourceImageLoader.swift
├── DataType.swift
├── ImageLoader.swift
├── UIImageImageLoader.swift
├── Utilities.swift
└── YYImageCache.swift
├── mvp
├── BasePresenter.swift
└── IBaseControllerView.swift
├── navbar
├── AssociatedKeys.swift
├── BackBarButtonItem.swift
├── Configuration.swift
├── Const.swift
├── NavBarConfig.swift
├── Navigation.swift
├── NavigationUtils.swift
├── Shadow.swift
└── YYNavigationBar.swift
├── pagemenu
├── YYPageMeun.swift
├── YYPageMeunEnum.swift
└── YYPagingViewController.swift
├── pageview
├── YYDefaltPageViewCell.swift
├── YYPageCollectionView.swift
├── YYPageView.swift
├── YYPageViewControl.swift
├── YYPageViewLayout.swift
├── YYPageViewLayoutAttributes.swift
└── YYPageViewTransformer.swift
├── refresh
├── YY.swift
├── YYPullToRefresh.swift
├── YYRefreshAnimator.swift
├── YYRefreshComponent.swift
├── YYRefreshDataManager.swift
├── YYRefreshProtocol.swift
└── defalut
│ ├── YYDefaultRefreshFooterAnimator.swift
│ └── YYDefaultRefreshHeaderAnimator.swift
├── resource
└── Collectionlibrary.bundle
│ ├── collectionlibrary_default_data_show_loading1.png
│ ├── collectionlibrary_default_data_show_loading10.png
│ ├── collectionlibrary_default_data_show_loading11.png
│ ├── collectionlibrary_default_data_show_loading12.png
│ ├── collectionlibrary_default_data_show_loading2.png
│ ├── collectionlibrary_default_data_show_loading3.png
│ ├── collectionlibrary_default_data_show_loading4.png
│ ├── collectionlibrary_default_data_show_loading5.png
│ ├── collectionlibrary_default_data_show_loading6.png
│ ├── collectionlibrary_default_data_show_loading7.png
│ ├── collectionlibrary_default_data_show_loading8.png
│ ├── collectionlibrary_default_data_show_loading9.png
│ ├── collectionlibrary_icon_pull_to_refresh_arrow@2x.png
│ ├── collectionlibrary_nodata.png
│ └── collectionlibrary_nonetwork.png
├── tabbar
├── TabBarBasicParamBuilder.swift
├── TabBarSetting.swift
├── YYTabBar.swift
├── YYTabBarController.swift
├── YYTabBarItem.swift
├── YYTabBarItemBadgeView.swift
├── YYTabBarItemContainer.swift
├── YYTabBarItemContentView.swift
└── basic
│ ├── BasicIrregularityContentView.swift
│ └── BasicTabBarItemContentView.swift
├── tagview
├── YYTagItem.swift
├── YYTagView.swift
└── YYTagViewBuilder.swift
└── utils
├── ColorUtils.swift
├── FileOperationUtils.swift
├── IPhoneUtils.swift
├── InternationalUtils.swift
├── Logger.swift
├── NibLoadable.swift
├── PositionSettingUtils.swift
├── UILabelPadding.swift
└── UILabelUtils.swift
/.gitignore:
--------------------------------------------------------------------------------
1 | *.a
2 | !lib.a
3 | Pods
4 | *.xcuserstate
5 | project.xcworkspace
6 | xcuserdata
7 | UserInterfaceState.xcuserstate
8 | *.podspec
9 | .DS_Store
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/a.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "a.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/a.imageset/a.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/a.imageset/a.jpg
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/b.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "b.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/b.imageset/b.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/b.imageset/b.jpg
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/back_btn.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "btn_back.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "btn_back@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "btn_back@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/back_btn.imageset/btn_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/back_btn.imageset/btn_back.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/back_btn.imageset/btn_back@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/back_btn.imageset/btn_back@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/back_btn.imageset/btn_back@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/back_btn.imageset/btn_back@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/datashowview/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/datashowview/loading_fail.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "loading_fail.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/datashowview/loading_fail.imageset/loading_fail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/datashowview/loading_fail.imageset/loading_fail.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/background_dark.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "background_dark@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/background_dark.imageset/background_dark@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/pageview/background_dark.imageset/background_dark@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/d.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "d.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/d.imageset/d.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/pageview/d.imageset/d.jpg
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/e.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "e.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/e.imageset/e.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/pageview/e.imageset/e.jpg
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/f.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "f.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/f.imageset/f.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/pageview/f.imageset/f.jpg
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/g.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "g.jpg",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/g.imageset/g.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/pageview/g.imageset/g.jpg
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/point.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "point.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/point.imageset/point.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/pageview/point.imageset/point.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/selectpoint.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "selectpoint.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/pageview/selectpoint.imageset/selectpoint.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/pageview/selectpoint.imageset/selectpoint.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qq.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "scale" : "2x"
10 | },
11 | {
12 | "idiom" : "universal",
13 | "filename" : "qq@3x.png",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qq.imageset/qq@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qq.imageset/qq@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading00.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading00@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading00@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading00.imageset/loading00@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading00.imageset/loading00@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading00.imageset/loading00@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading00.imageset/loading00@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading01.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading01@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading01@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading01.imageset/loading01@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading01.imageset/loading01@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading01.imageset/loading01@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading01.imageset/loading01@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading02.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading02@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading02@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading02.imageset/loading02@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading02.imageset/loading02@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading02.imageset/loading02@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading02.imageset/loading02@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading03.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading03@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading03@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading03.imageset/loading03@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading03.imageset/loading03@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading03.imageset/loading03@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading03.imageset/loading03@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading04.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading04@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading04@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading04.imageset/loading04@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading04.imageset/loading04@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading04.imageset/loading04@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading04.imageset/loading04@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading05.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading05@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading05@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading05.imageset/loading05@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading05.imageset/loading05@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading05.imageset/loading05@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading05.imageset/loading05@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading06.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading06@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading06@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading06.imageset/loading06@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading06.imageset/loading06@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading06.imageset/loading06@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading06.imageset/loading06@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading07.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading07@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading07@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading07.imageset/loading07@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading07.imageset/loading07@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading07.imageset/loading07@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading07.imageset/loading07@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading08.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading08@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading08@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading08.imageset/loading08@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading08.imageset/loading08@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading08.imageset/loading08@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading08.imageset/loading08@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading09.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading09@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading09@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading09.imageset/loading09@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading09.imageset/loading09@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading09.imageset/loading09@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading09.imageset/loading09@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading10.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading10@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading10@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading10.imageset/loading10@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading10.imageset/loading10@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading10.imageset/loading10@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading10.imageset/loading10@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading11.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading11@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading11@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading11.imageset/loading11@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading11.imageset/loading11@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading11.imageset/loading11@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading11.imageset/loading11@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading12.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading12@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading12@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading12.imageset/loading12@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading12.imageset/loading12@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading12.imageset/loading12@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading12.imageset/loading12@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading13.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading13@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading13@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading13.imageset/loading13@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading13.imageset/loading13@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading13.imageset/loading13@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading13.imageset/loading13@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading14.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading14@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading14@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading14.imageset/loading14@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading14.imageset/loading14@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading14.imageset/loading14@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading14.imageset/loading14@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading15.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading15@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading15@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading15.imageset/loading15@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading15.imageset/loading15@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading15.imageset/loading15@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading15.imageset/loading15@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading16.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading16@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading16@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading16.imageset/loading16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading16.imageset/loading16@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading16.imageset/loading16@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading16.imageset/loading16@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading17.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading17@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading17@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading17.imageset/loading17@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading17.imageset/loading17@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading17.imageset/loading17@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading17.imageset/loading17@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading18.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading18@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading18@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading18.imageset/loading18@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading18.imageset/loading18@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading18.imageset/loading18@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading18.imageset/loading18@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading19.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading19@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading19@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading19.imageset/loading19@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading19.imageset/loading19@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading19.imageset/loading19@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading19.imageset/loading19@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading20.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading20@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading20@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading20.imageset/loading20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading20.imageset/loading20@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading20.imageset/loading20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading20.imageset/loading20@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading21.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading21@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading21@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading21.imageset/loading21@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading21.imageset/loading21@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading21.imageset/loading21@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading21.imageset/loading21@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading22.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading22@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading22@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading22.imageset/loading22@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading22.imageset/loading22@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading22.imageset/loading22@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading22.imageset/loading22@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading23.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading23@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading23@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading23.imageset/loading23@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading23.imageset/loading23@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading23.imageset/loading23@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading23.imageset/loading23@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading24.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading24@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading24@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading24.imageset/loading24@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading24.imageset/loading24@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading24.imageset/loading24@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading24.imageset/loading24@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading25.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading25@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading25@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading25.imageset/loading25@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading25.imageset/loading25@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading25.imageset/loading25@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading25.imageset/loading25@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading26.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading26@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading26@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading26.imageset/loading26@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading26.imageset/loading26@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading26.imageset/loading26@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading26.imageset/loading26@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading27.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading27@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading27@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading27.imageset/loading27@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading27.imageset/loading27@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading27.imageset/loading27@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading27.imageset/loading27@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading28.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading28@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading28@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading28.imageset/loading28@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading28.imageset/loading28@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading28.imageset/loading28@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading28.imageset/loading28@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading29.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "loading29@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "filename" : "loading29@3x.png",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading29.imageset/loading29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading29.imageset/loading29@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading29.imageset/loading29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/qqvideo/loading29.imageset/loading29@3x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/favor.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "favor.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "favor@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/favor.imageset/favor.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/favor.imageset/favor.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/favor.imageset/favor@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/favor.imageset/favor@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/favor_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "favor_1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "favor_1@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/favor_1.imageset/favor_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/favor_1.imageset/favor_1.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/favor_1.imageset/favor_1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/favor_1.imageset/favor_1@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/find.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "find.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "find@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/find.imageset/find.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/find.imageset/find.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/find.imageset/find@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/find.imageset/find@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/find_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "find_1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "find_1@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/find_1.imageset/find_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/find_1.imageset/find_1.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/find_1.imageset/find_1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/find_1.imageset/find_1@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/home.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "home.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "home@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/home.imageset/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/home.imageset/home.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/home.imageset/home@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/home.imageset/home@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/home_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "home_1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "home_1@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/home_1.imageset/home_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/home_1.imageset/home_1.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/home_1.imageset/home_1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/home_1.imageset/home_1@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/me.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "me.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "me@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/me.imageset/me.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/me.imageset/me.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/me.imageset/me@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/me.imageset/me@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/me_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "me_1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "me_1@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/me_1.imageset/me_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/me_1.imageset/me_1.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/me_1.imageset/me_1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/me_1.imageset/me_1@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/message.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "message.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "message@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/message.imageset/message.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/message.imageset/message.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/message.imageset/message@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/message.imageset/message@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/message_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "message_1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "message_1@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/message_1.imageset/message_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/message_1.imageset/message_1.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/message_1.imageset/message_1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/message_1.imageset/message_1@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/photo_verybig.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "photo_verybig.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "photo_verybig@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/photo_verybig.imageset/photo_verybig.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/photo_verybig.imageset/photo_verybig.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/photo_verybig.imageset/photo_verybig@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/photo_verybig.imageset/photo_verybig@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/photo_verybig_1.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "photo_verybig_1.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "photo_verybig_1@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x"
16 | }
17 | ],
18 | "info" : {
19 | "version" : 1,
20 | "author" : "xcode"
21 | }
22 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/photo_verybig_1.imageset/photo_verybig_1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/photo_verybig_1.imageset/photo_verybig_1.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/photo_verybig_1.imageset/photo_verybig_1@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/photo_verybig_1.imageset/photo_verybig_1@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/tips.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "tips@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/tips.imageset/tips@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/tips.imageset/tips@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/tips2.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x"
6 | },
7 | {
8 | "idiom" : "universal",
9 | "filename" : "tips2@2x.png",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/tab/tips2.imageset/tips2@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/tab/tips2.imageset/tips2@2x.png
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/thumb.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "thumb.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Assets.xcassets/thumb.imageset/thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/CollectionLibrarySwift/Assets.xcassets/thumb.imageset/thumb.jpg
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | zh_CN
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(MARKETING_VERSION)
19 | CFBundleVersion
20 | $(CURRENT_PROJECT_VERSION)
21 | LSRequiresIPhoneOS
22 |
23 | NSAppTransportSecurity
24 |
25 | NSAllowsArbitraryLoads
26 |
27 |
28 | UILaunchStoryboardName
29 | LaunchScreen
30 | UIRequiredDeviceCapabilities
31 |
32 | armv7
33 |
34 | UISupportedInterfaceOrientations
35 |
36 | UIInterfaceOrientationPortrait
37 | UIInterfaceOrientationLandscapeLeft
38 | UIInterfaceOrientationLandscapeRight
39 |
40 | UISupportedInterfaceOrientations~ipad
41 |
42 | UIInterfaceOrientationPortrait
43 | UIInterfaceOrientationPortraitUpsideDown
44 | UIInterfaceOrientationLandscapeLeft
45 | UIInterfaceOrientationLandscapeRight
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/9/18.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //I
8 |
9 | import UIKit
10 |
11 | class ViewController: IBaseViewController {
12 |
13 |
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 |
18 |
19 | navBar.setBackBtnHidden(hidden: true)
20 | navBar.title="导航栏"
21 | navBar.titleColor=UIColor.white
22 | navBar.onRightNavItemClick={(position)->Void in
23 | print("dainji")
24 |
25 | }
26 | navBar.barBackgroundImage=UIImage(named: "bg")
27 | navBar.setRightNavItemBtns(imgs: ["back_btn"], spaceing: 0)
28 | statusBarStyle = .lightContent
29 |
30 | }
31 |
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/baseui/baseconfig/AppNameMultiLanguageViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppNameMultiLanguageViewController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/11/18.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class AppNameMultiLanguageViewController: UIViewController {
12 |
13 |
14 | lazy var tipLanguageLabel:UILabel={
15 | let tipLanguageLabel=UILabel(frame: CGRect(x: 20, y:IPhoneUtils.BAR_HEIGHT, width:UIScreen.main.bounds.width-40 , height: 200))
16 | tipLanguageLabel.numberOfLines=0
17 | tipLanguageLabel.text=InternationalUtils.getInstance.getString("app_name_change_tip")
18 | tipLanguageLabel.lineBreakMode = NSLineBreakMode.byWordWrapping
19 | tipLanguageLabel.font=UIFont.systemFont(ofSize: 15)
20 | tipLanguageLabel.textColor=UIColor.orange
21 |
22 | return tipLanguageLabel
23 | }()
24 |
25 | override func viewDidLoad() {
26 | super.viewDidLoad()
27 | self.view.backgroundColor=UIColor.white
28 | NavigationUtils
29 | .with(controller: self)
30 | .setTitle(title: InternationalUtils.getInstance.getString("app_language_setting"))
31 | .setBackBarButtonItem(style: .image(UIImage(named: "back_btn")),tintColor: UIColor.gray)
32 | .build()
33 |
34 |
35 |
36 | self.view.addSubview(tipLanguageLabel)
37 |
38 | }
39 |
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/baseui/commoncell/CommonUICollectionViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UseUICollectionViewCell.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/11/19.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CommonUICollectionViewCell: UICollectionViewCell {
12 | override init(frame: CGRect) {
13 | super.init(frame: frame)
14 | self.addSubview(titleLab)
15 | }
16 |
17 |
18 | lazy var titleLab:UILabel={
19 | let titleLab=UILabel.init()
20 | titleLab.numberOfLines=0
21 | titleLab.lineBreakMode = NSLineBreakMode.byWordWrapping
22 | titleLab.font=UIFont.systemFont(ofSize: 15)
23 | titleLab.textAlignment = .center
24 |
25 | return titleLab
26 | }()
27 |
28 |
29 | required init?(coder aDecoder: NSCoder) {
30 | super.init(coder: aDecoder)
31 | }
32 |
33 | func setValueForCell(content:String){
34 |
35 | self.titleLab.text=content
36 | self .titleLab.frame=CGRect(x: 10, y: 0, width: self.bounds.size.width-20, height: self.bounds.size.height)
37 | }
38 |
39 | }
40 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/baseui/commonview/tableview/expanablelist/cell/ExpanableListCell1.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExpanableListCell.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/19.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ExpanableListItem1:YYExpandTreeCellItem{
12 |
13 | override init() {
14 | super.init()
15 | cellHeight=40
16 | }
17 | }
18 |
19 | class ExpanableListCell1:YYTableViewCell{
20 |
21 |
22 | lazy var titleLab:UILabel={
23 | let titleLab=UILabel.init()
24 | titleLab.numberOfLines=0
25 | titleLab.lineBreakMode = NSLineBreakMode.byWordWrapping
26 | titleLab.textColor=UIColor.red
27 | titleLab.font=UIFont.systemFont(ofSize: 18)
28 | return titleLab
29 | }()
30 |
31 |
32 |
33 |
34 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
35 | super.init(style: style, reuseIdentifier: reuseIdentifier)
36 | self.contentView.backgroundColor=UIColor.orange
37 | self.contentView.addSubview(titleLab)
38 |
39 |
40 | titleLab
41 | .top(equalTo: contentView.yy_top, constant: 15)
42 | .bottom(equalTo: contentView.yy_bottom, constant: 15)
43 | .left(equalTo: contentView.yy_left, constant: 15)
44 | .right(equalTo: contentView.yy_right, constant: 15)
45 | .build()
46 |
47 | titleLab.text="第一层"
48 |
49 | }
50 |
51 | required init?(coder aDecoder: NSCoder) {
52 | super.init(coder: aDecoder)
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/baseui/commonview/tableview/expanablelist/cell/ExpanableListCell2.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExpanableListCell2.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/19.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ExpanableListItem2:YYExpandTreeCellItem{
12 |
13 | override init() {
14 | super.init()
15 | cellHeight=40
16 | }
17 | }
18 |
19 | class ExpanableListCell2:YYTableViewCell{
20 |
21 |
22 | lazy var titleLab:UILabel={
23 | let titleLab=UILabel.init()
24 | titleLab.numberOfLines=0
25 | titleLab.lineBreakMode = NSLineBreakMode.byWordWrapping
26 | titleLab.textColor=UIColor.white
27 | titleLab.font=UIFont.systemFont(ofSize: 14)
28 | return titleLab
29 | }()
30 |
31 |
32 |
33 |
34 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
35 | super.init(style: style, reuseIdentifier: reuseIdentifier)
36 | self.contentView.backgroundColor=UIColor.green
37 | self.contentView.addSubview(titleLab)
38 |
39 |
40 | titleLab
41 | .top(equalTo: contentView.yy_top, constant: 15)
42 | .bottom(equalTo: contentView.yy_bottom, constant: 15)
43 | .left(equalTo: contentView.yy_left, constant: 15)
44 | .right(equalTo: contentView.yy_right, constant: 15)
45 | .build()
46 |
47 | titleLab.text="第二层"
48 |
49 | }
50 |
51 | required init?(coder aDecoder: NSCoder) {
52 | super.init(coder: aDecoder)
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/baseui/commonview/tableview/expanablelist/cell/ExpanableListCell3.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExpanableListCell3.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/19.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class ExpanableListItem3:YYExpandTreeCellItem{
12 |
13 | override init() {
14 | super.init()
15 | cellHeight=40
16 | }
17 | }
18 |
19 | class ExpanableListCell3:YYTableViewCell{
20 |
21 |
22 | lazy var titleLab:UILabel={
23 | let titleLab=UILabel.init()
24 | titleLab.numberOfLines=0
25 | titleLab.lineBreakMode = NSLineBreakMode.byWordWrapping
26 | titleLab.textColor=UIColor.gray
27 | titleLab.font=UIFont.systemFont(ofSize: 12)
28 | return titleLab
29 | }()
30 |
31 |
32 |
33 |
34 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
35 | super.init(style: style, reuseIdentifier: reuseIdentifier)
36 | self.contentView.backgroundColor=UIColor.blue
37 | self.contentView.addSubview(titleLab)
38 |
39 |
40 | titleLab
41 | .top(equalTo: contentView.yy_top, constant: 15)
42 | .bottom(equalTo: contentView.yy_bottom, constant: 15)
43 | .left(equalTo: contentView.yy_left, constant: 15)
44 | .right(equalTo: contentView.yy_right, constant: 15)
45 | .build()
46 |
47 | titleLab.text="第三层"
48 |
49 | }
50 |
51 | required init?(coder aDecoder: NSCoder) {
52 | super.init(coder: aDecoder)
53 | }
54 | }
55 |
56 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/baseui/commonview/tableview/mutilelayout/TextCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TextCell.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/21.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TextItem:YYTableViewItem{
12 |
13 | var content:String!
14 |
15 | }
16 |
17 |
18 | class TextCell:YYTableViewCell{
19 |
20 | lazy var titleLab:UILabel={
21 | let titleLab=UILabel.init()
22 | titleLab.numberOfLines=0
23 | titleLab.lineBreakMode = NSLineBreakMode.byWordWrapping
24 | titleLab.textAlignment = .center
25 | titleLab.font=UIFont.systemFont(ofSize: 15)
26 | return titleLab
27 | }()
28 |
29 |
30 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
31 | super.init(style: style, reuseIdentifier: reuseIdentifier)
32 | self.contentView.addSubview(titleLab)
33 |
34 |
35 | titleLab
36 | .top(equalTo: contentView.yy_top, constant: 10)
37 | .bottom(equalTo: contentView.yy_bottom, constant: 10)
38 | .left(equalTo: contentView.yy_left, constant: 10)
39 | .right(equalTo: contentView.yy_right, constant: 10)
40 | .build()
41 |
42 | }
43 |
44 | required init?(coder aDecoder: NSCoder) {
45 | super.init(coder: aDecoder)
46 | }
47 |
48 | override func cellWillAppear() {
49 |
50 | let item = self.item as! TextItem
51 | titleLab.text=item.content
52 | }
53 |
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/baseui/commonview/tableview/selection/SelectionHeader.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SelectionHeader.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/19.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class SelectionHeader:UIView{
12 |
13 | lazy var titleLab:UILabel={
14 | let titleLab=UILabel.init()
15 | titleLab.numberOfLines=0
16 | titleLab.lineBreakMode = NSLineBreakMode.byWordWrapping
17 | titleLab.font=UIFont.systemFont(ofSize: 15)
18 | return titleLab
19 | }()
20 |
21 | override init(frame: CGRect) {
22 | super.init(frame: frame)
23 | self.backgroundColor=UIColor.colorWithHexString("#D2D3D5")
24 | self.addSubview(titleLab)
25 |
26 | titleLab
27 | .top(equalTo: self.yy_top, constant: 10)
28 | .bottom(equalTo: self.yy_bottom, constant: 10)
29 | .left(equalTo: self.yy_left, constant: 10)
30 | .right(equalTo: self.yy_right, constant: 10)
31 | .build()
32 | }
33 |
34 |
35 | required init?(coder: NSCoder) {
36 | super.init(coder: coder)
37 | }
38 |
39 |
40 | func setContent(con:String){
41 | titleLab.text=con
42 | }
43 |
44 |
45 |
46 | }
47 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/baseui/commonview/tableview/selection/SelectionHeaderController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SelectionHeaderController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/19.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class SelectionHeaderController:UIViewController{
12 |
13 | var tableView: UITableView!
14 | var manager: YYTableViewManager!
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 |
19 | NavigationUtils
20 | .with(controller: self)
21 | .setBackBarButtonItem(style: .image(UIImage(named: "back_btn")),tintColor: UIColor.gray)
22 | .setTitle(title: InternationalUtils.getInstance.getString("tableview_selection"))
23 | .build()
24 |
25 |
26 |
27 | tableView = UITableView(frame: view.bounds, style: .grouped)
28 | view.addSubview(tableView)
29 |
30 |
31 | manager = YYTableViewManager(tableView: tableView)
32 | for i in 0 ... 8 {
33 | let headerView:SelectionHeader=SelectionHeader.init(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 40))
34 |
35 | headerView.setContent(con: "Header " + String(i))
36 | let section = YYTableViewSection.init(headerView: headerView)
37 | manager.add(section: section)
38 |
39 |
40 | for j in 0 ... 4 {
41 | section.add(item: YYTableViewItem(title: "Header " + String(i) + " Row " + String(j)))
42 | }
43 | }
44 |
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/data/http/normal/ContentInfo.swift:
--------------------------------------------------------------------------------
1 | //
2 | // File.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class ContentInfo:YYTableViewItem,Convertible{
12 |
13 | var sid:String=""
14 | var text:String=""
15 | var type:String=""
16 | var thumbnail:String=""
17 | var video:String=""
18 | var images:String=""
19 | var up:String=""
20 | var down:String=""
21 | var forward:String=""
22 | var comment:String=""
23 | var uid:String=""
24 | var name:String=""
25 | var header:String=""
26 | var top_comments_content:String=""
27 | var top_comments_voiceuri:String=""
28 | var top_comments_uid:String=""
29 | var top_comments_name:String=""
30 | var top_comments_header:String=""
31 | var passtime:String=""
32 |
33 |
34 | required override init(){
35 | super.init()
36 | cellHeight=80
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/data/http/normal/common/Result.swift:
--------------------------------------------------------------------------------
1 | //
2 | // result.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/3.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class Result:Convertible{
12 |
13 | var code:Int=0
14 | var message:String=""
15 | var result:T?=nil
16 |
17 | required init() {
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/data/sqlite/SqliteData.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SqliteData.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/13.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | @objcMembers
12 | class SqliteData: SQLiteModel,Convertible{
13 |
14 |
15 | var des:String=""
16 | var id:Int=0
17 |
18 | override func primaryKey() -> String {
19 | return "id"
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/data/userDefaults/UserDeBean.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UserDeBean.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/14.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class UserDeBean:Convertible{
12 | var name:String=""
13 | var age:Int=0
14 |
15 | required init() {
16 |
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/dataShowView/custom/CustomDataShowVIewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CustomDataShowVIewController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/6.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class CustomDataShowVIewController:UIViewController{
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 | self.view.backgroundColor=UIColor.white
17 |
18 | NavigationUtils
19 | .with(controller: self)
20 | .setBackBarButtonItem(style: .image(UIImage(named: "back_btn")),tintColor: UIColor.gray)
21 | .setTitle(title:"自定义加载显示样式")
22 | .build()
23 |
24 | let customView=CustomDataShowView()
25 | YYDataShowView.init(custom: customView,aboveView: navigation.bar).show(parentView: self)
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/dataShowView/default/DefaultLoadingViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DefaultLoadingViewController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/6.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class DefaultLoadingViewController:UIViewController{
12 | var dataShowView:YYDataShowView?
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | self.view.backgroundColor=UIColor.white
18 |
19 | NavigationUtils
20 | .with(controller: self)
21 | .setBackBarButtonItem(style: .image(UIImage(named: "back_btn")),tintColor: UIColor.gray)
22 | .setTitle(title:"默认加载数据显示样式(可根据需要修改对应参数)")
23 | .build()
24 |
25 |
26 | let defaultDataShowViewParams=DefaultDataShowViewParams()
27 | defaultDataShowViewParams
28 | .setDefaultDataShowViewType(showViewType: .loading)
29 | .build()
30 |
31 | dataShowView=YYDataShowView(defaultDataShowViewParams: defaultDataShowViewParams,aboveView: navigation.bar)
32 |
33 | dataShowView!.show(parentView: self)
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/dataShowView/default/DefaultNoDataViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DefaultNoDataViewController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/5.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class DefaultNoDataViewController:UIViewController{
12 |
13 | var dataShowView:YYDataShowView?
14 |
15 | override func viewDidLoad() {
16 | super.viewDidLoad()
17 |
18 | self.view.backgroundColor=UIColor.white
19 |
20 | NavigationUtils
21 | .with(controller: self)
22 | .setBackBarButtonItem(style: .image(UIImage(named: "back_btn")),tintColor: UIColor.gray)
23 | .setTitle(title:"默认没有数据加载显示样式(可根据需要修改对应参数)")
24 | .build()
25 |
26 |
27 | dataShowView=YYDataShowView(defaultDataShowViewParams:DefaultDataShowViewParams(),aboveView: navigation.bar,reloadHandler: {
28 | YYDialog.createToast().show(view: self.view, text: "点击重新加载按钮")
29 | })
30 |
31 | dataShowView!.show(parentView: self)
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/dataShowView/default/DefaultNoNetWorkViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DefaultNoNetWorkViewController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/5.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | class DefaultNoNetWorkViewController:UIViewController{
12 | var dataShowView:YYDataShowView?
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 | self.view.backgroundColor=UIColor.white
18 |
19 | NavigationUtils
20 | .with(controller: self)
21 | .setBackBarButtonItem(style: .image(UIImage(named: "back_btn")),tintColor: UIColor.gray)
22 | .setTitle(title:"默认没有网络加载显示样式(可根据需要修改对应参数)")
23 | .build()
24 |
25 |
26 | let defaultDataShowViewParams=DefaultDataShowViewParams()
27 | defaultDataShowViewParams
28 | .setDefaultDataShowViewType(showViewType: .noNetWork)
29 | .build()
30 |
31 | dataShowView=YYDataShowView(defaultDataShowViewParams: defaultDataShowViewParams,aboveView: navigation.bar,reloadHandler: {
32 | YYDialog.createToast().show(view: self.view, text: "点击重新加载按钮")
33 | })
34 |
35 | dataShowView!.show(parentView: self)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/en.lproj/ProjectStr.strings:
--------------------------------------------------------------------------------
1 | /*
2 | ProjectStr.strings
3 | CollectionLibrarySwift
4 |
5 | Created by Huatu on 2019/11/12.
6 | Copyright © 2019 YoungManSter. All rights reserved.
7 | */
8 |
9 | "Welcome" = "Welcome to hangge.com";
10 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/mvp/presenter/MvpPresenter.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MvpPresenter.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 |
12 | protocol MvpView {
13 | func refreshUI(value:Result>)
14 | }
15 |
16 | class MvpPresenter:BasePresenter{
17 |
18 | func requestData() {
19 |
20 | let urlStr = "https://api.apiopen.top/getJoke?page=1&count=20&type=video"
21 |
22 | let httpParams:HttpRequestParams=HttpRequestParams()
23 | httpParams
24 | .setRequestType(requestType: .reqStringUrl)
25 | .setReqUrl(requestUrl: urlStr)
26 | .setReponseType(responseType: .netWork)
27 | .setHttpTypeAndReqParamType(httpTypeAndReqParamType: .get)
28 | .build()
29 |
30 | DataManager.DataForHttp.HttpOfNormal.Request>>.request(httpRequestParams: httpParams, requestSuccessResult: {
31 | value in
32 |
33 |
34 | (self.mView as! MVPUseControllerView).refreshUI(value: value)
35 |
36 | }, requestFailureResult: {
37 | error in
38 | })
39 |
40 |
41 | }
42 |
43 |
44 |
45 | }
46 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/pageview/cell/CumstonPageViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CumstonPageViewCell.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/30.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CumstonPageViewCell:UICollectionViewCell{
12 |
13 | open var imageView: UIImageView {
14 |
15 | let imageView = UIImageView(frame:CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 500))
16 | self.contentView.addSubview(imageView)
17 | return imageView
18 | }
19 |
20 | public override init(frame: CGRect) {
21 | super.init(frame: frame)
22 |
23 | self.addSubview(imageView)
24 | }
25 |
26 | public required init?(coder aDecoder: NSCoder) {
27 | super.init(coder: aDecoder)
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/resoure/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /*
2 | InfoPlist.strings
3 | CollectionLibrarySwift
4 |
5 | Created by Huatu on 2019/11/18.
6 | Copyright © 2019 YoungManSter. All rights reserved.
7 | */
8 |
9 |
10 | CFBundleDisplayName = "CollectionLibrary";
11 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/resoure/zh-HK.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /*
2 | InfoPlist.strings
3 | CollectionLibrarySwift
4 |
5 | Created by Huatu on 2019/11/18.
6 | Copyright © 2019 YoungManSter. All rights reserved.
7 | */
8 |
9 |
10 | CFBundleDisplayName = "快速搭建項目合集";
11 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/resoure/zh-Hans.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /*
2 | InfoPlist.strings
3 | CollectionLibrarySwift
4 |
5 | Created by Huatu on 2019/11/18.
6 | Copyright © 2019 YoungManSter. All rights reserved.
7 | */
8 |
9 |
10 | CFBundleDisplayName = "快速搭建项目合集";
11 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/tabbar/animation/TabBarBgBouncesController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TabBarBgBouncesController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/29.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TabBarBgBouncesController:YYTabBarController{
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 |
15 |
16 | let normalImgs=["home","find","favor","message","me"]
17 | let selectImgs=["home_1","find_1","favor_1","message_1","me_1"]
18 | let titles=["首页","搜索","收藏","消息","我的"]
19 | let chidVC=[CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController()]
20 |
21 |
22 | let builder:TabBarBasicParamBuilder=TabBarBasicParamBuilder
23 | .with(childVCs: chidVC, normalImgs: normalImgs, selectImgs: selectImgs, titles: titles)
24 | .defultStyle()
25 | .backgroundColorWithoutTitlesAnimationStyle()
26 | .setSwithcBouncesAnimation(switchBgAnimation: true)
27 | .retunDefaultStyle()
28 | .build()
29 |
30 |
31 | let _:TabBarSetting=TabBarSetting(vc:self,tabBarBuilder: builder)
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/tabbar/animation/TabBarBgChangeAnimationController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TabBarBgChangeAnimationController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/29.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TabBarBgChangeAnimationController:YYTabBarController{
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 |
17 | let normalImgs=["home","find","favor","message","me"]
18 | let selectImgs=["home_1","find_1","favor_1","message_1","me_1"]
19 | let titles=["首页","搜索","收藏","消息","我的"]
20 | let chidVC=[CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController()]
21 |
22 |
23 | let builder:TabBarBasicParamBuilder=TabBarBasicParamBuilder
24 | .with(childVCs: chidVC, normalImgs: normalImgs, selectImgs: selectImgs, titles: titles)
25 | .defultStyle()
26 | .backgroundColorWithoutTitlesAnimationStyle()
27 | .retunDefaultStyle()
28 | .build()
29 |
30 |
31 | let _:TabBarSetting=TabBarSetting(vc:self,tabBarBuilder: builder)
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/tabbar/animation/TabBarBgHightlightController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TabBarBgHightlightController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/29.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TabBarBgHightlightController:YYTabBarController{
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 |
15 |
16 | let normalImgs=["home","find","favor","message","me"]
17 | let selectImgs=["home_1","find_1","favor_1","message_1","me_1"]
18 | let titles=["首页","搜索","收藏","消息","我的"]
19 | let chidVC=[CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController()]
20 |
21 |
22 | let builder:TabBarBasicParamBuilder=TabBarBasicParamBuilder
23 | .with(childVCs: chidVC, normalImgs: normalImgs, selectImgs: selectImgs, titles: titles)
24 | .defultStyle()
25 | .backgroundColorWithoutTitlesAnimationStyle()
26 | .setSwithcBouncesAnimation(switchBgAnimation: true)
27 | .setSpecialIndexAndColor(bgColorIndex: 2)
28 | .retunDefaultStyle()
29 | .build()
30 |
31 |
32 | let _:TabBarSetting=TabBarSetting(vc:self,tabBarBuilder: builder)
33 |
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/tabbar/animation/TabBarRemindUseClickController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TabBarRemindUseClickController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/29.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TabBarRemindUseClickController:YYTabBarController{
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 |
17 | let normalImgs=["home","find","favor","message","me"]
18 | let selectImgs=["home_1","find_1","favor_1","message_1","me_1"]
19 | let titles=["首页","搜索","收藏","消息","我的"]
20 | let chidVC=[CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController()]
21 |
22 |
23 | let builder:TabBarBasicParamBuilder=TabBarBasicParamBuilder
24 | .with(childVCs: chidVC, normalImgs: normalImgs, selectImgs: selectImgs, titles: titles)
25 | .defultStyle()
26 | .backgroundColorWithoutTitlesAnimationStyle()
27 | .setSwithcBouncesAnimation(switchBgAnimation: true)
28 | .setSpecialIndexAndColor(bgColorIndex: 2)
29 | .retunDefaultStyle()
30 | .setRemindUseClickIndex(remindUseClickIndex: 2)
31 | .build()
32 |
33 |
34 | let _:TabBarSetting=TabBarSetting(vc:self,tabBarBuilder: builder)
35 |
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/tabbar/animation/TabBarSpringAnimationController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TabBarSpringAnimationController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/29.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TabBarSpringAnimationController:YYTabBarController{
12 |
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 |
18 | let normalImgs=["home","find","favor","message","me"]
19 | let selectImgs=["home_1","find_1","favor_1","message_1","me_1"]
20 | let titles=["首页","搜索","收藏","消息","我的"]
21 | let chidVC=[CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController()]
22 |
23 |
24 | let builder:TabBarBasicParamBuilder=TabBarBasicParamBuilder
25 | .with(childVCs: chidVC, normalImgs: normalImgs, selectImgs: selectImgs, titles: titles)
26 | .defultStyle()
27 | .bouncesAnimationStyle()
28 | .build()
29 |
30 |
31 | let _:TabBarSetting=TabBarSetting(vc:self,tabBarBuilder: builder)
32 |
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/tabbar/basic/BasicCommonTabBar.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TestController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/24.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class BasicCommonTabBar:YYTabBarController{
12 |
13 |
14 | override func viewDidLoad() {
15 | super.viewDidLoad()
16 |
17 |
18 | let normalImgs=["home","find","favor","message","me"]
19 | let selectImgs=["home_1","find_1","favor_1","message_1","me_1"]
20 | let titles=["首页","搜索","收藏","消息","我的"]
21 | let chidVC=[CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController()]
22 |
23 |
24 | let builder:TabBarBasicParamBuilder=TabBarBasicParamBuilder
25 | .with(childVCs: chidVC, normalImgs: normalImgs, selectImgs: selectImgs, titles: titles)
26 | .defultStyle()
27 | .build()
28 |
29 |
30 | let _:TabBarSetting=TabBarSetting(vc:self,tabBarBuilder: builder)
31 |
32 | }
33 |
34 |
35 |
36 | }
37 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/tabbar/basic/TabBarCumstomColorController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TabBarCumstomColorController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/29.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TabBarCumstomColorController:YYTabBarController{
12 | override func viewDidLoad() {
13 | super.viewDidLoad()
14 |
15 |
16 | let normalImgs=["home","find","favor","message","me"]
17 | let selectImgs=["home_1","find_1","favor_1","message_1","me_1"]
18 | let titles=["首页","搜索","收藏","消息","我的"]
19 | let chidVC=[CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController()]
20 |
21 |
22 | let builder:TabBarBasicParamBuilder=TabBarBasicParamBuilder
23 | .with(childVCs: chidVC, normalImgs: normalImgs, selectImgs: selectImgs, titles: titles)
24 | .defultStyle()
25 | .setTextColor(txtColor: UIColor.black)
26 | .setSelectTextColor(selectTxtColor: UIColor.red)
27 | .setImgColor(imageColor: UIColor.black)
28 | .setSelectImgColor(selectImageColor: UIColor.red)
29 | .build()
30 |
31 |
32 | let _:TabBarSetting=TabBarSetting(vc:self,tabBarBuilder: builder)
33 |
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/tabbar/basic/TabBarDefaultIndexController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TabBarDefaultIndexController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/29.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TabBarDefaultIndexController:YYTabBarController{
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 |
17 | let normalImgs=["home","find","favor","message","me"]
18 | let selectImgs=["home_1","find_1","favor_1","message_1","me_1"]
19 | let titles=["首页","搜索","收藏","消息","我的"]
20 | let chidVC=[CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController(),CommonWithoutNavController()]
21 |
22 |
23 | let builder:TabBarBasicParamBuilder=TabBarBasicParamBuilder
24 | .with(childVCs: chidVC, normalImgs: normalImgs, selectImgs: selectImgs, titles: titles)
25 | .defultStyle()
26 | .build()
27 |
28 |
29 | let tabSetting:TabBarSetting=TabBarSetting(vc:self,tabBarBuilder: builder)
30 | tabSetting.setDefaultTabIndex(index: 2)
31 |
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/tabbar/basic/TabBarWithNavigationBarController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TabBarWithNavigationBarController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/29.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class TabBarWithNavigationBarController:YYTabBarController{
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 |
16 |
17 | let normalImgs=["home","find","favor","message","me"]
18 | let selectImgs=["home_1","find_1","favor_1","message_1","me_1"]
19 | let titles=["首页","搜索","收藏","消息","我的"]
20 |
21 |
22 | let chidVC: [UIViewController] = titles.map { _ in
23 | UIViewController.autoHeight=UIScreen.main.bounds.height - self.tabBar.frame.height
24 | let vc: CommonWithNavController = CommonWithNavController()
25 | return vc
26 | }
27 |
28 |
29 | let builder:TabBarBasicParamBuilder=TabBarBasicParamBuilder
30 | .with(childVCs: chidVC, normalImgs: normalImgs, selectImgs: selectImgs, titles: titles)
31 | .defultStyle()
32 | .build()
33 |
34 |
35 | let _:TabBarSetting=TabBarSetting(vc:self,tabBarBuilder: builder)
36 |
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/CollectionLibrarySwift/demo/tabbar/content/CommonWithoutNavController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CommonWithoutNavController.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/29.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class CommonWithoutNavController:UIViewController{
12 | let str="因为你是这个世界上最干净的,最温暖的,最柔软的,我不能用那些通用的所谓聪明来解释你,来对待你,来敷衍你。曾经你是我的理想,可是后来我终于发现,我自己的理想原来不过如此,和所有人的一样没什么了不起,和所有人的一样不堪一击。但是你依然是你,你还在那儿,你绽放着,你比任何一种理想都要有血有肉,都要生机勃勃。"
13 |
14 | lazy var centerLabel:UILabel={
15 | let centerLabel=UILabel.init()
16 | centerLabel.text=str
17 | centerLabel.textAlignment = .center
18 | centerLabel.numberOfLines=0
19 | centerLabel.lineBreakMode = NSLineBreakMode.byWordWrapping
20 | return centerLabel
21 | }()
22 |
23 |
24 | override func viewDidLoad() {
25 | super.viewDidLoad()
26 |
27 | self.view.backgroundColor=UIColor.white
28 |
29 | NavigationUtils
30 | .with(controller: self)
31 | .setHidden(isHidden: true)
32 | .build()
33 |
34 | self.view.addSubview(centerLabel)
35 |
36 | centerLabel
37 | .centerX(equalTo: view.yy_centerX)
38 | .centerY(equalTo: view.yy_centerY)
39 | .width(UIScreen.main.bounds.width-20)
40 | .height(500)
41 | .build()
42 |
43 | }
44 |
45 |
46 |
47 | }
48 |
--------------------------------------------------------------------------------
/CollectionLibrarySwiftTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/CollectionLibrarySwiftUITests/CollectionLibrarySwiftUITests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CollectionLibrarySwiftUITests.swift
3 | // CollectionLibrarySwiftUITests
4 | //
5 | // Created by Huatu on 2019/9/18.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import XCTest
10 |
11 | class CollectionLibrarySwiftUITests: XCTestCase {
12 |
13 | override func setUp() {
14 | // Put setup code here. This method is called before the invocation of each test method in the class.
15 |
16 | // In UI tests it is usually best to stop immediately when a failure occurs.
17 | continueAfterFailure = false
18 |
19 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
20 | XCUIApplication().launch()
21 |
22 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
23 | }
24 |
25 | override func tearDown() {
26 | // Put teardown code here. This method is called after the invocation of each test method in the class.
27 | }
28 |
29 | func testExample() {
30 | // Use recording to get started writing UI tests.
31 | // Use XCTAssert and related functions to verify your tests produce the correct results.
32 | }
33 |
34 | }
35 |
--------------------------------------------------------------------------------
/CollectionLibrarySwiftUITests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/LICENSE
--------------------------------------------------------------------------------
/collectionlibrary/CollectionLibrarySwift-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // CollectionLibrarySwift-Bridging-Header.h
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/4.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 |
8 |
9 | #import "YYStretchyHeaderView.h"
10 | #import "YYGeometry.h"
11 | #import "UIView+YYTransplantSubviews.h"
12 | #import "YYStretchyHeaderView+Protected.h"
13 | #import "UIScrollView+YYStretchyHeaderView.h"
14 | #import "SQLite.h"
15 | #import "fts3_tokenizer.h"
16 |
--------------------------------------------------------------------------------
/collectionlibrary/base/AutoHeightUIViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AutoViewHeight.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/4.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class AutoHeightUIViewController:UIViewController{
12 |
13 | public var height:CGFloat?
14 |
15 | public override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
16 | super.init(nibName: nil, bundle: nil)
17 | height=UIViewController.autoHeight
18 | UIViewController.autoHeight=UIScreen.main.bounds.height
19 | }
20 |
21 | required public init?(coder: NSCoder) {
22 | fatalError("init(coder:) has not been implemented")
23 | }
24 |
25 | override open func viewDidLoad() {
26 | self.view.frame=CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: height!)
27 |
28 | super.viewDidLoad()
29 | }
30 |
31 | }
32 |
33 |
34 | extension UIViewController{
35 | public static var autoHeight:CGFloat=UIScreen.main.bounds.height
36 | }
37 |
--------------------------------------------------------------------------------
/collectionlibrary/customtableview/YYTableViewCell.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YYTableViewCell.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/18.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | open class YYTableViewCell: UITableViewCell {
12 | public var item: YYTableViewItem!
13 |
14 | open override func awakeFromNib() {
15 | super.awakeFromNib()
16 | // Initialization code
17 | }
18 |
19 | open func cellWillAppear() {
20 |
21 | }
22 |
23 | open func cellDidAppear() {
24 | let item = self.item as YYTableViewItem
25 | if item.isHideSeparator {
26 | separatorInset = UIEdgeInsets(top: 0, left: 15, bottom: 0, right: bounds.size.width - 15)
27 | } else {
28 | separatorInset = UIEdgeInsets(top: 0, left: item.separatorLeftMargin, bottom: 0, right: 0)
29 | }
30 | }
31 |
32 | open func cellDidDisappear() {}
33 |
34 | open override func setSelected(_ selected: Bool, animated: Bool) {
35 | super.setSelected(selected, animated: animated)
36 |
37 | // Configure the view for the selected state
38 | }
39 |
40 |
41 | open func setCustomLineView(_ width: CGFloat,_ height:CGFloat) -> UIView?{
42 | return nil
43 | }
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/collectionlibrary/data/DataResult.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DataResult.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | open class DataResult:Convertible{
12 | public var result:T?=nil
13 |
14 | public required init() {
15 |
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/base/DispatchQueue+Alamofire.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DispatchQueue+Alamofire.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Dispatch
10 | import Foundation
11 |
12 | extension DispatchQueue {
13 | static var userInteractive: DispatchQueue { return DispatchQueue.global(qos: .userInteractive) }
14 | static var userInitiated: DispatchQueue { return DispatchQueue.global(qos: .userInitiated) }
15 | static var utility: DispatchQueue { return DispatchQueue.global(qos: .utility) }
16 | static var background: DispatchQueue { return DispatchQueue.global(qos: .background) }
17 |
18 | func after(_ delay: TimeInterval, execute closure: @escaping () -> Void) {
19 | asyncAfter(deadline: .now() + delay, execute: closure)
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/CacheResult.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Result.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// Used for callback in async operations.
12 | public enum CacheResult {
13 | case value(T)
14 | case error(Error)
15 |
16 | public func map(_ transform: (T) -> U) -> CacheResult {
17 | switch self {
18 | case .value(let value):
19 | return CacheResult.value(transform(value))
20 | case .error(let error):
21 | return CacheResult.error(error)
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/DataSerializer.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DataSerializer.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// Convert to and from data
12 | class DataSerializer {
13 |
14 | /// Convert object to data
15 | ///
16 | /// - Parameter object: The object to convert
17 | /// - Returns: Data
18 | /// - Throws: Encoder error if any
19 | static func serialize(object: T) throws -> Data {
20 | let encoder = JSONEncoder()
21 | return try encoder.encode(object)
22 | }
23 |
24 | /// Convert data to object
25 | ///
26 | /// - Parameter data: The data to convert
27 | /// - Returns: The object
28 | /// - Throws: Decoder error if any
29 | static func deserialize(data: Data) throws -> T {
30 | let decoder = JSONDecoder()
31 | return try decoder.decode(T.self, from: data)
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/Date+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Date+Extensions.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /**
12 | Helper NSDate extension.
13 | */
14 | extension Date {
15 |
16 | /// Checks if the date is in the past.
17 | var inThePast: Bool {
18 | return timeIntervalSinceNow < 0
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/DiskConfig.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DiskConfig.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public struct DiskConfig {
12 | /// The name of disk storage, this will be used as folder name within directory
13 | public let name: String
14 | /// Expiry date that will be applied by default for every added object
15 | /// if it's not overridden in the add(key: object: expiry: completion:) method
16 | public let expiry: Expiry
17 | /// Maximum size of the disk cache storage (in bytes)
18 | public let maxSize: UInt
19 | /// A folder to store the disk cache contents. Defaults to a prefixed directory in Caches if nil
20 | public let directory: URL?
21 | #if os(iOS) || os(tvOS)
22 | /// Data protection is used to store files in an encrypted format on disk and to decrypt them on demand.
23 | /// Support only on iOS and tvOS.
24 | public let protectionType: FileProtectionType?
25 |
26 | public init(name: String, expiry: Expiry = .never,
27 | maxSize: UInt = 0, directory: URL? = nil,
28 | protectionType: FileProtectionType? = nil) {
29 | self.name = name
30 | self.expiry = expiry
31 | self.maxSize = maxSize
32 | self.directory = directory
33 | self.protectionType = protectionType
34 | }
35 | #else
36 | public init(name: String, expiry: Expiry = .never,
37 | maxSize: UInt = 0, directory: URL? = nil) {
38 | self.name = name
39 | self.expiry = expiry
40 | self.maxSize = maxSize
41 | self.directory = directory
42 | }
43 | #endif
44 | }
45 |
46 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/Entry.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Entry.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// A wrapper around cached object and its expiry date.
12 | public struct Entry {
13 | /// Cached object
14 | public let object: T
15 | /// Expiry date
16 | public let expiry: Expiry
17 | /// File path to the cached object
18 | public let filePath: String?
19 |
20 | init(object: T, expiry: Expiry, filePath: String? = nil) {
21 | self.object = object
22 | self.expiry = expiry
23 | self.filePath = filePath
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/ExpirationMode.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ExpirationMode.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | public enum ExpirationMode {
10 | case auto, manual
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/Expiry.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Expiry.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /**
12 | Helper enum to set the expiration date
13 | */
14 | public enum Expiry {
15 | /// Object will be expired in the nearest future
16 | case never
17 | /// Object will be expired in the specified amount of seconds
18 | case seconds(TimeInterval)
19 | /// Object will be expired on the specified date
20 | case date(Date)
21 |
22 | /// Returns the appropriate date object
23 | public var date: Date {
24 | switch self {
25 | case .never:
26 | return Date(timeIntervalSince1970: 60 * 60 * 24 * 365 * 68)
27 | case .seconds(let seconds):
28 | return Date().addingTimeInterval(seconds)
29 | case .date(let date):
30 | return date
31 | }
32 | }
33 |
34 | /// Checks if cached object is expired according to expiration date
35 | public var isExpired: Bool {
36 | return date.inThePast
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/ImageWrapper.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ImageWrapper.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public struct ImageWrapper: Codable {
12 | public let image: Image
13 |
14 | public enum CodingKeys: String, CodingKey {
15 | case image
16 | }
17 |
18 | public init(image: Image) {
19 | self.image = image
20 | }
21 |
22 | public init(from decoder: Decoder) throws {
23 | let container = try decoder.container(keyedBy: CodingKeys.self)
24 | let data = try container.decode(Data.self, forKey: CodingKeys.image)
25 | guard let image = Image(data: data) else {
26 | throw StorageError.decodingFailed
27 | }
28 |
29 | self.image = image
30 | }
31 |
32 | public func encode(to encoder: Encoder) throws {
33 | var container = encoder.container(keyedBy: CodingKeys.self)
34 | guard let data = image.cache_toData() else {
35 | throw StorageError.encodingFailed
36 | }
37 |
38 | try container.encode(data, forKey: CodingKeys.image)
39 | }
40 | }
41 |
42 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/JSONArrayWrapper.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JSONArrayWrapper.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public typealias JSONArray = [JSONDictionary]
12 |
13 | public struct JSONArrayWrapper: Codable {
14 | public let jsonArray: JSONArray
15 |
16 | public enum CodingKeys: String, CodingKey {
17 | case jsonArray
18 | }
19 |
20 | public init(jsonArray: JSONArray) {
21 | self.jsonArray = jsonArray
22 | }
23 |
24 | public init(from decoder: Decoder) throws {
25 | let container = try decoder.container(keyedBy: CodingKeys.self)
26 | let data = try container.decode(Data.self, forKey: CodingKeys.jsonArray)
27 | let object = try JSONSerialization.jsonObject(
28 | with: data,
29 | options: []
30 | )
31 |
32 | guard let jsonArray = object as? JSONArray else {
33 | throw StorageError.decodingFailed
34 | }
35 |
36 | self.jsonArray = jsonArray
37 | }
38 |
39 | public func encode(to encoder: Encoder) throws {
40 | var container = encoder.container(keyedBy: CodingKeys.self)
41 | let data = try JSONSerialization.data(
42 | withJSONObject: jsonArray,
43 | options: []
44 | )
45 |
46 | try container.encode(data, forKey: CodingKeys.jsonArray)
47 | }
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/JSONDecoder+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JSONDecoder+Extensions.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// Convert json string, dictionary, data to Codable objects
12 | public extension JSONDecoder {
13 | /// Convert json string to Codable object
14 | ///
15 | /// - Parameters:
16 | /// - string: Json string.
17 | /// - type: Type information.
18 | /// - Returns: Codable object.
19 | /// - Throws: Error if failed.
20 | static func decode(_ string: String, to type: T.Type) throws -> T {
21 | guard let data = string.data(using: .utf8) else {
22 | throw StorageError.decodingFailed
23 | }
24 |
25 | return try decode(data, to: type.self)
26 | }
27 |
28 | /// Convert json dictionary to Codable object
29 | ///
30 | /// - Parameters:
31 | /// - json: Json dictionary.
32 | /// - type: Type information.
33 | /// - Returns: Codable object
34 | /// - Throws: Error if failed
35 | static func decode(_ json: [String: Any], to type: T.Type) throws -> T {
36 | let data = try JSONSerialization.data(withJSONObject: json, options: [])
37 | return try decode(data, to: type)
38 | }
39 |
40 | /// Convert json data to Codable object
41 | ///
42 | /// - Parameters:
43 | /// - json: Json dictionary.
44 | /// - type: Type information.
45 | /// - Returns: Codable object
46 | /// - Throws: Error if failed
47 | static func decode(_ data: Data, to type: T.Type) throws -> T {
48 | return try JSONDecoder().decode(T.self, from: data)
49 | }
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/JSONDictionaryWrapper.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JSONDictionaryWrapper.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public typealias JSONDictionary = [String: Any]
12 |
13 | public struct JSONDictionaryWrapper: Codable {
14 | public let jsonDictionary: JSONDictionary
15 |
16 | public enum CodingKeys: String, CodingKey {
17 | case jsonDictionary
18 | }
19 |
20 | public init(jsonDictionary: JSONDictionary) {
21 | self.jsonDictionary = jsonDictionary
22 | }
23 |
24 | public init(from decoder: Decoder) throws {
25 | let container = try decoder.container(keyedBy: CodingKeys.self)
26 | let data = try container.decode(Data.self, forKey: CodingKeys.jsonDictionary)
27 | let object = try JSONSerialization.jsonObject(
28 | with: data,
29 | options: []
30 | )
31 |
32 | guard let jsonDictionary = object as? JSONDictionary else {
33 | throw StorageError.decodingFailed
34 | }
35 |
36 | self.jsonDictionary = jsonDictionary
37 | }
38 |
39 | public func encode(to encoder: Encoder) throws {
40 | var container = encoder.container(keyedBy: CodingKeys.self)
41 | let data = try JSONSerialization.data(
42 | withJSONObject: jsonDictionary,
43 | options: []
44 | )
45 |
46 | try container.encode(data, forKey: CodingKeys.jsonDictionary)
47 | }
48 | }
49 |
50 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/MemoryCapsule.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MemoryCapsule.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 | import Foundation
9 |
10 | /// Helper class to hold cached instance and expiry date.
11 | /// Used in memory storage to work with NSCache.
12 | class MemoryCapsule: NSObject {
13 | /// Object to be cached
14 | let object: Any
15 | /// Expiration date
16 | let expiry: Expiry
17 |
18 | /**
19 | Creates a new instance of Capsule.
20 | - Parameter value: Object to be cached
21 | - Parameter expiry: Expiration date
22 | */
23 | init(value: Any, expiry: Expiry) {
24 | self.object = value
25 | self.expiry = expiry
26 | }
27 | }
28 |
29 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/MemoryConfig.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MemoryConfig.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public struct MemoryConfig {
12 | /// Expiry date that will be applied by default for every added object
13 | /// if it's not overridden in the add(key: object: expiry: completion:) method
14 | public let expiry: Expiry
15 | /// The maximum number of objects in memory the cache should hold.
16 | /// If 0, there is no count limit. The default value is 0.
17 | public let countLimit: UInt
18 |
19 | /// The maximum total cost that the cache can hold before it starts evicting objects.
20 | /// If 0, there is no total cost limit. The default value is 0
21 | public let totalCostLimit: UInt
22 |
23 | public init(expiry: Expiry = .never, countLimit: UInt = 0, totalCostLimit: UInt = 0) {
24 | self.expiry = expiry
25 | self.countLimit = countLimit
26 | self.totalCostLimit = totalCostLimit
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/ObservationToken.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ObservationToken.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | public final class ObservationToken {
10 | private let cancellationClosure: () -> Void
11 |
12 | init(cancellationClosure: @escaping () -> Void) {
13 | self.cancellationClosure = cancellationClosure
14 | }
15 |
16 | public func cancel() {
17 | cancellationClosure()
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/Optional+Extension.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Optional+Extension.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public extension Optional {
12 | func unwrapOrThrow(error: Error) throws -> Wrapped {
13 | if let value = self {
14 | return value
15 | } else {
16 | throw error
17 | }
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/Storage+Transform.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Storage+Transform.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public extension Storage {
12 | func transformData() -> Storage {
13 | let storage = transform(transformer: TransformerFactory.forData())
14 | return storage
15 | }
16 |
17 | func transformImage() -> Storage {
18 | let storage = transform(transformer: TransformerFactory.forImage())
19 | return storage
20 | }
21 |
22 | func transformCodable(ofType: U.Type) -> Storage {
23 | let storage = transform(transformer: TransformerFactory.forCodable(ofType: U.self))
24 | return storage
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/StorageError.swift:
--------------------------------------------------------------------------------
1 | //
2 | // StorageError.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public enum StorageError: Error {
12 | /// Object can not be found
13 | case notFound
14 | /// Object is found, but casting to requested type failed
15 | case typeNotMatch
16 | /// The file attributes are malformed
17 | case malformedFileAttributes
18 | /// Can't perform Decode
19 | case decodingFailed
20 | /// Can't perform Encode
21 | case encodingFailed
22 | /// The storage has been deallocated
23 | case deallocated
24 | /// Fail to perform transformation to or from Data
25 | case transformerFail
26 | }
27 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/StorageObservationRegistry.swift:
--------------------------------------------------------------------------------
1 | //
2 | // StorageObservationRegistry.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// A protocol used for adding and removing storage observations
12 | public protocol StorageObservationRegistry {
13 | associatedtype S: StorageAware
14 |
15 | /**
16 | Registers observation closure which will be removed automatically
17 | when the weakly captured observer has been deallocated.
18 | - Parameter observer: Any object that helps determine if the observation is still valid
19 | - Parameter closure: Observation closure
20 | - Returns: Token used to cancel the observation and remove the observation closure
21 | */
22 | @discardableResult
23 | func addStorageObserver(
24 | _ observer: O,
25 | closure: @escaping (O, S, StorageChange) -> Void
26 | ) -> ObservationToken
27 |
28 | /// Removes all registered key observers
29 | func removeAllStorageObservers()
30 | }
31 |
32 | // MARK: - StorageChange
33 |
34 | public enum StorageChange: Equatable {
35 | case add(key: String)
36 | case remove(key: String)
37 | case removeAll
38 | case removeExpired
39 | }
40 |
41 | public func == (lhs: StorageChange, rhs: StorageChange) -> Bool {
42 | switch (lhs, rhs) {
43 | case (.add(let key1), .add(let key2)), (.remove(let key1), .remove(let key2)):
44 | return key1 == key2
45 | case (.removeAll, .removeAll), (.removeExpired, .removeExpired):
46 | return true
47 | default:
48 | return false
49 | }
50 | }
51 |
52 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/Transformer.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Transformer.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public class Transformer {
12 | let toData: (T) throws -> Data
13 | let fromData: (Data) throws -> T
14 |
15 | public init(toData: @escaping (T) throws -> Data, fromData: @escaping (Data) throws -> T) {
16 | self.toData = toData
17 | self.fromData = fromData
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/TransformerFactory.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TransformerFactory.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public class TransformerFactory {
12 | public static func forData() -> Transformer {
13 | let toData: (Data) throws -> Data = { $0 }
14 |
15 | let fromData: (Data) throws -> Data = { $0 }
16 |
17 | return Transformer(toData: toData, fromData: fromData)
18 | }
19 |
20 | public static func forImage() -> Transformer {
21 | let toData: (Image) throws -> Data = { image in
22 | return try image.cache_toData().unwrapOrThrow(error: StorageError.transformerFail)
23 | }
24 |
25 | let fromData: (Data) throws -> Image = { data in
26 | return try Image(data: data).unwrapOrThrow(error: StorageError.transformerFail)
27 | }
28 |
29 | return Transformer(toData: toData, fromData: fromData)
30 | }
31 |
32 | public static func forCodable(ofType: U.Type) -> Transformer {
33 | let toData: (U) throws -> Data = { object in
34 | let wrapper = TypeWrapper(object: object)
35 | let encoder = JSONEncoder()
36 | return try encoder.encode(wrapper)
37 | }
38 |
39 | let fromData: (Data) throws -> U = { data in
40 | let decoder = JSONDecoder()
41 | return try decoder.decode(TypeWrapper.self, from: data).object
42 | }
43 |
44 | return Transformer(toData: toData, fromData: fromData)
45 | }
46 | }
47 |
48 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/TypeWrapper.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TypeWrapper.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | /// Used to wrap Codable object
12 | public struct TypeWrapper: Codable {
13 | enum CodingKeys: String, CodingKey {
14 | case object
15 | }
16 |
17 | public let object: T
18 |
19 | public init(object: T) {
20 | self.object = object
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/Types.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Types.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | #if os(iOS) || os(tvOS)
10 | import UIKit
11 | public typealias Image = UIImage
12 | #elseif os(watchOS)
13 |
14 | #elseif os(OSX)
15 | import AppKit
16 | public typealias Image = NSImage
17 | #endif
18 |
19 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/cache/UIImage+Extensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIImage+Extensions.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | /// Helper UIImage extension.
12 | extension UIImage {
13 | /// Checks if image has alpha component
14 | var hasAlpha: Bool {
15 | let result: Bool
16 |
17 | guard let alpha = cgImage?.alphaInfo else {
18 | return false
19 | }
20 |
21 | switch alpha {
22 | case .none, .noneSkipFirst, .noneSkipLast:
23 | result = false
24 | default:
25 | result = true
26 | }
27 |
28 | return result
29 | }
30 |
31 | /// Convert to data
32 | func cache_toData() -> Data? {
33 | return hasAlpha
34 | ? self.pngData()
35 | : self.jpegData(compressionQuality: 1.0)
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/ConvertibleEnum.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ConvertibleEnum.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | public protocol ConvertibleEnum {
10 | static func yy_convert(from value: Any) -> Self?
11 | var yy_value: Any { get }
12 | static var yy_valueType: Any.Type { get }
13 | }
14 |
15 | public extension RawRepresentable where Self: ConvertibleEnum {
16 | static func yy_convert(from value: Any) -> Self? {
17 | return (value as? RawValue).flatMap { Self.init(rawValue: $0) }
18 | }
19 | var yy_value: Any { return rawValue }
20 | static var yy_valueType: Any.Type { return RawValue.self }
21 | }
22 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/Descriptor/EnumDescriptor.swift:
--------------------------------------------------------------------------------
1 | //
2 | // EnumDescriptor.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | struct EnumDescriptor: NominalDescriptor {
10 | /// Flags describing the context, including its kind and format version
11 | let flags: ContextDescriptorFlags
12 |
13 | /// The parent context, or null if this is a top-level context.
14 | let parent: RelativeContextPointer
15 |
16 | /// The name of the type
17 | var name: RelativeDirectPointer
18 |
19 | /// A pointer to the metadata access function for this type
20 | let accessFunctionPtr: RelativeDirectPointer
21 |
22 | /// A pointer to the field descriptor for the type, if any
23 | var fields: RelativeDirectPointer
24 |
25 | /// The number of non-empty cases in the enum are in the low 24 bits; the offset of the payload size in the metadata record in words, if any, is stored in the high 8 bits
26 | let numPayloadCasesAndPayloadSizeOffset: UInt32
27 |
28 | /// The number of empty cases in the enum
29 | let numEmptyCases: UInt32
30 |
31 | let fieldOffsetVectorOffset: FieldOffsetPointer
32 |
33 | let genericContextHeader: TargetTypeGenericContextDescriptorHeader
34 | }
35 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/Descriptor/StructDescriptor.swift:
--------------------------------------------------------------------------------
1 | //
2 | // StructDescriptor.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | struct StructDescriptor: ModelDescriptor {
10 | /// Flags describing the context, including its kind and format version
11 | let flags: ContextDescriptorFlags
12 |
13 | /// The parent context, or null if this is a top-level context.
14 | let parent: RelativeContextPointer
15 |
16 | /// The name of the type
17 | var name: RelativeDirectPointer
18 |
19 | /// A pointer to the metadata access function for this type
20 | let accessFunctionPtr: RelativeDirectPointer
21 |
22 | /// A pointer to the field descriptor for the type, if any
23 | var fields: RelativeDirectPointer
24 |
25 | /// The number of stored properties in the struct. If there is a field offset vector, this is its length
26 | let numFields: UInt32
27 |
28 | /// The offset of the field offset vector for this struct's stored properties in its metadata, if any. 0 means there is no field offset vector
29 | let fieldOffsetVectorOffset: FieldOffsetPointer
30 |
31 | let genericContextHeader: TargetTypeGenericContextDescriptorHeader
32 | }
33 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/JSON.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JSON.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | // MARK: Model -> JSON
10 | public func JSONObject(from model: M) -> [String: Any] {
11 | return model.yy_JSONObject()
12 | }
13 |
14 | public func JSONObjectArray(from models: [M]) -> [[String: Any]] {
15 | return models.yy.JSONObjectArray()
16 | }
17 |
18 | //public func JSONArray(from value: [Any]) -> [Any] {
19 | // return value.yy.JSONArray()
20 | //}
21 | //
22 | //public func JSON(from value: Any) -> Any? {
23 | // return Values.JSONValue(value)
24 | //}
25 |
26 | public func JSONString(from value: Any,
27 | prettyPrinted: Bool = false) -> String {
28 | return Values.JSONString(value, prettyPrinted: prettyPrinted) ?? ""
29 | }
30 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/JSONSerialization+YYConvert.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JSONSerialization+YYConvert.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension JSONSerialization {
12 | static func yy_JSON(_ string: String, _ type: T.Type) -> T? {
13 | return string.data(using: .utf8).flatMap { yy_JSON($0, type) }
14 | }
15 |
16 | static func yy_JSON(_ data: Data, _ type: T.Type) -> T? {
17 | return try! jsonObject(with: data,
18 | options: .allowFragments) as? T
19 | }
20 |
21 | static func yy_string(_ json: Any?,
22 | prettyPrinted: Bool = false) -> String? {
23 | guard let value = json.yy_value else { return nil }
24 | guard value is [Any] || value is [String: Any] else {
25 | return "\(value)"
26 | }
27 | guard let data = try? data(withJSONObject: value,
28 | options: prettyPrinted ? [.prettyPrinted] : [])
29 | else { return nil }
30 | return String(data: data, encoding: .utf8)
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/Metadata.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Metadata.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public struct Metadata {
12 | private static let typeLock = NSRecursiveLock()
13 | private static var types = [TypeKey: BaseType]()
14 |
15 | public static func type(_ type: Any.Type) -> BaseType? {
16 | typeLock.lock()
17 | defer { typeLock.unlock() }
18 |
19 | // get from cache
20 | let key = typeKey(type)
21 | if let mt = types[key] { return mt }
22 |
23 | // name
24 | let name = String(describing: type)
25 | if name == "Swift._SwiftObject"
26 | || name == "NSObject"
27 | || name == "_TtCs12_SwiftObject" { return nil }
28 |
29 | // type judge
30 | var mtt: BaseType.Type
31 | let kind = Kind(type)
32 | switch kind {
33 | case .class: mtt = ClassType.self
34 | case .struct: mtt = StructType.self
35 | case .enum: mtt = EnumType.self
36 | case .optional: mtt = OptionalType.self
37 | case .objCClassWrapper: mtt = ObjCClassType.self
38 | case .foreignClass: mtt = ForeignClassType.self
39 | case .tuple: mtt = TupleType.self
40 | case .function: mtt = FunctionType.self
41 | case .existential: mtt = ProtocolType.self
42 | case .metatype: mtt = MetaType.self
43 | default: mtt = BaseType.self
44 | }
45 |
46 | // ceate and put it into cache
47 | let mt = mtt.init(name: name, type: type, kind: kind)
48 | types[key] = mt
49 | return mt
50 | }
51 |
52 | public static func type(_ obj: Any) -> BaseType? {
53 | return type(Swift.type(of: obj))
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/NSObject+YYConvert.swift:
--------------------------------------------------------------------------------
1 | //
2 | // NSObject+YYConvert.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 | import Foundation
9 |
10 | extension NSObject {
11 | static func newConvertible() -> Convertible {
12 | return self.init() as! Convertible
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/Optional+YYConvert.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Optional+YYConvert.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | protocol OptionalValue {
12 | var yy_value: Any? { get }
13 | }
14 |
15 | extension Optional: OptionalValue {
16 | var yy_value: Any? {
17 | guard let v = self else { return nil }
18 | return (v as? OptionalValue)?.yy_value ?? v
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/Property.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Property.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | /// Info for stored property(存储属性的相关信息)
10 | public class Property: CustomStringConvertible {
11 | public let name: String
12 | public let type: Any.Type
13 | public private(set) lazy var dataType: Any.Type = type~!
14 | public let isVar: Bool
15 | public let offset: Int
16 | public let ownerType: Any.Type
17 |
18 | init(name: String, type: Any.Type,
19 | isVar: Bool, offset: Int,
20 | ownerType: Any.Type) {
21 | self.name = name
22 | self.type = type
23 | self.isVar = isVar
24 | self.offset = offset
25 | self.ownerType = ownerType
26 | }
27 |
28 | func set(_ value: Any, for model: UnsafeMutableRawPointer) {
29 | (model + offset).yy_set(value, type)
30 | }
31 |
32 | func get(from model: UnsafeMutableRawPointer) -> Any {
33 | return (model + offset).yy_get(type)
34 | }
35 |
36 | public var description: String {
37 | return "\(name) { type = \(type), isVar = \(isVar), offset = \(offset), ownerType = \(ownerType) }"
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/TypeProxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TypeProxy.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | protocol TypeProxy: Convertible {}
10 |
11 | extension TypeProxy {
12 | static func `is`(_ value: Any) -> Bool {
13 | return value is Self
14 | }
15 |
16 | static func `is`(_ type: Any.Type) -> Bool {
17 | return type is Self.Type
18 | }
19 |
20 | static func `as`(_ value: Any) -> Self? {
21 | return value as? Self
22 | }
23 |
24 | static func `as`(_ type: Any.Type) -> Self.Type? {
25 | return type as? Self.Type
26 | }
27 | }
28 |
29 | func typeProxy(_ type: Any.Type) -> TypeProxy.Type {
30 | // Any.Type(8 bytes) + Int(8 bytes) == Protocol.Type(16 bytes)
31 | return (type, 0) ~>> TypeProxy.Type.self
32 | }
33 |
34 | typealias TypeKey = UInt
35 | func typeKey(_ type: Any.Type) -> TypeKey {
36 | return type ~>> TypeKey.self
37 | }
38 |
39 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/YYConvert.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YYConvert.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | public struct YYConvert {
10 | let base: Base
11 | init(_ base: Base) {
12 | self.base = base
13 | }
14 | }
15 |
16 | // MARK: - protocol for normal types
17 | public protocol YYCompatible {}
18 | public extension YYCompatible {
19 | static var yy: YYConvert.Type {
20 | get { return YYConvert.self }
21 | set {}
22 | }
23 | var yy: YYConvert {
24 | get { return YYConvert(self) }
25 | set {}
26 | }
27 | }
28 |
29 | // MARK: - protocol for types with a generic parameter
30 | public struct YYGeneric {
31 | let base: Base
32 | init(_ base: Base) {
33 | self.base = base
34 | }
35 | }
36 | public protocol YYGenericCompatible {
37 | associatedtype T
38 | }
39 | public extension YYGenericCompatible {
40 | static var yy: YYGeneric.Type {
41 | get { return YYGeneric.self }
42 | set {}
43 | }
44 | var yy: YYGeneric {
45 | get { return YYGeneric(self) }
46 | set {}
47 | }
48 | }
49 |
50 | // MARK: - protocol for types with two generic parameter2
51 | public struct YYGeneric2 {
52 | let base: Base
53 | init(_ base: Base) {
54 | self.base = base
55 | }
56 | }
57 | public protocol YYGenericCompatible2 {
58 | associatedtype T1
59 | associatedtype T2
60 | }
61 | public extension YYGenericCompatible2 {
62 | static var yy: YYGeneric2.Type {
63 | get { return YYGeneric2.self }
64 | set {}
65 | }
66 | var yy: YYGeneric2 {
67 | get { return YYGeneric2(self) }
68 | set {}
69 | }
70 | }
71 |
72 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/layout/BaseLayout.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BaseLayout.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | struct BaseLayout: Layout {
10 | let kind: UnsafeRawPointer
11 | }
12 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/layout/EnumLayout.swift:
--------------------------------------------------------------------------------
1 | //
2 | // EnumLayout.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | struct EnumLayout: NominalLayout {
10 | let kind: UnsafeRawPointer
11 | /// An out-of-line description of the type
12 | var description: UnsafeMutablePointer
13 | }
14 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/layout/FieldList.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FieldList.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | struct FieldList- {
10 | private let item: Item
11 | mutating func ptr(_ index: Int) -> UnsafeMutablePointer
- {
12 | return withUnsafeMutablePointer(to: &self) {
13 | ($0 + index).yy_raw ~> Item.self
14 | }
15 | }
16 |
17 | mutating func item(_ index: Int) -> Item {
18 | return withUnsafeMutablePointer(to: &self) {
19 | $0[index].item
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/layout/FunctionLayout.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FunctionLayout.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 |
10 | struct FunctionLayout: Layout {
11 | let kind: UnsafeRawPointer
12 | var flags: Int
13 | var parameters: FieldList
14 | }
15 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/layout/Layout.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Layout.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | protocol Layout {
10 | // Only valid for non-class metadata
11 | var kind: UnsafeRawPointer { get }
12 | }
13 |
14 | protocol NominalLayout: Layout {
15 | associatedtype DescriptorType: NominalDescriptor
16 | var description: UnsafeMutablePointer { get }
17 | var genericTypeOffset: Int { get }
18 | }
19 |
20 | extension NominalLayout {
21 | var genericTypeOffset: Int { return 2 }
22 | }
23 |
24 | protocol ModelLayout: NominalLayout where DescriptorType: ModelDescriptor {}
25 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/layout/ProtocolLayout.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ProtocolLayout.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | struct ProtocolLayout: Layout {
10 | let kind: UnsafeRawPointer
11 | }
12 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/layout/StructLayout.swift:
--------------------------------------------------------------------------------
1 | //
2 | // StructLayout.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 |
10 | struct StructLayout: ModelLayout {
11 | let kind: UnsafeRawPointer
12 | /// An out-of-line description of the type
13 | var description: UnsafeMutablePointer
14 | }
15 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/layout/TupleLayout.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TupleLayout.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | struct TupleLayout: Layout {
10 | let kind: UnsafeRawPointer
11 | let numElements: Int
12 | let labels: UnsafeMutablePointer
13 | var elements: FieldList
14 | }
15 |
16 | struct TupleElement {
17 | let type: Any.Type
18 | let offset: Int
19 | }
20 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/type/BaseType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BaseType.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | public class BaseType: Type, CustomStringConvertible {
10 | public let name: String
11 | public let type: Any.Type
12 | public let kind: Kind
13 | public private(set) var module: String = ""
14 | public private(set) var isSystemModule: Bool = false
15 |
16 | required init(name: String, type: Any.Type, kind: Kind) {
17 | self.name = name
18 | self.type = type
19 | self.kind = kind
20 |
21 | build()
22 | }
23 |
24 | func build() {
25 | switch kind {
26 | case .optional, .struct, .class, .existential,
27 | .enum, .objCClassWrapper, .foreignClass:
28 | let name = String(reflecting: type)
29 | guard let end = name.firstIndex(of: ".") else { break }
30 | module = String(name[name.startIndex..!
11 | public private(set) var `super`: ClassType?
12 | // public private(set) var isPureSwiftClass: Bool = false
13 |
14 | override func build() {
15 | super.build()
16 |
17 | layout = builtLayout()
18 | genericTypes = builtGenericTypes()
19 | properties = builtProperties()
20 |
21 | `super` = Metadata.type(layout.pointee.superclass) as? ClassType
22 | if let superProperties = `super`?.properties {
23 | properties = properties ?? []
24 | properties!.insert(contentsOf: superProperties, at: 0)
25 | }
26 |
27 | /// Not sure
28 | // isPureSwiftClass = (layout.pointee.rodata ~>> UnsafePointer.self).pointee > 0
29 | }
30 |
31 | override public var description: String {
32 | return "\(name) { kind = \(kind), properties = \(properties ?? []), genericTypes = \(genericTypes ?? []), super = \(`super` != nil ? String(describing: `super`!) : "nil") }"
33 | }
34 | }
35 |
36 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/type/EnumType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // EnumType.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | public class EnumType: BaseType, NominalType, LayoutType {
10 | private(set) var layout: UnsafeMutablePointer!
11 | public private(set) var genericTypes: [Any.Type]?
12 | public private(set) var cases: [String]?
13 |
14 | override func build() {
15 | super.build()
16 |
17 | layout = builtLayout()
18 | genericTypes = builtGenericTypes()
19 |
20 | let description = layout.pointee.description
21 | let count = Int(description.pointee.numEmptyCases)
22 | guard count > 0 else { return }
23 | let descriptor = description.pointee.fields.advanced()
24 | cases = (0..!
11 |
12 | override func build() {
13 | super.build()
14 |
15 | layout = builtLayout()
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/type/FunctionType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // FunctionType.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | public class FunctionType: BaseType, LayoutType {
10 | private(set) var layout: UnsafeMutablePointer!
11 | public private(set) var `throws`: Bool = false
12 | public private(set) var returnType: Any.Type = Any.self
13 | public private(set) var argumentTypes: [Any.Type]?
14 |
15 | override func build() {
16 | super.build()
17 |
18 | layout = builtLayout()
19 |
20 | `throws` = (layout.pointee.flags & 0x01000000) != 0
21 | returnType = layout.pointee.parameters.item(0)
22 |
23 | let argumentsCount = layout.pointee.flags & 0x00FFFFFF
24 | guard argumentsCount > 0 else { return }
25 | var arr = [Any.Type]()
26 | for i in 1...argumentsCount {
27 | arr.append(layout.pointee.parameters.item(i))
28 | }
29 | argumentTypes = arr
30 | }
31 |
32 | override public var description: String {
33 | return "\(name) { kind = \(kind), argumentTypes = \(argumentTypes ?? []), returnType = \(returnType), throws = \(`throws`) }"
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/type/MetaType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MetaType.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 |
10 | public class MetaType: BaseType, LayoutType {
11 | private(set) var layout: UnsafeMutablePointer!
12 |
13 | override func build() {
14 | super.build()
15 |
16 | layout = builtLayout()
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/type/ObjCClassType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ObjCClassType.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | /// e.g. NSString
10 | public class ObjCClassType: BaseType, LayoutType {
11 | private(set) var layout: UnsafeMutablePointer!
12 |
13 | override func build() {
14 | super.build()
15 |
16 | layout = builtLayout()
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/type/OptionalType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // OptionalType.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | /// Optional metadata share the same basic layout as enum metadata
10 | public class OptionalType: EnumType {
11 | public private(set) var wrapType: Any.Type = Any.self
12 |
13 | override func build() {
14 | super.build()
15 |
16 | var wt: BaseType! = self
17 | while wt.kind == .optional {
18 | wt = Metadata.type((wt as! OptionalType).genericTypes![0])
19 | }
20 | wrapType = wt.type
21 | }
22 |
23 | override public var description: String {
24 | return "\(name) { kind = \(kind), wrapType = \(wrapType) }"
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/type/ProtocolType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ProtocolType.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | public class ProtocolType: BaseType, LayoutType {
10 | private(set) var layout: UnsafeMutablePointer!
11 |
12 | override func build() {
13 | super.build()
14 |
15 | layout = builtLayout()
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/type/StructType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // StructType.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | public class StructType: ModelType, PropertyType, LayoutType {
10 | private(set) var layout: UnsafeMutablePointer!
11 |
12 | override func build() {
13 | super.build()
14 |
15 | layout = builtLayout()
16 | properties = builtProperties()
17 | genericTypes = builtGenericTypes()
18 | }
19 |
20 | override public var description: String {
21 | return "\(name) { kind = \(kind), properties = \(properties ?? []), genericTypes = \(genericTypes ?? []) }"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/convert/type/TupleType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TupleType.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | public class TupleType: BaseType, LayoutType {
10 | private(set) var layout: UnsafeMutablePointer!
11 | public private(set) var properties: [Property]!
12 |
13 | override func build() {
14 | super.build()
15 |
16 | layout = builtLayout()
17 |
18 | let elementsCount = layout.pointee.numElements
19 | guard elementsCount > 0 else { return }
20 | var names: [String]
21 | if layout.pointee.labels ~>> Int.self == 0 {
22 | names = Array(repeating: "", count: elementsCount)
23 | } else {
24 | names = String(cString: layout.pointee.labels).components(separatedBy: " ")
25 | }
26 | properties = (0.. String {
14 | do {
15 | let data = try JSONSerialization.data(withJSONObject: param, options: JSONSerialization.WritingOptions.prettyPrinted)
16 | let paramString = String.init(data: data, encoding: String.Encoding.utf8)
17 | return paramString!
18 | } catch let error {
19 | print("paramsSerializationJson --> error = \(error)")
20 | return ""
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/provider/YYHttpValue.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YYHttpValue.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | //// MARK: - Result
10 | public struct YYHttpValue {
11 |
12 | public let isCacheData: Bool
13 | public let result: HttpBaseResult
14 | public let response: HTTPURLResponse?
15 |
16 | init(isCacheData: Bool, result: HttpBaseResult, response: HTTPURLResponse?) {
17 | self.isCacheData = isCacheData
18 | self.result = result
19 | self.response = response
20 | }
21 | }
22 |
23 |
--------------------------------------------------------------------------------
/collectionlibrary/data/http/provider/YYNetCacheKey.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YYNetCacheKey.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 | import Foundation
9 |
10 |
11 | /// 将参数字典转换成字符串后md5
12 | func cacheKey(_ url: String, _ params: Dictionary?, _ dynamicParams: Dictionary?) -> String {
13 | /// c参数重复, `params`中过滤掉`dynamicParams`中的参数
14 | if let filterParams = params?.filter({ (key, _) -> Bool in
15 | return dynamicParams?.contains(where: { (key1, _) -> Bool in
16 | return key != key1
17 | }) ?? false
18 | }) {
19 | let str = "\(url)" + "\(sort(filterParams))"
20 | return MD5(str)
21 | } else {
22 | return MD5(url)
23 | }
24 | }
25 |
26 | /// 参数排序生成字符串
27 | func sort(_ parameters: Dictionary?) -> String {
28 | var sortParams = ""
29 | if let params = parameters {
30 | let sortArr = params.keys.sorted { return $0 < $1 }
31 | sortArr.forEach({ (str) in
32 | if let value = params[str] {
33 | sortParams = sortParams.appending("\(str)=\(value)")
34 | } else {
35 | sortParams = sortParams.appending("\(str)=")
36 | }
37 | })
38 | }
39 | return sortParams
40 | }
41 |
--------------------------------------------------------------------------------
/collectionlibrary/data/sqlite/Core/Errors.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | public enum QueryError: Error, CustomStringConvertible {
4 | case noSuchTable(name: String)
5 | case noSuchColumn(name: String, columns: [String])
6 | case ambiguousColumn(name: String, similar: [String])
7 | case unexpectedNullValue(name: String)
8 |
9 | public var description: String {
10 | switch self {
11 | case .noSuchTable(let name):
12 | return "No such table: \(name)"
13 | case .noSuchColumn(let name, let columns):
14 | return "No such column `\(name)` in columns \(columns)"
15 | case .ambiguousColumn(let name, let similar):
16 | return "Ambiguous column `\(name)` (please disambiguate: \(similar))"
17 | case .unexpectedNullValue(let name):
18 | return "Unexpected null value for column `\(name)`"
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/collectionlibrary/data/sqlite/Extensions/RTree.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SQLite.swift
3 | // https://github.com/stephencelis/SQLite.swift
4 | // Copyright © 2014-2015 Stephen Celis.
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | extension Module {
26 |
27 | public static func RTree(_ primaryKey: Expression, _ pairs: (Expression, Expression)...) -> Module where T.Datatype == Int64, U.Datatype == Double {
28 | var arguments: [Expressible] = [primaryKey]
29 |
30 | for pair in pairs {
31 | arguments.append(contentsOf: [pair.0, pair.1] as [Expressible])
32 | }
33 |
34 | return Module(name: "rtree", arguments: arguments)
35 | }
36 |
37 | }
38 |
--------------------------------------------------------------------------------
/collectionlibrary/data/sqlite/SQLite.h:
--------------------------------------------------------------------------------
1 | @import Foundation;
2 |
3 | FOUNDATION_EXPORT double SQLiteVersionNumber;
4 | FOUNDATION_EXPORT const unsigned char SQLiteVersionString[];
5 |
6 | #import "SQLiteObjc.h"
7 |
--------------------------------------------------------------------------------
/collectionlibrary/data/sqlite/include/SQLiteObjc.h:
--------------------------------------------------------------------------------
1 | //
2 | // SQLite.swift
3 | // https://github.com/stephencelis/SQLite.swift
4 | // Copyright © 2014-2015 Stephen Celis.
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in
14 | // all copies or substantial portions of the Software.
15 | //
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 | // THE SOFTWARE.
23 | //
24 |
25 | @import Foundation;
26 | @import SQLite3;
27 |
28 | NS_ASSUME_NONNULL_BEGIN
29 | typedef NSString * _Nullable (^_SQLiteTokenizerNextCallback)(const char *input, int *inputOffset, int *inputLength);
30 | int _SQLiteRegisterTokenizer(sqlite3 *db, const char *module, const char *tokenizer, _Nullable _SQLiteTokenizerNextCallback callback);
31 | NS_ASSUME_NONNULL_END
32 |
33 |
--------------------------------------------------------------------------------
/collectionlibrary/data/sqlite/privoder/SQLiteModel.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SQLiteModel.swift
3 | // AutoSQLite.swift
4 | //
5 | // Created by QJ Technology on 2017/5/12.
6 | // Copyright © 2017年 TonyReet. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | //modify_future
12 | /// 先使用这个基类进行操作,后续这个基类需要改为protocol
13 |
14 | /// 基类
15 | open class SQLiteModel: NSObject {
16 | public required override init() {
17 | super.init()
18 | }
19 |
20 | open func primaryKey() -> String {
21 | return ""
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/collectionlibrary/dataShowView/base/BaseDataShowContentView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BaseDataShowContentView.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/5.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | open class BaseDataShowContentView:UIView{
12 | public var _contentHeight:CGFloat = 300.0
13 | }
14 |
--------------------------------------------------------------------------------
/collectionlibrary/dialog/YYDialog.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YYDialog.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/9.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public class YYDialog{
12 |
13 | public static func createAlertDialog()->YYAlertDialog{
14 | return YYAlertDialog()
15 | }
16 |
17 | public static func createLoadingDialog()->YYLoadingDialog{
18 | return YYLoadingDialog()
19 | }
20 |
21 | public static func createToast()->YYToast{
22 | return YYToast()
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/collectionlibrary/headerscale/UIScrollView+YYStretchyHeaderView.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIScrollView+YYStretchyHeaderView.h
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/7.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class YYStretchyHeaderView;
12 |
13 | @interface UIScrollView (YYStretchyHeaderView)
14 |
15 | - (void)yy_fixZPositionsForStretchyHeaderView:(YYStretchyHeaderView *)headerView;
16 |
17 | - (void)yy_arrangeStretchyHeaderView:(YYStretchyHeaderView *)headerView;
18 | - (void)yy_layoutStretchyHeaderView:(YYStretchyHeaderView *)headerView
19 | contentOffset:(CGPoint)contentOffset
20 | previousContentOffset:(CGPoint)previousContentOffset;
21 |
22 | @end
23 |
24 |
--------------------------------------------------------------------------------
/collectionlibrary/headerscale/UIView+YYTransplantSubviews.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+YYTransplantSubviews.h
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/7.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface UIView (YYTransplantSubviews)
12 |
13 | - (void)yy_transplantSubviewsToView:(UIView *)newSuperview;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/collectionlibrary/headerscale/YYGeometry.c:
--------------------------------------------------------------------------------
1 | //
2 | // YYGeometry.c
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/7.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | #include "YYGeometry.h"
10 |
11 | CGFloat CGFloatTranslateRange(CGFloat value, CGFloat oldMin, CGFloat oldMax, CGFloat newMin, CGFloat newMax) {
12 | CGFloat oldRange = oldMax - oldMin;
13 | CGFloat newRange = newMax - newMin;
14 | return (value - oldMin) * newRange / oldRange + newMin;
15 | }
16 |
17 | CGPoint CGPointInterpolate(CGFloat factor, CGPoint origin, CGPoint end) {
18 | return CGPointMake(CGFloatInterpolate(factor, origin.x, end.x),
19 | CGFloatInterpolate(factor, origin.y, end.y));
20 | }
21 |
22 | CGSize CGSizeInterpolate(CGFloat factor, CGSize minSize, CGSize maxSize) {
23 | return CGSizeMake(CGFloatInterpolate(factor, minSize.width, maxSize.width),
24 | CGFloatInterpolate(factor, minSize.height, maxSize.height));
25 | }
26 |
27 | CGRect CGRectInterpolate(CGFloat factor, CGRect minRect, CGRect maxRect) {
28 | CGRect rect;
29 | rect.origin = CGPointInterpolate(factor, minRect.origin, maxRect.origin);
30 | rect.size = CGSizeInterpolate(factor, minRect.size, maxRect.size);
31 | return rect;
32 |
33 | }
34 |
--------------------------------------------------------------------------------
/collectionlibrary/headerscale/YYGeometry.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYGeometry.h
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/7.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | #ifndef GSKGeometry_h
10 | #define GSKGeometry_h
11 |
12 | #include
13 |
14 | CG_INLINE CGFloat CGFloatInterpolate(CGFloat factor, CGFloat min, CGFloat max) {
15 | return min + (max - min) * factor;
16 | }
17 |
18 | CG_EXTERN CGFloat CGFloatTranslateRange(CGFloat value, CGFloat oldMin, CGFloat oldMax, CGFloat newMin, CGFloat newMax);
19 | CG_EXTERN CGPoint CGPointInterpolate(CGFloat factor, CGPoint origin, CGPoint end);
20 | CG_EXTERN CGSize CGSizeInterpolate(CGFloat factor, CGSize minSize, CGSize maxSize);
21 | CG_EXTERN CGRect CGRectInterpolate(CGFloat factor, CGRect minRect, CGRect maxRect);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/collectionlibrary/headerscale/YYStretchyHeaderView+Protected.h:
--------------------------------------------------------------------------------
1 | //
2 | // YYStretchyHeaderView+Protected.h
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/7.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | @interface YYStretchyHeaderView (Protected)
10 |
11 | @property (nonatomic, readonly) CGFloat verticalInset;
12 | @property (nonatomic, readonly) CGFloat horizontalInset;
13 | @property (nonatomic, readonly) CGFloat maximumHeight;
14 | @property (nonatomic, readonly) CGFloat minimumHeight;
15 |
16 | - (void)setNeedsLayoutContentView;
17 | - (void)layoutContentViewIfNeeded;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/collectionlibrary/imageLoader/CGImageSourceImageLoader.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CGImageSource+ImageLoader.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/8.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import ImageIO
11 |
12 | extension CGImageSource {
13 |
14 | internal var imageCount: Int {
15 | return CGImageSourceGetCount(self)
16 | }
17 |
18 | internal func process() -> (images: [UIImage], duration: TimeInterval) {
19 | var images = [UIImage]()
20 | let count = imageCount
21 | let duration: Double = Double(count) * 0.2 // TODO: implementation
22 | for i in 0 ..< count {
23 | if let cgImage = getCGImage(index: i) {
24 | images.append(UIImage(cgImage: cgImage))
25 | }
26 | }
27 |
28 | return (images, duration)
29 | }
30 |
31 | internal func getCGImage(index: Int) -> CGImage? {
32 | return CGImageSourceCreateImageAtIndex(self, index, nil)
33 | }
34 |
35 | }
36 |
--------------------------------------------------------------------------------
/collectionlibrary/imageLoader/DataType.swift:
--------------------------------------------------------------------------------
1 | //
2 | // DataType.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/8.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension Data {
12 |
13 | enum FileType {
14 | case png
15 | case jpeg
16 | case gif
17 | case tiff
18 | case webp
19 | case Unknown
20 | }
21 |
22 | internal var fileType: FileType {
23 | let fileHeader = getFileHeader(capacity: 2)
24 | switch fileHeader {
25 | case [0x47, 0x49]:
26 | return .gif
27 | case [0xFF, 0xD8]:
28 | // FF D8 FF DB
29 | // FF D8 FF E0
30 | // FF D8 FF E1
31 | return .jpeg
32 | case [0x89, 0x50]:
33 | // 89 50 4E 47
34 | return .png
35 | default:
36 | return .Unknown
37 | }
38 | }
39 |
40 | internal func getFileHeader(capacity: Int) -> [UInt8] {
41 |
42 | // https://developer.apple.com/documentation/swift/unsafemutablepointer
43 | var pointer = UnsafeMutablePointer.allocate(capacity: capacity)
44 | // malloc: *** error for object 0x60c00001af32: pointer being freed was not allocated
45 | // defer { pointer.deallocate() }
46 | (self as NSData).getBytes(pointer, length: capacity)
47 |
48 | var header = [UInt8]()
49 | for _ in 0 ..< capacity {
50 | header.append(pointer.pointee)
51 | pointer += 1
52 | }
53 |
54 | return header
55 | }
56 |
57 | }
58 |
--------------------------------------------------------------------------------
/collectionlibrary/imageLoader/UIImageImageLoader.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIImageImageLoader.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/8.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | extension UIImage {
12 | internal static func process(data: Data) -> UIImage? {
13 | switch data.fileType {
14 | case .gif:
15 | guard let source = CGImageSourceCreateWithData(data as CFData, nil) else { return nil }
16 | let result = source.process()
17 | return UIImage.animatedImage(with: result.images, duration: result.duration)
18 | case .png, .jpeg, .tiff, .webp, .Unknown:
19 | return UIImage(data: data)
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/collectionlibrary/imageLoader/Utilities.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Utilities.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/8.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | // MARK: - AssociatedValue Protocol
12 | internal protocol AssociatedValue {
13 | func getAssociatedValue(key: UnsafeRawPointer, defaultValue: T?) -> T?
14 | func getAssociatedValue(key: UnsafeRawPointer, defaultValue: T) -> T
15 | func setAssociatedValue(key: UnsafeRawPointer, value: T?, policy: objc_AssociationPolicy)
16 | }
17 |
18 | // MARK: - AssociatedValue Protocol Default Implementation
19 | internal extension AssociatedValue {
20 | func getAssociatedValue(key: UnsafeRawPointer, defaultValue: T?) -> T? {
21 | guard let value = objc_getAssociatedObject(self, key) as? T else {
22 | return defaultValue
23 | }
24 |
25 | return value
26 | }
27 |
28 | func getAssociatedValue(key: UnsafeRawPointer, defaultValue: T) -> T {
29 | guard let value = objc_getAssociatedObject(self, key) as? T else {
30 | return defaultValue
31 | }
32 |
33 | return value
34 | }
35 |
36 | func setAssociatedValue(key: UnsafeRawPointer, value: T?, policy: objc_AssociationPolicy = .OBJC_ASSOCIATION_RETAIN_NONATOMIC) {
37 | objc_setAssociatedObject(self, key, value, policy)
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/collectionlibrary/mvp/BasePresenter.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BasePresenter.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | open class BasePresenter:NSObject{
12 |
13 | public var mView:UIViewController?=nil
14 |
15 | override required public init() {
16 | }
17 |
18 | func setV(mView:UIViewController){
19 | self.mView=mView
20 | }
21 |
22 | }
23 |
--------------------------------------------------------------------------------
/collectionlibrary/mvp/IBaseControllerView.swift:
--------------------------------------------------------------------------------
1 | //
2 | // IBaseControllerView.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/16.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | open class IBaseControllerView:AutoHeightUIViewController{
12 |
13 | public var mPresenter:T? = T.self()
14 |
15 | open override func viewDidLoad() {
16 | super.viewDidLoad()
17 | mPresenter?.setV(mView: self)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/collectionlibrary/navbar/AssociatedKeys.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AssociatedKeys.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/10/28.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 | struct AssociatedKeys {
9 |
10 | static var configuration = "com.youngmanster.configuration"
11 |
12 | static var navigationBar = "com.youngmanster.navigationBar"
13 |
14 | static var navigationItem = "com.youngmanster.navigationItem"
15 |
16 | static var observation = "com.youngmanster.observation"
17 | }
18 |
--------------------------------------------------------------------------------
/collectionlibrary/navbar/Const.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Const.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/10/28.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | struct Const {
12 |
13 | struct StatusBar {
14 |
15 | static var maxY: CGFloat {
16 | return UIApplication.shared.statusBarFrame.maxY
17 | }
18 | }
19 |
20 | struct NavigationBar {
21 |
22 | static let height: CGFloat = 44.0
23 |
24 | static let layoutPaddings: UIEdgeInsets = .init(top: 0, left: 16, bottom: 0, right: 16)
25 |
26 | static let layoutMargins: UIEdgeInsets = .init(top: 8, left: 16, bottom: 8, right: 16)
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/collectionlibrary/navbar/Navigation.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Navigation.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/10/28.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 | import UIKit
9 |
10 | public struct Navigation {
11 |
12 | let base: Base
13 |
14 | init(_ base: Base) {
15 | self.base = base
16 | }
17 | }
18 |
19 | public protocol NavigationCompatible {
20 |
21 | associatedtype CompatibleType
22 |
23 | var navigation: CompatibleType { get }
24 | }
25 |
26 | public extension NavigationCompatible {
27 |
28 | var navigation: Navigation {
29 | return Navigation(self)
30 | }
31 | }
32 |
33 | extension UIViewController: NavigationCompatible {}
34 |
--------------------------------------------------------------------------------
/collectionlibrary/navbar/Shadow.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Shadow.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/10/28.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | public struct Shadow {
11 | let color: CGColor?
12 | let opacity: Float
13 | let offset: CGSize
14 | let radius: CGFloat
15 | let path: CGPath?
16 |
17 | public static let none: Shadow = .init()
18 |
19 | public init(
20 | color: CGColor? = nil,
21 | opacity: Float = 0,
22 | offset: CGSize = CGSize(width: 0, height: -3),
23 | radius: CGFloat = 3,
24 | path: CGPath? = nil) {
25 | self.color = color
26 | self.opacity = opacity
27 | self.offset = offset
28 | self.radius = radius
29 | self.path = path
30 | }
31 | }
32 |
33 | extension CALayer {
34 |
35 | func set(_ shadow: Shadow) {
36 | shadowColor = shadow.color
37 | shadowOpacity = shadow.opacity
38 | shadowOffset = shadow.offset
39 | shadowRadius = shadow.radius
40 | shadowPath = shadow.path
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/collectionlibrary/pageview/YYPageViewLayoutAttributes.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YYPageViewLayoutAttributes.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/29.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class YYPageViewLayoutAttributes: UICollectionViewLayoutAttributes {
12 |
13 | open var position: CGFloat = 0
14 |
15 | open override func isEqual(_ object: Any?) -> Bool {
16 | guard let object = object as? YYPageViewLayoutAttributes else {
17 | return false
18 | }
19 | var isEqual = super.isEqual(object)
20 | isEqual = isEqual && (self.position == object.position)
21 | return isEqual
22 | }
23 |
24 | open override func copy(with zone: NSZone? = nil) -> Any {
25 | let copy = super.copy(with: zone) as! YYPageViewLayoutAttributes
26 | copy.position = self.position
27 | return copy
28 | }
29 |
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/collectionlibrary/refresh/YY.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YY.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/5.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 |
12 | public protocol YYExtensionsProvider: class {
13 | associatedtype CompatibleType
14 | var yy: CompatibleType { get }
15 | }
16 |
17 | extension YYExtensionsProvider {
18 | /// A proxy which hosts reactive extensions for `self`.
19 | public var yy: YY {
20 | return YY(self)
21 | }
22 |
23 | }
24 |
25 | public struct YY {
26 | public let base: Base
27 |
28 | // Construct a proxy.
29 | //
30 | // - parameters:
31 | // - base: The object to be proxied.
32 | fileprivate init(_ base: Base) {
33 | self.base = base
34 | }
35 | }
36 |
37 | //
38 | extension UIScrollView: YYExtensionsProvider {}
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/collectionlibrary/refresh/YYRefreshAnimator.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YYRefreshAnimator.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/5.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | open class YYRefreshAnimator: YYRefreshProtocol, YYRefreshAnimatorProtocol {
12 | // The view that called when component refresh, returns a custom view or self if 'self' is the customized views.
13 | open var view: UIView
14 | // Customized inset.
15 | open var insets: UIEdgeInsets
16 | // Refresh event is executed threshold required y offset, set a value greater than 0.0, the default is 60.0
17 | open var trigger: CGFloat = 60.0
18 | // Offset y refresh event executed by this parameter you can customize the animation to perform when you refresh the view of reservations height
19 | open var executeIncremental: CGFloat = 60.0
20 | // Current refresh state, default is .pullToRefresh
21 | open var state: YYRefreshViewState = .pullToRefresh
22 |
23 | public init() {
24 | view = UIView()
25 | insets = UIEdgeInsets.zero
26 | }
27 |
28 | open func refreshAnimationBegin(view: YYRefreshComponent) {
29 | /// Do nothing!
30 | }
31 |
32 | open func refreshAnimationWillEnd(view: YYRefreshComponent) {
33 | /// Do nothing!
34 | }
35 |
36 | open func refreshAnimationEnd(view: YYRefreshComponent) {
37 | /// Do nothing!
38 | }
39 |
40 | open func refresh(view: YYRefreshComponent, progressDidChange progress: CGFloat) {
41 | /// Do nothing!
42 | }
43 |
44 | open func refresh(view: YYRefreshComponent, stateDidChange state: YYRefreshViewState) {
45 | /// Do nothing!
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading1.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading10.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading10.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading11.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading11.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading12.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading12.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading2.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading3.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading4.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading5.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading6.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading7.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading8.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_default_data_show_loading9.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_icon_pull_to_refresh_arrow@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_icon_pull_to_refresh_arrow@2x.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_nodata.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_nodata.png
--------------------------------------------------------------------------------
/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_nonetwork.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/usernameyangyan/CollectioniOS/d4e653c9547ac5252859d7ca12cdde8f212fa09b/collectionlibrary/resource/Collectionlibrary.bundle/collectionlibrary_nonetwork.png
--------------------------------------------------------------------------------
/collectionlibrary/utils/IPhoneUtils.swift:
--------------------------------------------------------------------------------
1 | //
2 | // iPhoneUtils.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/10/10.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 | //
9 | import UIKit
10 | open class IPhoneUtils{
11 | public static var BAR_HEIGHT:CGFloat=isIphoneX() ? 88 : 64
12 |
13 | //获取顶部导航栏高度
14 | static func getNavBarHeight()->CGFloat{
15 | return BAR_HEIGHT
16 | }
17 |
18 |
19 | //判断是否是iphonex以上
20 | public static func isIphoneX()-> Bool{
21 | let screenHeight = UIScreen.main.nativeBounds.size.height;
22 | if screenHeight == 2436 || screenHeight == 1792 || screenHeight == 2688 || screenHeight == 1624 {
23 | return true
24 | }
25 | return false
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/collectionlibrary/utils/Logger.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Logger.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/19.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public struct Logger {
12 | public static func _log(_ title: String, _ msg: T) {
13 | #if DEBUG
14 | print("\(title):\(msg)")
15 | #endif
16 | }
17 |
18 | public static func error(_ msg: T) {
19 | _log("error", msg)
20 | }
21 |
22 | public static func warnning(_ msg: T) {
23 | _log("warning", msg)
24 | }
25 |
26 |
27 | public static func info(_ msg: T) {
28 | _log("info", msg)
29 | }
30 | }
31 |
32 |
--------------------------------------------------------------------------------
/collectionlibrary/utils/NibLoadable.swift:
--------------------------------------------------------------------------------
1 | //
2 | // YYXibUtils.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/16.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | // 协议
12 | public protocol NibLoadable {
13 | // 具体实现写到extension内
14 | }
15 |
16 | extension NibLoadable where Self : UIView {
17 | public static func loadFromNib(_ nibname : String? = nil) -> Self {
18 | let loadName = nibname == nil ? "\(self)" : nibname!
19 | return Bundle.main.loadNibNamed(loadName, owner: nil, options: nil)?.first as! Self
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/collectionlibrary/utils/PositionSettingUtils.swift:
--------------------------------------------------------------------------------
1 | //
2 | // PositionSettingUtils.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/1/5.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 |
12 | public class PositionSettingUtils{
13 |
14 | public enum PositionStype : Int {
15 | case fixed
16 | case adaptive
17 | }
18 |
19 | public static func position(visibileHeight:CGFloat?=UIScreen.main.bounds.height,aboveView:UIView,childView:UIView,style:PositionStype){
20 |
21 | if(style == .adaptive){
22 | childView.frame=CGRect(x: childView.frame.origin.x, y: aboveView.frame.height+aboveView.frame.origin.y, width: childView.frame.width, height: childView.frame.height)
23 | }else{
24 | childView.frame=CGRect(x: childView.frame.origin.x, y: aboveView.frame.height+aboveView.frame.origin.y, width: childView.frame.width, height: visibileHeight!-aboveView.frame.height-aboveView.frame.origin.y)
25 | }
26 |
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/collectionlibrary/utils/UILabelPadding.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UILabelPadding.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2020/2/5.
6 | // Copyright © 2020 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public class UILabelPadding: UILabel {
12 |
13 | var topInset: CGFloat
14 | var bottomInset: CGFloat
15 | var leftInset: CGFloat
16 | var rightInset: CGFloat
17 |
18 | public required init(withInsets top: CGFloat, _ bottom: CGFloat,_ left: CGFloat,_ right: CGFloat) {
19 | self.topInset = top
20 | self.bottomInset = bottom
21 | self.leftInset = left
22 | self.rightInset = right
23 | super.init(frame: CGRect.zero)
24 | }
25 |
26 | public required init?(coder aDecoder: NSCoder) {
27 | fatalError("init(coder:) has not been implemented")
28 | }
29 |
30 | override public func drawText(in rect: CGRect) {
31 | let insets = UIEdgeInsets(top: topInset, left: leftInset, bottom: bottomInset, right: rightInset)
32 | super.drawText(in: rect.inset(by: insets))
33 | }
34 |
35 | override public var intrinsicContentSize: CGSize {
36 | get {
37 | var contentSize = super.intrinsicContentSize
38 | contentSize.height += topInset + bottomInset
39 | contentSize.width += leftInset + rightInset
40 | return contentSize
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/collectionlibrary/utils/UILabelUtils.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UILabelUtils.swift
3 | // CollectionLibrarySwift
4 | //
5 | // Created by Huatu on 2019/12/17.
6 | // Copyright © 2019 YoungManSter. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | public class UILabelUtils{
12 |
13 | //动态设置行高的方法
14 | public static func getLabHeigh(labelStr:String,font:UIFont,width:CGFloat,lineSpacing:CGFloat=0) -> CGFloat {
15 | let statusLabelText: NSString = labelStr as NSString
16 | //这里这个height随便给,设为0也可以
17 | let size = CGSize(width: width, height: 9999)
18 | //通过富文本来设置行间距
19 | let paraph = NSMutableParagraphStyle()
20 | //行间距设置
21 | paraph.lineSpacing = lineSpacing
22 | //样式属性集合
23 | let attributes = [NSAttributedString.Key.font:font,NSAttributedString.Key.paragraphStyle: paraph]
24 | //boundingRect函数只有NSString可以用
25 | let strSize = statusLabelText.boundingRect(with: size, options: .usesLineFragmentOrigin, attributes: attributes, context: nil)
26 | return strSize.height
27 |
28 | }
29 | }
30 |
--------------------------------------------------------------------------------