├── Podfile.lock ├── Pods ├── Manifest.lock ├── Target Support Files │ └── Pods-SSPlaceHolderTableView │ │ ├── Pods-SSPlaceHolderTableView.modulemap │ │ ├── Pods-SSPlaceHolderTableView-dummy.m │ │ ├── Pods-SSPlaceHolderTableView.debug.xcconfig │ │ ├── Pods-SSPlaceHolderTableView.release.xcconfig │ │ ├── Pods-SSPlaceHolderTableView-umbrella.h │ │ └── Pods-SSPlaceHolderTableView-Info.plist └── Pods.xcodeproj │ └── xcuserdata │ └── Ketan.Chopda.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── docs ├── img │ ├── gh.png │ ├── carat.png │ └── dash.png ├── docsets │ ├── .tgz │ └── .docset │ │ └── Contents │ │ ├── Resources │ │ ├── docSet.dsidx │ │ └── Documents │ │ │ ├── img │ │ │ ├── gh.png │ │ │ ├── carat.png │ │ │ └── dash.png │ │ │ ├── js │ │ │ └── jazzy.js │ │ │ ├── css │ │ │ ├── highlight.css │ │ │ └── jazzy.css │ │ │ ├── index.html │ │ │ ├── Global Variables.html │ │ │ ├── Protocols.html │ │ │ ├── Extensions │ │ │ ├── Notification.html │ │ │ ├── String.html │ │ │ └── Notification │ │ │ │ └── Name.html │ │ │ └── Protocols │ │ │ └── networkRechabilityProtocol.html │ │ └── Info.plist ├── badge.svg ├── js │ └── jazzy.js ├── css │ ├── highlight.css │ └── jazzy.css ├── index.html ├── Global Variables.html ├── Protocols.html ├── Extensions │ ├── Notification.html │ ├── String.html │ ├── Notification │ │ └── Name.html │ └── NSLayoutConstraint.html └── Protocols │ └── networkRechabilityProtocol.html ├── SSPlaceHolderTableView ├── Assets.xcassets │ ├── Contents.json │ ├── noData.imageset │ │ ├── no data.pdf │ │ └── Contents.json │ ├── loading.imageset │ │ ├── loading.pdf │ │ └── Contents.json │ ├── noInternet.imageset │ │ ├── no wifi.pdf │ │ └── Contents.json │ └── AppIcon.appiconset │ │ └── Contents.json ├── ScreenShot │ ├── TableView.png │ └── CollectionView.png ├── Example │ ├── LoadingTableView.swift │ ├── DataUnAvailablePlaceholderTableView.swift │ ├── DataAvailablePlaceholderTableView.swift │ ├── ExampleListViewController.swift │ ├── FullStateIn1VIewController │ │ ├── CollectionViewFullDemo.swift │ │ └── TableVIewFullDemo.swift │ └── NoInternetPlaceholder.swift ├── Library │ ├── Extensions.swift │ ├── NoDataView.swift │ ├── LoadingView.swift │ ├── NetworkUnavailableView.swift │ ├── CollectionView.swift │ └── TableView.swift ├── Info.plist ├── Base.lproj │ └── LaunchScreen.storyboard ├── AppDelegate.swift └── XIB │ ├── LoadingView.xib │ ├── NoDataView.xib │ └── NetworkUnavailableView.xib ├── .gitignore ├── SSPlaceHolderTableView.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── xcuserdata │ └── Ketan.Chopda.xcuserdatad │ └── xcschemes │ └── xcschememanagement.plist ├── SSPlaceHolderTableView.xcworkspace ├── xcuserdata │ └── Ketan.Chopda.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcshareddata │ └── IDEWorkspaceChecks.plist └── contents.xcworkspacedata ├── Podfile ├── LICENSE ├── SSPlaceHolderTableView.podspec └── README.md /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODFILE CHECKSUM: e0e15e8dc0b1797eb7a6b78958e56435c8214162 2 | 3 | COCOAPODS: 1.7.3 4 | -------------------------------------------------------------------------------- /Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODFILE CHECKSUM: e0e15e8dc0b1797eb7a6b78958e56435c8214162 2 | 3 | COCOAPODS: 1.7.3 4 | -------------------------------------------------------------------------------- /docs/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/docs/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/docs/docsets/.tgz -------------------------------------------------------------------------------- /docs/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/docs/img/carat.png -------------------------------------------------------------------------------- /docs/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/docs/img/dash.png -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Pods-SSPlaceHolderTableView.xcscheme 2 | Pods-SSPlaceHolderTableView-acknowledgements.markdown 3 | Pods-SSPlaceHolderTableView-acknowledgements.plist 4 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/ScreenShot/TableView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/SSPlaceHolderTableView/ScreenShot/TableView.png -------------------------------------------------------------------------------- /SSPlaceHolderTableView/ScreenShot/CollectionView.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/SSPlaceHolderTableView/ScreenShot/CollectionView.png -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/docSet.dsidx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/docs/docsets/.docset/Contents/Resources/docSet.dsidx -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/img/gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/docs/docsets/.docset/Contents/Resources/Documents/img/gh.png -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/img/carat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/docs/docsets/.docset/Contents/Resources/Documents/img/carat.png -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/img/dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/docs/docsets/.docset/Contents/Resources/Documents/img/dash.png -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Assets.xcassets/noData.imageset/no data.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/SSPlaceHolderTableView/Assets.xcassets/noData.imageset/no data.pdf -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Assets.xcassets/loading.imageset/loading.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/SSPlaceHolderTableView/Assets.xcassets/loading.imageset/loading.pdf -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Assets.xcassets/noInternet.imageset/no wifi.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/SSPlaceHolderTableView/Assets.xcassets/noInternet.imageset/no wifi.pdf -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SSPlaceHolderTableView/Pods-SSPlaceHolderTableView.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_SSPlaceHolderTableView { 2 | umbrella header "Pods-SSPlaceHolderTableView-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SSPlaceHolderTableView/Pods-SSPlaceHolderTableView-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_SSPlaceHolderTableView : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_SSPlaceHolderTableView 5 | @end 6 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView.xcworkspace/xcuserdata/Ketan.Chopda.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SimformSolutionsPvtLtd/SSPlaceHolderTableView/HEAD/SSPlaceHolderTableView.xcworkspace/xcuserdata/Ketan.Chopda.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Assets.xcassets/loading.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "loading.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Assets.xcassets/noData.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "no data.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Assets.xcassets/noInternet.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "no wifi.pdf" 6 | } 7 | ], 8 | "info" : { 9 | "version" : 1, 10 | "author" : "xcode" 11 | } 12 | } -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment the next line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | target 'SSPlaceHolderTableView' do 5 | # Comment the next line if you're not using Swift and don't want to use dynamic frameworks 6 | use_frameworks! 7 | 8 | # Pods for SSPlaceHolderTableView 9 | 10 | end 11 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SSPlaceHolderTableView/Pods-SSPlaceHolderTableView.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | PODS_BUILD_DIR = ${BUILD_DIR} 3 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 4 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 5 | PODS_ROOT = ${SRCROOT}/Pods 6 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SSPlaceHolderTableView/Pods-SSPlaceHolderTableView.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | PODS_BUILD_DIR = ${BUILD_DIR} 3 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 4 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/. 5 | PODS_ROOT = ${SRCROOT}/Pods 6 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SSPlaceHolderTableView/Pods-SSPlaceHolderTableView-umbrella.h: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #else 4 | #ifndef FOUNDATION_EXPORT 5 | #if defined(__cplusplus) 6 | #define FOUNDATION_EXPORT extern "C" 7 | #else 8 | #define FOUNDATION_EXPORT extern 9 | #endif 10 | #endif 11 | #endif 12 | 13 | 14 | FOUNDATION_EXPORT double Pods_SSPlaceHolderTableViewVersionNumber; 15 | FOUNDATION_EXPORT const unsigned char Pods_SSPlaceHolderTableViewVersionString[]; 16 | 17 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView.xcodeproj/xcuserdata/Ketan.Chopda.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | SSPlaceHolderTableView.xcscheme_^#shared#^_ 8 | 9 | orderHint 10 | 1 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /Pods/Pods.xcodeproj/xcuserdata/Ketan.Chopda.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Pods-SSPlaceHolderTableView.xcscheme 8 | 9 | isShown 10 | 11 | orderHint 12 | 0 13 | 14 | 15 | SuppressBuildableAutocreation 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | com.jazzy. 7 | CFBundleName 8 | 9 | DocSetPlatformFamily 10 | 11 | isDashDocset 12 | 13 | dashIndexFilePath 14 | index.html 15 | isJavaScriptEnabled 16 | 17 | DashDocSetFamily 18 | dashtoc 19 | 20 | 21 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Example/LoadingTableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoadingTableView.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 11/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class LoadingTableView: UIViewController { 12 | 13 | @IBOutlet weak var tblView: TableView! 14 | 15 | var reachability: Reachability! 16 | var isForNoData: Bool = false 17 | 18 | override func viewDidLoad() { 19 | super.viewDidLoad() 20 | // tblView.centerOffSetMultiplier = 0.35 // Change multiplier if you want ot change vertical position of placeHolder Image. 21 | 22 | /// - parameter loadingImg: Set Your own loading Image instead use default image. 23 | /// - parameter loadingLabelTitle: Set Your own loading title instead use default title. 24 | self.tblView.setState(.loading(loadingImg: nil, loadingLabelTitle: nil)) 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /Pods/Target Support Files/Pods-SSPlaceHolderTableView/Pods-SSPlaceHolderTableView-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | ${PRODUCT_BUNDLE_IDENTIFIER} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Example/DataUnAvailablePlaceholderTableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataUnAvailablePlaceholderTableView.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 11/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class DataUnAvailablePlaceholderTableView: UIViewController { 12 | 13 | @IBOutlet weak var tblView: TableView! 14 | var reachability: Reachability! 15 | var isForNoData: Bool = false 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | // tblView.centerOffSetMultiplier = 0.35 // Change multiplier if you want ot change vertical position of placeHolder Image. 20 | 21 | /// - parameter noDataImg: Set Your own No Data state Image instead use default image. 22 | /// - parameter noDataLabelTitle: Set Your own No data State title instead use default title. 23 | self.tblView.setState(.noDataAvailable(noDataImg: nil, noDataLabelTitle: nil)) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Simform 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/badge.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | documentation 17 | 18 | 19 | documentation 20 | 21 | 22 | 3% 23 | 24 | 25 | 3% 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Library/Extensions.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Extensions.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 21/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | extension NSLayoutConstraint { 12 | /** 13 | Change multiplier constraint 14 | 15 | - parameter multiplier: CGFloat 16 | - returns: NSLayoutConstraint 17 | */ 18 | func setMultiplier(multiplier:CGFloat) -> NSLayoutConstraint { 19 | 20 | NSLayoutConstraint.deactivate([self]) 21 | 22 | let newConstraint = NSLayoutConstraint( 23 | item: firstItem!, 24 | attribute: firstAttribute, 25 | relatedBy: relation, 26 | toItem: secondItem, 27 | attribute: secondAttribute, 28 | multiplier: multiplier, 29 | constant: constant) 30 | 31 | newConstraint.priority = priority 32 | newConstraint.shouldBeArchived = self.shouldBeArchived 33 | newConstraint.identifier = self.identifier 34 | 35 | NSLayoutConstraint.activate([newConstraint]) 36 | return newConstraint 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Library/NoDataView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NoDataView.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 16/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class NoDataView: UIView { 12 | 13 | @IBOutlet weak var noDataImage: UIImageView! 14 | @IBOutlet weak var lblNoDataTitle: UILabel! 15 | @IBOutlet weak var constImageCenterOffset: NSLayoutConstraint! 16 | 17 | var noDataTitleText: NSAttributedString? { 18 | didSet { 19 | lblNoDataTitle.attributedText = self.noDataTitleText 20 | } 21 | } 22 | 23 | var noDataImg: UIImage? { 24 | didSet { 25 | noDataImage.image = self.noDataImg 26 | } 27 | } 28 | 29 | class func instanceFromNib() -> NoDataView { 30 | let vw = UINib(nibName: "NoDataView", bundle: Bundle(for: self.classForCoder())).instantiate(withOwner: nil, options: nil).first as! NoDataView 31 | return vw 32 | } 33 | 34 | override public func awakeFromNib() { 35 | super.awakeFromNib() 36 | constImageCenterOffset = constImageCenterOffset.setMultiplier(multiplier: gCenterOffSetMultiplier) 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Library/LoadingView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // LoadingView.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 16/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class LoadingView: UIView { 12 | 13 | @IBOutlet weak var loadingImage: UIImageView! 14 | @IBOutlet weak var lblLoadingTitle: UILabel! 15 | @IBOutlet weak var constImageCenterOffset: NSLayoutConstraint! 16 | 17 | var loadingTitleText: NSAttributedString? { 18 | didSet { 19 | lblLoadingTitle.attributedText = self.loadingTitleText 20 | } 21 | } 22 | 23 | var loadingImg: UIImage? { 24 | didSet { 25 | loadingImage.image = self.loadingImg 26 | } 27 | } 28 | 29 | 30 | class func instanceFromNib() -> LoadingView { 31 | let bundle = Bundle(for: self.classForCoder()) 32 | let vw = UINib(nibName: "LoadingView", bundle: bundle).instantiate(withOwner: nil, options: nil).first as! LoadingView 33 | return vw 34 | } 35 | 36 | override public func awakeFromNib() { 37 | super.awakeFromNib() 38 | constImageCenterOffset = constImageCenterOffset.setMultiplier(multiplier: gCenterOffSetMultiplier) 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Example/DataAvailablePlaceholderTableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DataAvailablePlaceholderTableView.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 11/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class DataAvailablePlaceholderTableView: UIViewController { 12 | 13 | @IBOutlet weak var tblView: TableView! 14 | var reachability: Reachability! 15 | var isForNoData: Bool = false 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | // tblView.centerOffSetMultiplier = 0.35 // Change multiplier if you want ot change vertical position of placeHolder Image. 20 | 21 | self.tblView.setState(.dataAvailable(viewController: self)) 22 | } 23 | 24 | } 25 | 26 | extension DataAvailablePlaceholderTableView : UITableViewDelegate, UITableViewDataSource { 27 | 28 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 29 | return 5 30 | } 31 | 32 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 33 | let cell = tableView.dequeueReusableCell(withIdentifier: "availableCell") 34 | if let lbl = cell?.viewWithTag(100) as? UILabel { 35 | lbl.text = "\(indexPath.row)" 36 | } 37 | return cell! 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /docs/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/js/jazzy.js: -------------------------------------------------------------------------------- 1 | window.jazzy = {'docset': false} 2 | if (typeof window.dash != 'undefined') { 3 | document.documentElement.className += ' dash' 4 | window.jazzy.docset = true 5 | } 6 | if (navigator.userAgent.match(/xcode/i)) { 7 | document.documentElement.className += ' xcode' 8 | window.jazzy.docset = true 9 | } 10 | 11 | // On doc load, toggle the URL hash discussion if present 12 | $(document).ready(function() { 13 | if (!window.jazzy.docset) { 14 | var linkToHash = $('a[href="' + window.location.hash +'"]'); 15 | linkToHash.trigger("click"); 16 | } 17 | }); 18 | 19 | // On token click, toggle its discussion and animate token.marginLeft 20 | $(".token").click(function(event) { 21 | if (window.jazzy.docset) { 22 | return; 23 | } 24 | var link = $(this); 25 | var animationDuration = 300; 26 | var tokenOffset = "15px"; 27 | var original = link.css('marginLeft') == tokenOffset; 28 | link.animate({'margin-left':original ? "0px" : tokenOffset}, animationDuration); 29 | $content = link.parent().parent().next(); 30 | $content.slideToggle(animationDuration); 31 | 32 | // Keeps the document from jumping to the hash. 33 | var href = $(this).attr('href'); 34 | if (history.pushState) { 35 | history.pushState({}, '', href); 36 | } else { 37 | location.hash = href; 38 | } 39 | event.preventDefault(); 40 | }); 41 | 42 | // Dumb down quotes within code blocks that delimit strings instead of quotations 43 | // https://github.com/realm/jazzy/issues/714 44 | $("code q").replaceWith(function () { 45 | return ["\"", $(this).contents(), "\""]; 46 | }); 47 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Example/ExampleListViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ExampleListViewController.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 08/04/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ExampleListViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view. 16 | } 17 | } 18 | 19 | extension ExampleListViewController : UITableViewDelegate, UITableViewDataSource { 20 | 21 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 22 | return 4 23 | } 24 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 25 | switch indexPath.row { 26 | case 0: 27 | let cell = tableView.dequeueReusableCell(withIdentifier: "loadingCell") 28 | 29 | return cell! 30 | case 1: 31 | let cell = tableView.dequeueReusableCell(withIdentifier: "dataAvaiLableCell") 32 | 33 | return cell! 34 | case 2: 35 | let cell = tableView.dequeueReusableCell(withIdentifier: "dataUnAvaiLableCell") 36 | 37 | return cell! 38 | case 3: 39 | let cell = tableView.dequeueReusableCell(withIdentifier: "internetCell") 40 | 41 | return cell! 42 | default: 43 | let cell = tableView.dequeueReusableCell(withIdentifier: "internetCell") 44 | 45 | return cell! 46 | } 47 | 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/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 | APPL 17 | CFBundleShortVersionString 18 | 1.0.2 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarHidden 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/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 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Library/NetworkUnavailableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkUnavailableView.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 16/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class NetworkUnavailableView: UIView { 12 | 13 | @IBOutlet weak var noInternetImage: UIImageView! 14 | @IBOutlet weak var lblNoInternetTitle: UILabel! 15 | @IBOutlet var lblNoInternetSubtitle: UILabel! 16 | @IBOutlet var btnTryAgain: UIButton! 17 | @IBOutlet weak var constImageCenterOffset: NSLayoutConstraint! 18 | 19 | var noInternetTitleText: NSAttributedString? { 20 | didSet { 21 | lblNoInternetTitle.attributedText = self.noInternetTitleText 22 | } 23 | } 24 | 25 | var noInternetSubTitleText: NSAttributedString? { 26 | didSet { 27 | lblNoInternetSubtitle.attributedText = self.noInternetSubTitleText 28 | } 29 | } 30 | 31 | var noInternetImg: UIImage? { 32 | didSet { 33 | noInternetImage.image = self.noInternetImg 34 | } 35 | } 36 | 37 | class func instanceFromNib() -> NetworkUnavailableView { 38 | let bundle = Bundle(for: self.classForCoder()) 39 | let vw = UINib(nibName: "NetworkUnavailableView", bundle: bundle).instantiate(withOwner: nil, options: nil).first as! NetworkUnavailableView 40 | return vw 41 | } 42 | 43 | override func awakeFromNib() { 44 | super.awakeFromNib() 45 | constImageCenterOffset = constImageCenterOffset.setMultiplier(multiplier: gCenterOffSetMultiplier) 46 | btnTryAgain.layer.cornerRadius = 5.0 47 | btnTryAgain.layer.borderWidth = 1.0 48 | btnTryAgain.layer.borderColor = UIColor.darkGray.cgColor 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | }, 88 | { 89 | "idiom" : "ios-marketing", 90 | "size" : "1024x1024", 91 | "scale" : "1x" 92 | } 93 | ], 94 | "info" : { 95 | "version" : 1, 96 | "author" : "xcode" 97 | } 98 | } -------------------------------------------------------------------------------- /SSPlaceHolderTableView/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 11/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | return true 20 | } 21 | 22 | func applicationWillResignActive(_ application: UIApplication) { 23 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 24 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 25 | } 26 | 27 | func applicationDidEnterBackground(_ application: UIApplication) { 28 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 30 | } 31 | 32 | func applicationWillEnterForeground(_ application: UIApplication) { 33 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 34 | } 35 | 36 | func applicationDidBecomeActive(_ application: UIApplication) { 37 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 38 | } 39 | 40 | func applicationWillTerminate(_ application: UIApplication) { 41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 42 | } 43 | 44 | 45 | } 46 | 47 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Example/FullStateIn1VIewController/CollectionViewFullDemo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CollectionViewFullDemo.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 11/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CollectionViewFullDemo: UIViewController { 12 | 13 | @IBOutlet weak var collectionView: CollectionView! 14 | var reachability: Reachability! 15 | var isForNoData: Bool = false 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | collectionView.networkUnReachableBlock = { 20 | // put your network Call here. 21 | self.callAPI(isForNoData: self.isForNoData) 22 | } 23 | } 24 | 25 | @IBAction func btnActionNoDataAPi(_ sender: Any) { 26 | isForNoData = true 27 | callAPI(isForNoData: isForNoData) 28 | } 29 | 30 | @IBAction func btnActionDataApi(_ sender: Any) { 31 | isForNoData = false 32 | callAPI(isForNoData: isForNoData) 33 | } 34 | 35 | } 36 | extension CollectionViewFullDemo { 37 | func callAPI(isForNoData: Bool) { 38 | reachability = Reachability()! 39 | if reachability.connection != .none { 40 | self.collectionView.setState(.loading(loadingImg: nil, loadingLabelTitle: nil)) 41 | let urlString : String = "https://jsonplaceholder.typicode.com/comments?postId=\(isForNoData ? 0 : 1)" 42 | let url = URL(string: urlString) 43 | var request = URLRequest(url: url!) 44 | request.httpMethod = "GET" 45 | request.addValue("application/json", forHTTPHeaderField: "Content-Type") 46 | let session = URLSession.shared 47 | let task = session.dataTask(with: request, completionHandler: { data, response, error -> Void in 48 | do { 49 | let arrJson = try JSONSerialization.jsonObject(with: data!) as! [[String: Any]] 50 | print(arrJson) 51 | DispatchQueue.main.async { 52 | if arrJson.count > 0 { 53 | self.collectionView.setState(.dataAvailable(viewController: self)) 54 | } else { 55 | self.collectionView.setState(.noDataAvailable(noDataImg: nil, noDataLabelTitle: nil)) 56 | } 57 | } 58 | } catch { 59 | print("error") 60 | } 61 | }) 62 | task.resume() 63 | } else { 64 | self.collectionView.setState(.checkInternetAvaibility(noInternetImg: nil, noInternetLabelTitle: nil)) 65 | } 66 | 67 | } 68 | 69 | 70 | 71 | } 72 | extension CollectionViewFullDemo : UICollectionViewDelegate, UICollectionViewDataSource { 73 | func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { 74 | return 5 75 | } 76 | 77 | func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { 78 | let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "collectionCell", for: indexPath) 79 | return cell 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Example/FullStateIn1VIewController/TableVIewFullDemo.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TableVIewFullDemo.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 11/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class TableVIewFullDemo: UIViewController { 12 | 13 | @IBOutlet weak var tblView: TableView! 14 | var reachability: Reachability! 15 | var isForNoData: Bool = false 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | tblView.networkUnReachableBlock = { 20 | // put your network Call here. 21 | self.callAPI(isForNoData: self.isForNoData) 22 | } 23 | // tblView.centerOffSetMultiplier = 0.35 // Change multiplier if you want ot change vertical position of placeHolder Image. 24 | } 25 | 26 | @IBAction func btnActionNoDataAPi(_ sender: Any) { 27 | isForNoData = true 28 | callAPI(isForNoData: isForNoData) 29 | } 30 | 31 | @IBAction func btnActionDataApi(_ sender: Any) { 32 | isForNoData = false 33 | callAPI(isForNoData: isForNoData) 34 | } 35 | 36 | } 37 | 38 | extension TableVIewFullDemo { 39 | func callAPI(isForNoData: Bool) { 40 | reachability = Reachability()! 41 | if reachability.connection != .none { 42 | self.tblView.setState(.loading(loadingImg: nil, loadingLabelTitle: nil)) 43 | let urlString : String = "https://jsonplaceholder.typicode.com/comments?postId=\(isForNoData ? 0 : 1)" 44 | let url = URL(string: urlString) 45 | var request = URLRequest(url: url!) 46 | request.httpMethod = "GET" 47 | request.addValue("application/json", forHTTPHeaderField: "Content-Type") 48 | let session = URLSession.shared 49 | let task = session.dataTask(with: request, completionHandler: { data, response, error -> Void in 50 | do { 51 | let arrJson = try JSONSerialization.jsonObject(with: data!) as! [[String: Any]] 52 | print(arrJson) 53 | DispatchQueue.main.async { 54 | if arrJson.count > 0 { 55 | self.tblView.setState(.dataAvailable(viewController: self)) 56 | } else { 57 | self.tblView.setState(.noDataAvailable(noDataImg: nil, noDataLabelTitle: nil)) 58 | } 59 | } 60 | } catch { 61 | print("error") 62 | } 63 | }) 64 | task.resume() 65 | } else { 66 | self.tblView.setState(.checkInternetAvaibility(noInternetImg: nil, noInternetLabelTitle: nil)) 67 | } 68 | 69 | } 70 | 71 | } 72 | extension TableVIewFullDemo : UITableViewDelegate, UITableViewDataSource { 73 | func numberOfSections(in tableView: UITableView) -> Int { 74 | return 2 75 | } 76 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 77 | return 5 78 | } 79 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 80 | let cell = tableView.dequeueReusableCell(withIdentifier: "cell") 81 | 82 | return cell! 83 | } 84 | func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { 85 | return 50 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView.podspec: -------------------------------------------------------------------------------- 1 | # 2 | # Be sure to run `pod spec lint SSPlaceHolderTableView.podspec' to ensure this is a 3 | # valid spec and to remove all comments including this before submitting the spec. 4 | # 5 | # To learn more about Podspec attributes see https://docs.cocoapods.org/specification.html 6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/ 7 | # 8 | 9 | Pod::Spec.new do |spec| 10 | 11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 12 | # 13 | # These will help people to find your library, and whilst it 14 | # can feel like a chore to fill in it's definitely to your advantage. The 15 | # summary should be tweet-length, and the description more in depth. 16 | # 17 | 18 | spec.name = "SSPlaceHolderTableView" 19 | spec.version = "2.0.1" 20 | spec.summary = "This is for Placeholder in tableview." 21 | 22 | # This description is used to generate tags and improve search results. 23 | # * Think: What does it do? Why did you write it? What is the focus? 24 | # * Try to keep it short, snappy and to the point. 25 | # * Write the description between the DESC delimiters below. 26 | # * Finally, don't worry about the indent, CocoaPods strips it! 27 | spec.description = "This is for Placeholder in tableview.By using this you can easily add placeholder view in tableview." 28 | 29 | spec.homepage = "https://github.com/simformsolutions/SSPlaceHolderTableView" 30 | # spec.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif" 31 | 32 | 33 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 34 | # 35 | # Licensing your code is important. See https://choosealicense.com for more info. 36 | # CocoaPods will detect a license file if there is a named LICENSE* 37 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'. 38 | # 39 | 40 | spec.license = "MIT (example)" 41 | spec.license = { :type => "MIT", :file => "LICENSE" } 42 | 43 | 44 | 45 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 46 | # 47 | # Specify the authors of the library, with email addresses. Email addresses 48 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also 49 | # accepts just a name if you'd rather not provide an email address. 50 | # 51 | # Specify a social_media_url where others can refer to, for example a twitter 52 | # profile URL. 53 | # 54 | 55 | spec.author = { "Vishal Patel" => "vishal.p@simformsolutions.com" } 56 | 57 | spec.platform = :ios 58 | spec.ios.deployment_target = "11.0" 59 | spec.swift_version = '5.0' 60 | 61 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 62 | # 63 | # Specify the location from where the source should be retrieved. 64 | # Supports git, hg, bzr, svn and HTTP. 65 | # 66 | 67 | spec.source = { :git => "https://github.com/simformsolutions/SSPlaceHolderTableView.git", :tag => "#{spec.version}" } 68 | 69 | 70 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― # 71 | # 72 | # CocoaPods is smart about how it includes source code. For source files 73 | # giving a folder will include any swift, h, m, mm, c & cpp files. 74 | # For header files it will include any header in the folder. 75 | # Not including the public_header_files will make all headers public. 76 | # 77 | 78 | spec.source_files = 'SSPlaceHolderTableView/Library/*.swift' 79 | spec.resources = ['SSPlaceHolderTableView/XIB/*.xib','SSPlaceHolderTableView/Assets.xcassets'] 80 | spec.documentation_url = 'docs/index.html' 81 | 82 | end 83 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SSPlaceHolderTableView 2 | 3 | > This is simple, customized and easy state wise PlaceHolder for TableView and CollectionView. 4 | 5 | [![Version](https://img.shields.io/cocoapods/v/SSPlaceHolderTableView.svg?style=flat)](https://cocoapods.org/pods/SSPlaceHolderTableView) 6 | [![License][license-image]][license-url] 7 | [![Platform](https://img.shields.io/cocoapods/p/SSPlaceHolderTableView.svg?style=flat)](https://cocoapods.org/pods/SSPlaceHolderTableView) 8 | [![Swift Version][swift-image]][swift-url] 9 | [![PRs Welcome][PR-image]][PR-url] 10 | 11 | ![Example](https://media.giphy.com/media/TL6hrx7L4YUXh8HnnX/giphy.gif) 12 | ## Requirements 13 | 14 | - iOS 11.0+ 15 | - Xcode 10.0+ 16 | 17 | ## Installation 18 | SSPlaceHolderTableView doesn't contain any external dependencies. 19 | 20 | It is available through [CocoaPods](https://cocoapods.org/pods/SSPlaceHolderTableView). To install 21 | it, simply add the following line to your Podfile: 22 | 23 | ```ruby 24 | pod 'SSPlaceHolderTableView' 25 | ``` 26 | 27 | ## Usage example 28 | 29 | ### Set UITableView to TableView 30 | ![alt text](https://raw.githubusercontent.com/simformsolutions/SSPlaceHolderTableView/master/SSPlaceHolderTableView/ScreenShot/TableView.png) 31 | 32 | 33 | ### Set UICollectionView to CollectionView 34 | ![alt text](https://raw.githubusercontent.com/simformsolutions/SSPlaceHolderTableView/master/SSPlaceHolderTableView/ScreenShot/CollectionView.png) 35 | 36 | ### Set TableView State to Use Placeholder TableView 37 | 38 | ## Usage example 39 | 40 | **NetworkUnReachableBlock** 41 | - If you want to use inbuild Reachability for API call, You can simply add your API call inside this networkUnReachableBlock. 42 | - Put this code in *viewDidLoad* 43 | 44 | 45 | tblView.networkUnReachableBlock = { 46 | // put your API Call here. 47 | } 48 | 49 | **Loading State** 50 | - You can put this state before your API call or data collecting method. 51 | - **Customisation**: In loadingImg param, You can pass your custom image and in loadingLabelTitle you can pass your custom attributed string. 52 | 53 | 54 | tblView.setState(.loading(loadingImg: nil, loadingLabelTitle: nil)) 55 | 56 | **Data Available State** 57 | - When your data successfully available simply put this line in your code. 58 | 59 | 60 | tblView.setState(.dataAvailable(viewController: self)) 61 | 62 | **Data UnAvailable State** 63 | - When your data not available simply put this line in your code. 64 | - **Customisation**: In noDataImg param, You can pass your custom image for no data and in noDataLabelTitle you can pass your custom attributed string. 65 | 66 | 67 | tblView.setState(.noDataAvailable(noDataImg: nil, noDataLabelTitle: nil)) 68 | **No Internet available State** 69 | - When Internet is not available put this line. 70 | - **Customisation**: In noInternetImg param You can pass your custom image for no internet state and in noInternetLabelTitle you can pass your custom attributed string. 71 | 72 | 73 | tblView.setState(.checkInternetAvaibility(noInternetImg: nil, noInternetLabelTitle: nil)) 74 | ## NOTE 75 | - If you want to use this in UICollectionView Simply replace your collectionView object with tblView in above codes. 76 | 77 | ## Contribute 78 | 79 | We would love you for the contribution to SSPlaceHolderTableView, check the LICENSE file for more info. 80 | 81 | ## License 82 | 83 | SSPlaceHolderTableView is Distributed under the MIT license. See ``LICENSE`` for more information.. 84 | 85 | 86 | [PR-image]:https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square 87 | [PR-url]:http://makeapullrequest.com 88 | [swift-image]:https://img.shields.io/badge/swift-4.2-orange.svg 89 | [swift-url]: https://swift.org/ 90 | [license-image]: https://img.shields.io/badge/License-MIT-blue.svg 91 | [license-url]: LICENSE 92 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Example/NoInternetPlaceholder.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NoInternetPlaceholder.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 11/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class NoInternetPlaceholder: UIViewController { 12 | 13 | @IBOutlet weak var tblView: TableView! 14 | var reachability: Reachability! 15 | var isForNoData: Bool = false 16 | 17 | override func viewDidLoad() { 18 | super.viewDidLoad() 19 | tblView.networkUnReachableBlock = { 20 | // This is your retry button callBack, put your network Call here. 21 | self.callAPI(isForNoData: self.isForNoData) 22 | } 23 | // tblView.centerOffSetMultiplier = 0.35 // Change multiplier if you want ot change vertical position of placeHolder Image. 24 | 25 | /// - parameter noInternetImg: Set Your own No Internet state Image instead use default image. 26 | /// - parameter noInternetLabelTitle: Set Your own No Internet State title instead use default title. 27 | self.tblView.setState(.checkInternetAvaibility(noInternetImg: nil, noInternetLabelTitle: nil)) 28 | } 29 | 30 | @IBAction func btnActionNoDataAPi(_ sender: Any) { 31 | isForNoData = true 32 | callAPI(isForNoData: isForNoData) 33 | } 34 | 35 | @IBAction func btnActionDataApi(_ sender: Any) { 36 | isForNoData = false 37 | callAPI(isForNoData: isForNoData) 38 | } 39 | 40 | } 41 | 42 | extension NoInternetPlaceholder { 43 | func callAPI(isForNoData: Bool) { 44 | reachability = Reachability()! 45 | if reachability.connection != .none { 46 | self.tblView.setState(.loading(loadingImg: nil, loadingLabelTitle: nil)) 47 | let urlString : String = "https://jsonplaceholder.typicode.com/comments?postId=\(isForNoData ? 0 : 1)" 48 | let url = URL(string: urlString) 49 | var request = URLRequest(url: url!) 50 | request.httpMethod = "GET" 51 | request.addValue("application/json", forHTTPHeaderField: "Content-Type") 52 | let session = URLSession.shared 53 | let task = session.dataTask(with: request, completionHandler: { data, response, error -> Void in 54 | do { 55 | let arrJson = try JSONSerialization.jsonObject(with: data!) as! [[String: Any]] 56 | print(arrJson) 57 | DispatchQueue.main.async { 58 | if arrJson.count > 0 { 59 | self.tblView.setState(.dataAvailable(viewController: self)) 60 | } else { 61 | self.tblView.setState(.noDataAvailable(noDataImg: nil, noDataLabelTitle: nil)) 62 | } 63 | } 64 | } catch { 65 | print("error") 66 | } 67 | }) 68 | task.resume() 69 | } else { 70 | self.tblView.setState(.checkInternetAvaibility(noInternetImg: nil, noInternetLabelTitle: nil)) 71 | } 72 | 73 | } 74 | 75 | } 76 | extension NoInternetPlaceholder : UITableViewDelegate, UITableViewDataSource { 77 | func numberOfSections(in tableView: UITableView) -> Int { 78 | return 2 79 | } 80 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 81 | return 2 82 | } 83 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { 84 | let cell = tableView.dequeueReusableCell(withIdentifier: "cell") 85 | return cell! 86 | } 87 | func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat { 88 | return 50 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/XIB/LoadingView.xib: -------------------------------------------------------------------------------- 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 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /docs/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/css/highlight.css: -------------------------------------------------------------------------------- 1 | /* Credit to https://gist.github.com/wataru420/2048287 */ 2 | .highlight { 3 | /* Comment */ 4 | /* Error */ 5 | /* Keyword */ 6 | /* Operator */ 7 | /* Comment.Multiline */ 8 | /* Comment.Preproc */ 9 | /* Comment.Single */ 10 | /* Comment.Special */ 11 | /* Generic.Deleted */ 12 | /* Generic.Deleted.Specific */ 13 | /* Generic.Emph */ 14 | /* Generic.Error */ 15 | /* Generic.Heading */ 16 | /* Generic.Inserted */ 17 | /* Generic.Inserted.Specific */ 18 | /* Generic.Output */ 19 | /* Generic.Prompt */ 20 | /* Generic.Strong */ 21 | /* Generic.Subheading */ 22 | /* Generic.Traceback */ 23 | /* Keyword.Constant */ 24 | /* Keyword.Declaration */ 25 | /* Keyword.Pseudo */ 26 | /* Keyword.Reserved */ 27 | /* Keyword.Type */ 28 | /* Literal.Number */ 29 | /* Literal.String */ 30 | /* Name.Attribute */ 31 | /* Name.Builtin */ 32 | /* Name.Class */ 33 | /* Name.Constant */ 34 | /* Name.Entity */ 35 | /* Name.Exception */ 36 | /* Name.Function */ 37 | /* Name.Namespace */ 38 | /* Name.Tag */ 39 | /* Name.Variable */ 40 | /* Operator.Word */ 41 | /* Text.Whitespace */ 42 | /* Literal.Number.Float */ 43 | /* Literal.Number.Hex */ 44 | /* Literal.Number.Integer */ 45 | /* Literal.Number.Oct */ 46 | /* Literal.String.Backtick */ 47 | /* Literal.String.Char */ 48 | /* Literal.String.Doc */ 49 | /* Literal.String.Double */ 50 | /* Literal.String.Escape */ 51 | /* Literal.String.Heredoc */ 52 | /* Literal.String.Interpol */ 53 | /* Literal.String.Other */ 54 | /* Literal.String.Regex */ 55 | /* Literal.String.Single */ 56 | /* Literal.String.Symbol */ 57 | /* Name.Builtin.Pseudo */ 58 | /* Name.Variable.Class */ 59 | /* Name.Variable.Global */ 60 | /* Name.Variable.Instance */ 61 | /* Literal.Number.Integer.Long */ } 62 | .highlight .c { 63 | color: #999988; 64 | font-style: italic; } 65 | .highlight .err { 66 | color: #a61717; 67 | background-color: #e3d2d2; } 68 | .highlight .k { 69 | color: #000000; 70 | font-weight: bold; } 71 | .highlight .o { 72 | color: #000000; 73 | font-weight: bold; } 74 | .highlight .cm { 75 | color: #999988; 76 | font-style: italic; } 77 | .highlight .cp { 78 | color: #999999; 79 | font-weight: bold; } 80 | .highlight .c1 { 81 | color: #999988; 82 | font-style: italic; } 83 | .highlight .cs { 84 | color: #999999; 85 | font-weight: bold; 86 | font-style: italic; } 87 | .highlight .gd { 88 | color: #000000; 89 | background-color: #ffdddd; } 90 | .highlight .gd .x { 91 | color: #000000; 92 | background-color: #ffaaaa; } 93 | .highlight .ge { 94 | color: #000000; 95 | font-style: italic; } 96 | .highlight .gr { 97 | color: #aa0000; } 98 | .highlight .gh { 99 | color: #999999; } 100 | .highlight .gi { 101 | color: #000000; 102 | background-color: #ddffdd; } 103 | .highlight .gi .x { 104 | color: #000000; 105 | background-color: #aaffaa; } 106 | .highlight .go { 107 | color: #888888; } 108 | .highlight .gp { 109 | color: #555555; } 110 | .highlight .gs { 111 | font-weight: bold; } 112 | .highlight .gu { 113 | color: #aaaaaa; } 114 | .highlight .gt { 115 | color: #aa0000; } 116 | .highlight .kc { 117 | color: #000000; 118 | font-weight: bold; } 119 | .highlight .kd { 120 | color: #000000; 121 | font-weight: bold; } 122 | .highlight .kp { 123 | color: #000000; 124 | font-weight: bold; } 125 | .highlight .kr { 126 | color: #000000; 127 | font-weight: bold; } 128 | .highlight .kt { 129 | color: #445588; } 130 | .highlight .m { 131 | color: #009999; } 132 | .highlight .s { 133 | color: #d14; } 134 | .highlight .na { 135 | color: #008080; } 136 | .highlight .nb { 137 | color: #0086B3; } 138 | .highlight .nc { 139 | color: #445588; 140 | font-weight: bold; } 141 | .highlight .no { 142 | color: #008080; } 143 | .highlight .ni { 144 | color: #800080; } 145 | .highlight .ne { 146 | color: #990000; 147 | font-weight: bold; } 148 | .highlight .nf { 149 | color: #990000; } 150 | .highlight .nn { 151 | color: #555555; } 152 | .highlight .nt { 153 | color: #000080; } 154 | .highlight .nv { 155 | color: #008080; } 156 | .highlight .ow { 157 | color: #000000; 158 | font-weight: bold; } 159 | .highlight .w { 160 | color: #bbbbbb; } 161 | .highlight .mf { 162 | color: #009999; } 163 | .highlight .mh { 164 | color: #009999; } 165 | .highlight .mi { 166 | color: #009999; } 167 | .highlight .mo { 168 | color: #009999; } 169 | .highlight .sb { 170 | color: #d14; } 171 | .highlight .sc { 172 | color: #d14; } 173 | .highlight .sd { 174 | color: #d14; } 175 | .highlight .s2 { 176 | color: #d14; } 177 | .highlight .se { 178 | color: #d14; } 179 | .highlight .sh { 180 | color: #d14; } 181 | .highlight .si { 182 | color: #d14; } 183 | .highlight .sx { 184 | color: #d14; } 185 | .highlight .sr { 186 | color: #009926; } 187 | .highlight .s1 { 188 | color: #d14; } 189 | .highlight .ss { 190 | color: #990073; } 191 | .highlight .bp { 192 | color: #999999; } 193 | .highlight .vc { 194 | color: #008080; } 195 | .highlight .vg { 196 | color: #008080; } 197 | .highlight .vi { 198 | color: #008080; } 199 | .highlight .il { 200 | color: #009999; } 201 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/XIB/NoDataView.xib: -------------------------------------------------------------------------------- 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 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Docs (3% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 113 |
114 |
115 |
116 | 117 |

Authors

118 | 119 |
120 |
121 | 125 |
126 |
127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 |

Docs (3% documented)

17 |
18 |
19 |
20 | 25 |
26 |
27 | 113 |
114 |
115 |
116 | 117 |

Authors

118 | 119 |
120 |
121 | 125 |
126 |
127 | 128 | 129 | 130 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Library/CollectionView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CollectionView.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 11/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public class CollectionView: UICollectionView { 12 | 13 | var objLoadingView: LoadingView? 14 | var objNoDataView: NoDataView? 15 | var objNetworkUnavailableView: NetworkUnavailableView? 16 | var networkUnReachableBlock: (() -> Void)? 17 | 18 | override public init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) { 19 | super.init(frame: frame, collectionViewLayout: layout) 20 | setUpCollectionView() 21 | } 22 | 23 | required public init?(coder aDecoder: NSCoder) { 24 | super.init(coder : aDecoder) 25 | setUpCollectionView() 26 | } 27 | 28 | private func setUpCollectionView() { 29 | objLoadingView = LoadingView.instanceFromNib() 30 | objNoDataView = NoDataView.instanceFromNib() 31 | objNetworkUnavailableView = NetworkUnavailableView.instanceFromNib() 32 | } 33 | 34 | public func setState(_ state: SSPlaceHolderStates) { 35 | switch state { 36 | case .dataAvailable(let viewController): 37 | hideLoadinTableView(controller: viewController) 38 | case .noDataAvailable(let noDataImg, let noDataLabelTitle): 39 | showNoDataPlaceHolder(noDataImg: noDataImg, noDataLabelTitle: noDataLabelTitle, customView: nil) 40 | case .noDataAvailableWithCustomView(let customView): 41 | showNoDataPlaceHolder(noDataImg: nil, noDataLabelTitle: nil, customView: customView) 42 | case .loading(let img, let title): 43 | showLoadingTableView(loadingImg: img, loadingLabelTitle: title, customView: nil) 44 | case .loadingWithCustomView(let customView): 45 | showLoadingTableView(loadingImg: nil, loadingLabelTitle: nil, customView: customView) 46 | case .checkInternetAvaibility(let noInternetImg, let noInternetLabelTitle): 47 | checkInternetAndShowView(noInternetImg: noInternetImg, noInternetLabelTitle: noInternetLabelTitle, customView: nil) 48 | case .checkInternetAvaibilityCustomView(let customView): 49 | checkInternetAndShowView(noInternetImg: nil, noInternetLabelTitle: nil, customView: customView) 50 | default: break 51 | 52 | } 53 | } 54 | 55 | private func showLoadingTableView(loadingImg: UIImage?, loadingLabelTitle: NSAttributedString?, customView: UIView?) { 56 | if customView != nil { 57 | self.backgroundView = customView 58 | } else { 59 | objLoadingView?.loadingTitleText = loadingLabelTitle ?? "Please Wait...".makeAttributedString(font: UIFont.systemFont(ofSize: 25), textColor: .lightGray) 60 | let img = UIImage(named: "loading", in: Bundle(identifier: "org.cocoapods.SSPlaceHolderTableView"), compatibleWith: nil) 61 | objLoadingView?.loadingImg = loadingImg ?? img 62 | self.backgroundView = objLoadingView 63 | } 64 | self.dataSource = nil 65 | self.delegate = nil 66 | } 67 | 68 | private func hideLoadinTableView(controller: UIViewController) { 69 | self.dataSource = (controller as! UICollectionViewDataSource) 70 | self.delegate = (controller as! UICollectionViewDelegate) 71 | self.backgroundView = nil 72 | self.reloadData() 73 | } 74 | 75 | private func showNoDataPlaceHolder(noDataImg: UIImage?, noDataLabelTitle: NSAttributedString?, customView: UIView?) { 76 | if customView != nil { 77 | self.backgroundView = customView 78 | } else { 79 | objNoDataView?.noDataTitleText = noDataLabelTitle ?? "NO DATA FOUND.".makeAttributedString(font: UIFont.systemFont(ofSize: 25), textColor: .lightGray) 80 | let img = UIImage(named: "noData", in: Bundle(identifier: "org.cocoapods.SSPlaceHolderTableView"), compatibleWith: nil) 81 | objNoDataView?.noDataImg = noDataImg ?? img 82 | self.backgroundView = objNoDataView 83 | } 84 | self.dataSource = nil 85 | self.delegate = nil 86 | } 87 | 88 | private func checkInternetAndShowView(noInternetImg: UIImage?, noInternetLabelTitle: NSAttributedString?, customView: UIView?) { 89 | if customView != nil { 90 | self.backgroundView = customView 91 | } else { 92 | objNetworkUnavailableView?.noInternetTitleText = noInternetLabelTitle ?? "NO INTERNET".makeAttributedString(font: UIFont.systemFont(ofSize: 25), textColor: .lightGray) 93 | let img = UIImage(named: "noInternet", in: Bundle(identifier: "org.cocoapods.SSPlaceHolderTableView"), compatibleWith: nil) 94 | objNetworkUnavailableView?.noInternetImg = noInternetImg ?? img 95 | objNetworkUnavailableView?.btnTryAgain.addTarget(self, action: #selector(retryButtonTapped(sender:)), for: .touchUpInside) 96 | self.backgroundView = objNetworkUnavailableView 97 | } 98 | self.dataSource = nil 99 | self.delegate = nil 100 | } 101 | 102 | @objc func retryButtonTapped(sender: UIButton) { 103 | guard let compl = self.networkUnReachableBlock else { 104 | return 105 | } 106 | compl() 107 | } 108 | 109 | } 110 | 111 | extension String { 112 | func makeAttributedString(font: UIFont, textColor: UIColor) -> NSAttributedString { 113 | let attriString = NSAttributedString(string:self, attributes: 114 | [NSAttributedString.Key.foregroundColor: textColor, 115 | NSAttributedString.Key.font: font]) 116 | return attriString 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/Library/TableView.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TableView.swift 3 | // SSPlaceHolderTableView 4 | // 5 | // Created by Vishal Patel on 11/01/19. 6 | // Copyright © 2019 Vishal Patel. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | public enum SSPlaceHolderStates { 12 | case dataAvailable(viewController: UIViewController) 13 | case noDataAvailable(noDataImg: UIImage?, noDataLabelTitle: NSAttributedString?) 14 | case noDataAvailableWithCustomView(_ customView: UIView?) 15 | case loading(loadingImg: UIImage?, loadingLabelTitle: NSAttributedString?) 16 | case loadingWithCustomView(_ customView: UIView?) 17 | case checkInternetAvaibility(noInternetImg: UIImage?, noInternetLabelTitle: NSAttributedString?) 18 | case checkInternetAvaibilityCustomView(_ customView: UIView?) 19 | case unknown 20 | } 21 | 22 | protocol networkRechabilityProtocol: class { 23 | func retryNetworkCall() 24 | } 25 | var gCenterOffSetMultiplier: CGFloat = 0.75 26 | 27 | public class TableView: UITableView { 28 | 29 | var objLoadingView: LoadingView? 30 | var objNoDataView: NoDataView? 31 | var objNetworkUnavailableView: NetworkUnavailableView? 32 | var centerOffSetMultiplier: CGFloat? { 33 | didSet { 34 | gCenterOffSetMultiplier = centerOffSetMultiplier ?? 0.75 35 | } 36 | } 37 | public var networkUnReachableBlock: (() -> Void)? 38 | 39 | override public init(frame: CGRect, style: UITableView.Style) { 40 | super.init(frame: frame, style: style) 41 | setUpTableView() 42 | } 43 | 44 | 45 | required public init?(coder aDecoder: NSCoder) { 46 | super.init(coder : aDecoder) 47 | setUpTableView() 48 | } 49 | 50 | private func setUpTableView() { 51 | objLoadingView = LoadingView.instanceFromNib() 52 | objNoDataView = NoDataView.instanceFromNib() 53 | objNetworkUnavailableView = NetworkUnavailableView.instanceFromNib() 54 | } 55 | 56 | public func setState(_ state: SSPlaceHolderStates) { 57 | switch state { 58 | case .dataAvailable(let viewController): 59 | hideLoadinTableView(controller: viewController) 60 | case .noDataAvailable(let noDataImg, let noDataLabelTitle): 61 | showNoDataPlaceHolder(noDataImg: noDataImg, noDataLabelTitle: noDataLabelTitle, customView: nil) 62 | case .noDataAvailableWithCustomView(let customView): 63 | showNoDataPlaceHolder(noDataImg: nil, noDataLabelTitle: nil, customView: customView) 64 | case .loading(let img, let title): 65 | showLoadingTableView(loadingImg: img, loadingLabelTitle: title, customView: nil) 66 | case .loadingWithCustomView(let customView): 67 | showLoadingTableView(loadingImg: nil, loadingLabelTitle: nil, customView: customView) 68 | case .checkInternetAvaibility(let noInternetImg, let noInternetLabelTitle): 69 | checkInternetAndShowView(noInternetImg: noInternetImg, noInternetLabelTitle: noInternetLabelTitle, customView: nil) 70 | case .checkInternetAvaibilityCustomView(let customView): 71 | checkInternetAndShowView(noInternetImg: nil, noInternetLabelTitle: nil, customView: customView) 72 | default: break 73 | 74 | } 75 | } 76 | 77 | private func showLoadingTableView(loadingImg: UIImage?, loadingLabelTitle: NSAttributedString?, customView: UIView?) { 78 | objLoadingView?.loadingTitleText = loadingLabelTitle ?? "Please Wait...".makeAttributedString(font: UIFont.systemFont(ofSize: 25), textColor: .lightGray) 79 | let img = UIImage(named: "loading", in: Bundle(identifier: "org.cocoapods.SSPlaceHolderTableView"), compatibleWith: nil) 80 | objLoadingView?.loadingImg = loadingImg ?? img 81 | self.backgroundView = objLoadingView 82 | self.separatorColor = UIColor.clear 83 | self.dataSource = nil 84 | self.delegate = nil 85 | } 86 | 87 | private func hideLoadinTableView(controller: UIViewController) { 88 | self.dataSource = (controller as! UITableViewDataSource) 89 | self.delegate = (controller as! UITableViewDelegate) 90 | self.backgroundView = nil 91 | self.reloadData() 92 | } 93 | 94 | private func showNoDataPlaceHolder(noDataImg: UIImage?, noDataLabelTitle: NSAttributedString?, customView: UIView?) { 95 | if customView != nil { 96 | self.backgroundView = customView 97 | } else { 98 | objNoDataView?.noDataTitleText = noDataLabelTitle ?? "NO DATA FOUND.".makeAttributedString(font: UIFont.systemFont(ofSize: 25), textColor: .lightGray) 99 | let img = UIImage(named: "noData", in: Bundle(identifier: "org.cocoapods.SSPlaceHolderTableView"), compatibleWith: nil) 100 | objNoDataView?.noDataImg = noDataImg ?? img 101 | self.backgroundView = objNoDataView 102 | } 103 | self.separatorColor = UIColor.clear 104 | self.dataSource = nil 105 | self.delegate = nil 106 | } 107 | 108 | private func checkInternetAndShowView(noInternetImg: UIImage?, noInternetLabelTitle: NSAttributedString?, customView: UIView?) { 109 | objNetworkUnavailableView?.noInternetTitleText = noInternetLabelTitle ?? "NO INTERNET".makeAttributedString(font: UIFont.systemFont(ofSize: 25), textColor: .lightGray) 110 | let img = UIImage(named: "noInternet", in: Bundle(identifier: "org.cocoapods.SSPlaceHolderTableView"), compatibleWith: nil) 111 | objNetworkUnavailableView?.noInternetImg = noInternetImg ?? img 112 | objNetworkUnavailableView?.btnTryAgain.addTarget(self, action: #selector(retryButtonTapped(sender:)), for: .touchUpInside) 113 | self.backgroundView = objNetworkUnavailableView 114 | self.separatorColor = UIColor.clear 115 | self.dataSource = nil 116 | self.delegate = nil 117 | } 118 | 119 | @objc func retryButtonTapped(sender: UIButton) { 120 | // networkDelegate?.retryNetworkCall() 121 | guard let compl = self.networkUnReachableBlock else { 122 | return 123 | } 124 | compl() 125 | } 126 | } 127 | -------------------------------------------------------------------------------- /SSPlaceHolderTableView/XIB/NetworkUnavailableView.xib: -------------------------------------------------------------------------------- 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 | 31 | 37 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /docs/Global Variables.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Global Variables Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

Global Variables

118 |

The following global variables are available globally.

119 | 120 |
121 |
122 |
123 |
    124 |
  • 125 |
    126 | 127 | 128 | 129 | gCenterOffSetMultiplier 130 | 131 |
    132 |
    133 |
    134 |
    135 |
    136 |
    137 |

    Undocumented

    138 | 139 |
    140 |
    141 |

    Declaration

    142 |
    143 |

    Swift

    144 |
    var gCenterOffSetMultiplier: CGFloat
    145 | 146 |
    147 |
    148 |
    149 |
    150 |
  • 151 |
152 |
153 |
154 |
155 | 159 |
160 |
161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Global Variables.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Global Variables Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

Global Variables

118 |

The following global variables are available globally.

119 | 120 |
121 |
122 |
123 |
    124 |
  • 125 |
    126 | 127 | 128 | 129 | gCenterOffSetMultiplier 130 | 131 |
    132 |
    133 |
    134 |
    135 |
    136 |
    137 |

    Undocumented

    138 | 139 |
    140 |
    141 |

    Declaration

    142 |
    143 |

    Swift

    144 |
    var gCenterOffSetMultiplier: CGFloat
    145 | 146 |
    147 |
    148 |
    149 |
    150 |
  • 151 |
152 |
153 |
154 |
155 | 159 |
160 |
161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /docs/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

Protocols

118 |

The following protocols are available globally.

119 | 120 |
121 |
122 |
123 |
    124 |
  • 125 |
    126 | 127 | 128 | 129 | networkRechabilityProtocol 130 | 131 |
    132 |
    133 |
    134 |
    135 |
    136 |
    137 |

    Undocumented

    138 | 139 | See more 140 |
    141 |
    142 |

    Declaration

    143 |
    144 |

    Swift

    145 |
    protocol networkRechabilityProtocol : AnyObject
    146 | 147 |
    148 |
    149 |
    150 |
    151 |
  • 152 |
153 |
154 |
155 |
156 | 160 |
161 |
162 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Protocols.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Protocols Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

Protocols

118 |

The following protocols are available globally.

119 | 120 |
121 |
122 |
123 |
    124 |
  • 125 |
    126 | 127 | 128 | 129 | networkRechabilityProtocol 130 | 131 |
    132 |
    133 |
    134 |
    135 |
    136 |
    137 |

    Undocumented

    138 | 139 | See more 140 |
    141 |
    142 |

    Declaration

    143 |
    144 |

    Swift

    145 |
    protocol networkRechabilityProtocol : AnyObject
    146 | 147 |
    148 |
    149 |
    150 |
    151 |
  • 152 |
153 |
154 |
155 |
156 | 160 |
161 |
162 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /docs/Extensions/Notification.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Notification Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

Notification

118 | 119 |
120 |
121 |
122 |
    123 |
  • 124 |
    125 | 126 | 127 | 128 | Name 129 | 130 |
    131 |
    132 |
    133 |
    134 |
    135 |
    136 | 137 | See more 138 |
    139 |
    140 |

    Declaration

    141 |
    142 |

    Swift

    143 |
    typealias Notification.Name = NSNotification.Name
    144 | 145 |
    146 |
    147 |
    148 |
    149 |
  • 150 |
151 |
152 |
153 |
154 | 158 |
159 |
160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Extensions/Notification.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Notification Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

Notification

118 | 119 |
120 |
121 |
122 |
    123 |
  • 124 |
    125 | 126 | 127 | 128 | Name 129 | 130 |
    131 |
    132 |
    133 |
    134 |
    135 |
    136 | 137 | See more 138 |
    139 |
    140 |

    Declaration

    141 |
    142 |

    Swift

    143 |
    typealias Notification.Name = NSNotification.Name
    144 | 145 |
    146 |
    147 |
    148 |
    149 |
  • 150 |
151 |
152 |
153 |
154 | 158 |
159 |
160 | 161 | 162 | 163 | -------------------------------------------------------------------------------- /docs/Protocols/networkRechabilityProtocol.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | networkRechabilityProtocol Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

networkRechabilityProtocol

118 |
119 |
120 |
protocol networkRechabilityProtocol : AnyObject
121 | 122 |
123 |
124 |

Undocumented

125 | 126 |
127 |
128 |
129 |
    130 |
  • 131 |
    132 | 133 | 134 | 135 | retryNetworkCall() 136 | 137 |
    138 |
    139 |
    140 |
    141 |
    142 |
    143 |

    Undocumented

    144 | 145 |
    146 |
    147 |

    Declaration

    148 |
    149 |

    Swift

    150 |
    func retryNetworkCall()
    151 | 152 |
    153 |
    154 |
    155 |
    156 |
  • 157 |
158 |
159 |
160 |
161 | 165 |
166 |
167 | 168 | 169 | 170 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Protocols/networkRechabilityProtocol.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | networkRechabilityProtocol Protocol Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

networkRechabilityProtocol

118 |
119 |
120 |
protocol networkRechabilityProtocol : AnyObject
121 | 122 |
123 |
124 |

Undocumented

125 | 126 |
127 |
128 |
129 |
    130 |
  • 131 |
    132 | 133 | 134 | 135 | retryNetworkCall() 136 | 137 |
    138 |
    139 |
    140 |
    141 |
    142 |
    143 |

    Undocumented

    144 | 145 |
    146 |
    147 |

    Declaration

    148 |
    149 |

    Swift

    150 |
    func retryNetworkCall()
    151 | 152 |
    153 |
    154 |
    155 |
    156 |
  • 157 |
158 |
159 |
160 |
161 | 165 |
166 |
167 | 168 | 169 | 170 | -------------------------------------------------------------------------------- /docs/Extensions/String.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | String Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

String

118 |
119 |
120 |
struct String
121 | 122 |
123 |
124 | 125 |
126 |
127 |
128 |
    129 |
  • 130 |
    131 | 132 | 133 | 134 | makeAttributedString(font:textColor:) 135 | 136 |
    137 |
    138 |
    139 |
    140 |
    141 |
    142 |

    Undocumented

    143 | 144 |
    145 |
    146 |

    Declaration

    147 |
    148 |

    Swift

    149 |
    func makeAttributedString(font: UIFont, textColor: UIColor) -> NSAttributedString
    150 | 151 |
    152 |
    153 |
    154 |
    155 |
  • 156 |
157 |
158 |
159 |
160 | 164 |
165 |
166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /docs/Extensions/Notification/Name.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Name Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

Name

118 |
119 |
120 |
typealias Notification.Name = NSNotification.Name
121 | 122 |
123 |
124 | 125 |
126 |
127 |
128 |
    129 |
  • 130 |
    131 | 132 | 133 | 134 | reachabilityChanged 135 | 136 |
    137 |
    138 |
    139 |
    140 |
    141 |
    142 |

    Undocumented

    143 | 144 |
    145 |
    146 |

    Declaration

    147 |
    148 |

    Swift

    149 |
    public static let reachabilityChanged: Notification.Name
    150 | 151 |
    152 |
    153 |
    154 |
    155 |
  • 156 |
157 |
158 |
159 |
160 | 164 |
165 |
166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Extensions/String.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | String Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

String

118 |
119 |
120 |
struct String
121 | 122 |
123 |
124 | 125 |
126 |
127 |
128 |
    129 |
  • 130 |
    131 | 132 | 133 | 134 | makeAttributedString(font:textColor:) 135 | 136 |
    137 |
    138 |
    139 |
    140 |
    141 |
    142 |

    Undocumented

    143 | 144 |
    145 |
    146 |

    Declaration

    147 |
    148 |

    Swift

    149 |
    func makeAttributedString(font: UIFont, textColor: UIColor) -> NSAttributedString
    150 | 151 |
    152 |
    153 |
    154 |
    155 |
  • 156 |
157 |
158 |
159 |
160 | 164 |
165 |
166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/Extensions/Notification/Name.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Name Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

Name

118 |
119 |
120 |
typealias Notification.Name = NSNotification.Name
121 | 122 |
123 |
124 | 125 |
126 |
127 |
128 |
    129 |
  • 130 |
    131 | 132 | 133 | 134 | reachabilityChanged 135 | 136 |
    137 |
    138 |
    139 |
    140 |
    141 |
    142 |

    Undocumented

    143 | 144 |
    145 |
    146 |

    Declaration

    147 |
    148 |

    Swift

    149 |
    public static let reachabilityChanged: Notification.Name
    150 | 151 |
    152 |
    153 |
    154 |
    155 |
  • 156 |
157 |
158 |
159 |
160 | 164 |
165 |
166 | 167 | 168 | 169 | -------------------------------------------------------------------------------- /docs/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 20px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | 173 | .section { 174 | padding: 0 25px; } 175 | 176 | .highlight { 177 | background-color: #eee; 178 | padding: 10px 12px; 179 | border: 1px solid #e2e2e2; 180 | border-radius: 4px; 181 | overflow-x: auto; } 182 | 183 | .declaration .highlight { 184 | overflow-x: initial; 185 | padding: 0 40px 40px 0; 186 | margin-bottom: -25px; 187 | background-color: transparent; 188 | border: none; } 189 | 190 | .section-name { 191 | margin: 0; 192 | margin-left: 18px; } 193 | 194 | .task-group-section { 195 | padding-left: 6px; 196 | border-top: 1px solid #e2e2e2; } 197 | 198 | .task-group { 199 | padding-top: 0px; } 200 | 201 | .task-name-container a[name]:before { 202 | content: ""; 203 | display: block; 204 | padding-top: 70px; 205 | margin: -70px 0 0; } 206 | 207 | .item { 208 | padding-top: 8px; 209 | width: 100%; 210 | list-style-type: none; } 211 | .item a[name]:before { 212 | content: ""; 213 | display: block; 214 | padding-top: 70px; 215 | margin: -70px 0 0; } 216 | .item code { 217 | background-color: transparent; 218 | padding: 0; } 219 | .item .token, .item .direct-link { 220 | padding-left: 3px; 221 | margin-left: 15px; 222 | font-size: 11.9px; } 223 | .item .discouraged { 224 | text-decoration: line-through; } 225 | .item .declaration-note { 226 | font-size: .85em; 227 | color: gray; 228 | font-style: italic; } 229 | 230 | .pointer-container { 231 | border-bottom: 1px solid #e2e2e2; 232 | left: -23px; 233 | padding-bottom: 13px; 234 | position: relative; 235 | width: 110%; } 236 | 237 | .pointer { 238 | background: #f9f9f9; 239 | border-left: 1px solid #e2e2e2; 240 | border-top: 1px solid #e2e2e2; 241 | height: 12px; 242 | left: 21px; 243 | top: -7px; 244 | -webkit-transform: rotate(45deg); 245 | -moz-transform: rotate(45deg); 246 | -o-transform: rotate(45deg); 247 | transform: rotate(45deg); 248 | position: absolute; 249 | width: 12px; } 250 | 251 | .height-container { 252 | display: none; 253 | left: -25px; 254 | padding: 0 25px; 255 | position: relative; 256 | width: 100%; 257 | overflow: hidden; } 258 | .height-container .section { 259 | background: #f9f9f9; 260 | border-bottom: 1px solid #e2e2e2; 261 | left: -25px; 262 | position: relative; 263 | width: 100%; 264 | padding-top: 10px; 265 | padding-bottom: 5px; } 266 | 267 | .aside, .language { 268 | padding: 6px 12px; 269 | margin: 12px 0; 270 | border-left: 5px solid #dddddd; 271 | overflow-y: hidden; } 272 | .aside .aside-title, .language .aside-title { 273 | font-size: 9px; 274 | letter-spacing: 2px; 275 | text-transform: uppercase; 276 | padding-bottom: 0; 277 | margin: 0; 278 | color: #aaa; 279 | -webkit-user-select: none; } 280 | .aside p:last-child, .language p:last-child { 281 | margin-bottom: 0; } 282 | 283 | .language { 284 | border-left: 5px solid #cde9f4; } 285 | .language .aside-title { 286 | color: #4b8afb; } 287 | 288 | .aside-warning, .aside-deprecated, .aside-unavailable { 289 | border-left: 5px solid #ff6666; } 290 | .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { 291 | color: #ff0000; } 292 | 293 | .graybox { 294 | border-collapse: collapse; 295 | width: 100%; } 296 | .graybox p { 297 | margin: 0; 298 | word-break: break-word; 299 | min-width: 50px; } 300 | .graybox td { 301 | border: 1px solid #e2e2e2; 302 | padding: 5px 25px 5px 10px; 303 | vertical-align: middle; } 304 | .graybox tr td:first-of-type { 305 | text-align: right; 306 | padding: 7px; 307 | vertical-align: top; 308 | word-break: normal; 309 | width: 40px; } 310 | 311 | .slightly-smaller { 312 | font-size: 0.9em; } 313 | 314 | #footer { 315 | position: relative; 316 | top: 10px; 317 | bottom: 0px; 318 | margin-left: 25px; } 319 | #footer p { 320 | margin: 0; 321 | color: #aaa; 322 | font-size: 0.8em; } 323 | 324 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 325 | display: none; } 326 | html.dash .main-content { 327 | width: 980px; 328 | margin-left: 0; 329 | border: none; 330 | width: 100%; 331 | top: 0; 332 | padding-bottom: 0; } 333 | html.dash .height-container { 334 | display: block; } 335 | html.dash .item .token { 336 | margin-left: 0; } 337 | html.dash .content-wrapper { 338 | width: auto; } 339 | html.dash #footer { 340 | position: static; } 341 | -------------------------------------------------------------------------------- /docs/docsets/.docset/Contents/Resources/Documents/css/jazzy.css: -------------------------------------------------------------------------------- 1 | html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { 2 | background: transparent; 3 | border: 0; 4 | margin: 0; 5 | outline: 0; 6 | padding: 0; 7 | vertical-align: baseline; } 8 | 9 | body { 10 | background-color: #f2f2f2; 11 | font-family: Helvetica, freesans, Arial, sans-serif; 12 | font-size: 14px; 13 | -webkit-font-smoothing: subpixel-antialiased; 14 | word-wrap: break-word; } 15 | 16 | h1, h2, h3 { 17 | margin-top: 0.8em; 18 | margin-bottom: 0.3em; 19 | font-weight: 100; 20 | color: black; } 21 | 22 | h1 { 23 | font-size: 2.5em; } 24 | 25 | h2 { 26 | font-size: 2em; 27 | border-bottom: 1px solid #e2e2e2; } 28 | 29 | h4 { 30 | font-size: 13px; 31 | line-height: 1.5; 32 | margin-top: 21px; } 33 | 34 | h5 { 35 | font-size: 1.1em; } 36 | 37 | h6 { 38 | font-size: 1.1em; 39 | color: #777; } 40 | 41 | .section-name { 42 | color: gray; 43 | display: block; 44 | font-family: Helvetica; 45 | font-size: 22px; 46 | font-weight: 100; 47 | margin-bottom: 15px; } 48 | 49 | pre, code { 50 | font: 0.95em Menlo, monospace; 51 | color: #777; 52 | word-wrap: normal; } 53 | 54 | p code, li code { 55 | background-color: #eee; 56 | padding: 2px 4px; 57 | border-radius: 4px; } 58 | 59 | a { 60 | color: #0088cc; 61 | text-decoration: none; } 62 | 63 | ul { 64 | padding-left: 15px; } 65 | 66 | li { 67 | line-height: 1.8em; } 68 | 69 | img { 70 | max-width: 100%; } 71 | 72 | blockquote { 73 | margin-left: 0; 74 | padding: 0 10px; 75 | border-left: 4px solid #ccc; } 76 | 77 | .content-wrapper { 78 | margin: 0 auto; 79 | width: 980px; } 80 | 81 | header { 82 | font-size: 0.85em; 83 | line-height: 26px; 84 | background-color: #414141; 85 | position: fixed; 86 | width: 100%; 87 | z-index: 1; } 88 | header img { 89 | padding-right: 6px; 90 | vertical-align: -4px; 91 | height: 16px; } 92 | header a { 93 | color: #fff; } 94 | header p { 95 | float: left; 96 | color: #999; } 97 | header .header-right { 98 | float: right; 99 | margin-left: 16px; } 100 | 101 | #breadcrumbs { 102 | background-color: #f2f2f2; 103 | height: 27px; 104 | padding-top: 17px; 105 | position: fixed; 106 | width: 100%; 107 | z-index: 1; 108 | margin-top: 26px; } 109 | #breadcrumbs #carat { 110 | height: 10px; 111 | margin: 0 5px; } 112 | 113 | .sidebar { 114 | background-color: #f9f9f9; 115 | border: 1px solid #e2e2e2; 116 | overflow-y: auto; 117 | overflow-x: hidden; 118 | position: fixed; 119 | top: 70px; 120 | bottom: 0; 121 | width: 230px; 122 | word-wrap: normal; } 123 | 124 | .nav-groups { 125 | list-style-type: none; 126 | background: #fff; 127 | padding-left: 0; } 128 | 129 | .nav-group-name { 130 | border-bottom: 1px solid #e2e2e2; 131 | font-size: 1.1em; 132 | font-weight: 100; 133 | padding: 15px 0 15px 20px; } 134 | .nav-group-name > a { 135 | color: #333; } 136 | 137 | .nav-group-tasks { 138 | margin-top: 5px; } 139 | 140 | .nav-group-task { 141 | font-size: 0.9em; 142 | list-style-type: none; 143 | white-space: nowrap; } 144 | .nav-group-task a { 145 | color: #888; } 146 | 147 | .main-content { 148 | background-color: #fff; 149 | border: 1px solid #e2e2e2; 150 | margin-left: 246px; 151 | position: absolute; 152 | overflow: hidden; 153 | padding-bottom: 20px; 154 | top: 70px; 155 | width: 734px; } 156 | .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { 157 | margin-bottom: 1em; } 158 | .main-content p { 159 | line-height: 1.8em; } 160 | .main-content section .section:first-child { 161 | margin-top: 0; 162 | padding-top: 0; } 163 | .main-content section .task-group-section .task-group:first-of-type { 164 | padding-top: 10px; } 165 | .main-content section .task-group-section .task-group:first-of-type .section-name { 166 | padding-top: 15px; } 167 | .main-content section .heading:before { 168 | content: ""; 169 | display: block; 170 | padding-top: 70px; 171 | margin: -70px 0 0; } 172 | 173 | .section { 174 | padding: 0 25px; } 175 | 176 | .highlight { 177 | background-color: #eee; 178 | padding: 10px 12px; 179 | border: 1px solid #e2e2e2; 180 | border-radius: 4px; 181 | overflow-x: auto; } 182 | 183 | .declaration .highlight { 184 | overflow-x: initial; 185 | padding: 0 40px 40px 0; 186 | margin-bottom: -25px; 187 | background-color: transparent; 188 | border: none; } 189 | 190 | .section-name { 191 | margin: 0; 192 | margin-left: 18px; } 193 | 194 | .task-group-section { 195 | padding-left: 6px; 196 | border-top: 1px solid #e2e2e2; } 197 | 198 | .task-group { 199 | padding-top: 0px; } 200 | 201 | .task-name-container a[name]:before { 202 | content: ""; 203 | display: block; 204 | padding-top: 70px; 205 | margin: -70px 0 0; } 206 | 207 | .item { 208 | padding-top: 8px; 209 | width: 100%; 210 | list-style-type: none; } 211 | .item a[name]:before { 212 | content: ""; 213 | display: block; 214 | padding-top: 70px; 215 | margin: -70px 0 0; } 216 | .item code { 217 | background-color: transparent; 218 | padding: 0; } 219 | .item .token, .item .direct-link { 220 | padding-left: 3px; 221 | margin-left: 15px; 222 | font-size: 11.9px; } 223 | .item .discouraged { 224 | text-decoration: line-through; } 225 | .item .declaration-note { 226 | font-size: .85em; 227 | color: gray; 228 | font-style: italic; } 229 | 230 | .pointer-container { 231 | border-bottom: 1px solid #e2e2e2; 232 | left: -23px; 233 | padding-bottom: 13px; 234 | position: relative; 235 | width: 110%; } 236 | 237 | .pointer { 238 | background: #f9f9f9; 239 | border-left: 1px solid #e2e2e2; 240 | border-top: 1px solid #e2e2e2; 241 | height: 12px; 242 | left: 21px; 243 | top: -7px; 244 | -webkit-transform: rotate(45deg); 245 | -moz-transform: rotate(45deg); 246 | -o-transform: rotate(45deg); 247 | transform: rotate(45deg); 248 | position: absolute; 249 | width: 12px; } 250 | 251 | .height-container { 252 | display: none; 253 | left: -25px; 254 | padding: 0 25px; 255 | position: relative; 256 | width: 100%; 257 | overflow: hidden; } 258 | .height-container .section { 259 | background: #f9f9f9; 260 | border-bottom: 1px solid #e2e2e2; 261 | left: -25px; 262 | position: relative; 263 | width: 100%; 264 | padding-top: 10px; 265 | padding-bottom: 5px; } 266 | 267 | .aside, .language { 268 | padding: 6px 12px; 269 | margin: 12px 0; 270 | border-left: 5px solid #dddddd; 271 | overflow-y: hidden; } 272 | .aside .aside-title, .language .aside-title { 273 | font-size: 9px; 274 | letter-spacing: 2px; 275 | text-transform: uppercase; 276 | padding-bottom: 0; 277 | margin: 0; 278 | color: #aaa; 279 | -webkit-user-select: none; } 280 | .aside p:last-child, .language p:last-child { 281 | margin-bottom: 0; } 282 | 283 | .language { 284 | border-left: 5px solid #cde9f4; } 285 | .language .aside-title { 286 | color: #4b8afb; } 287 | 288 | .aside-warning, .aside-deprecated, .aside-unavailable { 289 | border-left: 5px solid #ff6666; } 290 | .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { 291 | color: #ff0000; } 292 | 293 | .graybox { 294 | border-collapse: collapse; 295 | width: 100%; } 296 | .graybox p { 297 | margin: 0; 298 | word-break: break-word; 299 | min-width: 50px; } 300 | .graybox td { 301 | border: 1px solid #e2e2e2; 302 | padding: 5px 25px 5px 10px; 303 | vertical-align: middle; } 304 | .graybox tr td:first-of-type { 305 | text-align: right; 306 | padding: 7px; 307 | vertical-align: top; 308 | word-break: normal; 309 | width: 40px; } 310 | 311 | .slightly-smaller { 312 | font-size: 0.9em; } 313 | 314 | #footer { 315 | position: relative; 316 | top: 10px; 317 | bottom: 0px; 318 | margin-left: 25px; } 319 | #footer p { 320 | margin: 0; 321 | color: #aaa; 322 | font-size: 0.8em; } 323 | 324 | html.dash header, html.dash #breadcrumbs, html.dash .sidebar { 325 | display: none; } 326 | html.dash .main-content { 327 | width: 980px; 328 | margin-left: 0; 329 | border: none; 330 | width: 100%; 331 | top: 0; 332 | padding-bottom: 0; } 333 | html.dash .height-container { 334 | display: block; } 335 | html.dash .item .token { 336 | margin-left: 0; } 337 | html.dash .content-wrapper { 338 | width: auto; } 339 | html.dash #footer { 340 | position: static; } 341 | -------------------------------------------------------------------------------- /docs/Extensions/NSLayoutConstraint.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | NSLayoutConstraint Extension Reference 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 |
17 |

Docs (3% documented)

18 |
19 |
20 |
21 | 26 |
27 |
28 | 114 |
115 |
116 |
117 |

NSLayoutConstraint

118 |
119 |
120 |
class NSLayoutConstraint : NSObject
121 | 122 |
123 |
124 | 125 |
126 |
127 |
128 |
    129 |
  • 130 |
    131 | 132 | 133 | 134 | setMultiplier(multiplier:) 135 | 136 |
    137 |
    138 |
    139 |
    140 |
    141 |
    142 |

    Change multiplier constraint

    143 | 144 |
    145 |
    146 |

    Declaration

    147 |
    148 |

    Swift

    149 |
    func setMultiplier(multiplier: CGFloat) -> NSLayoutConstraint
    150 | 151 |
    152 |
    153 |
    154 |

    Parameters

    155 | 156 | 157 | 158 | 163 | 168 | 169 | 170 |
    159 | 160 | multiplier 161 | 162 | 164 |
    165 |

    CGFloat

    166 |
    167 |
    171 |
    172 |
    173 |

    Return Value

    174 |

    NSLayoutConstraint

    175 |
    176 |
    177 |
    178 |
  • 179 |
180 |
181 |
182 |
183 | 187 |
188 |
189 | 190 | 191 | 192 | --------------------------------------------------------------------------------