├── .gitignore ├── .swift-version ├── .travis.yml ├── ATHMultiSelectionSegmentedControl.podspec ├── ATHMultiSelectionSegmentedControl └── Classes │ ├── ATHMultiSelectionControlSegmentButton.swift │ └── ATHMultiSelectionSegmentedControl.swift ├── Example ├── ATHMultiSelectionSegmentedControl.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ ├── ATHMultiSelectionSegmentedControl-Example.xcscheme │ │ └── ATHMultiSelectionSegmentedControl.xcscheme ├── ATHMultiSelectionSegmentedControl.xcworkspace │ └── contents.xcworkspacedata ├── ATHMultiSelectionSegmentedControl │ ├── ATHMultiSelectionSegmentedControl.h │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── LaunchScreen.xib │ │ └── Main.storyboard │ ├── Images.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── Info.plist │ └── ViewController.swift ├── Podfile ├── Podfile.lock ├── Pods │ ├── Local Podspecs │ │ └── ATHMultiSelectionSegmentedControl.podspec.json │ ├── Manifest.lock │ ├── Pods.xcodeproj │ │ └── project.pbxproj │ └── Target Support Files │ │ ├── ATHMultiSelectionSegmentedControl │ │ ├── ATHMultiSelectionSegmentedControl-dummy.m │ │ ├── ATHMultiSelectionSegmentedControl-prefix.pch │ │ ├── ATHMultiSelectionSegmentedControl-umbrella.h │ │ ├── ATHMultiSelectionSegmentedControl.modulemap │ │ ├── ATHMultiSelectionSegmentedControl.xcconfig │ │ └── Info.plist │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Example │ │ ├── Info.plist │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Example-acknowledgements.markdown │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Example-acknowledgements.plist │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Example-dummy.m │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Example-frameworks.sh │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Example-resources.sh │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Example-umbrella.h │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Example.debug.xcconfig │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Example.modulemap │ │ └── Pods-ATHMultiSelectionSegmentedControl_Example.release.xcconfig │ │ └── Pods-ATHMultiSelectionSegmentedControl_Tests │ │ ├── Info.plist │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Tests-acknowledgements.markdown │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Tests-acknowledgements.plist │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Tests-dummy.m │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Tests-frameworks.sh │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Tests-resources.sh │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Tests-umbrella.h │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Tests.debug.xcconfig │ │ ├── Pods-ATHMultiSelectionSegmentedControl_Tests.modulemap │ │ └── Pods-ATHMultiSelectionSegmentedControl_Tests.release.xcconfig └── Tests │ ├── ATHMultiSelectionSegmentedControlTests.swift │ └── Info.plist ├── LICENSE ├── Package.swift ├── README.md └── misc ├── demo.gif └── logo.png /.gitignore: -------------------------------------------------------------------------------- 1 | # OS X 2 | .DS_Store 3 | 4 | # Xcode 5 | build/ 6 | *.pbxuser 7 | !default.pbxuser 8 | *.mode1v3 9 | !default.mode1v3 10 | *.mode2v3 11 | !default.mode2v3 12 | *.perspectivev3 13 | !default.perspectivev3 14 | xcuserdata/ 15 | *.xccheckout 16 | profile 17 | *.moved-aside 18 | DerivedData 19 | *.hmap 20 | *.ipa 21 | 22 | # Bundler 23 | .bundle 24 | 25 | Carthage 26 | # We recommend against adding the Pods directory to your .gitignore. However 27 | # you should judge for yourself, the pros and cons are mentioned at: 28 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 29 | # 30 | # Note: if you ignore the Pods directory, make sure to uncomment 31 | # `pod install` in .travis.yml 32 | # 33 | Pods/ 34 | _Pods.xcodeproj 35 | -------------------------------------------------------------------------------- /.swift-version: -------------------------------------------------------------------------------- 1 | 3.2 2 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode8 2 | language: objective-c 3 | cache: cocoapods 4 | podfile: Example/Podfile 5 | before_install: 6 | - gem install cocoapods --pre # Since Travis is not always on latest version 7 | - pod repo update --silent 8 | - pod install --project-directory=Example 9 | script: 10 | - set -o pipefail && xcodebuild test -workspace Example/ATHMultiSelectionSegmentedControl.xcworkspace -scheme ATHMultiSelectionSegmentedControl-Example -sdk iphonesimulator10.0 -destination 'OS=10.0,name=iPhone 7 Plus' ONLY_ACTIVE_ARCH=NO | xcpretty 11 | - pod lib lint --allow-warnings 12 | -------------------------------------------------------------------------------- /ATHMultiSelectionSegmentedControl.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'ATHMultiSelectionSegmentedControl' 3 | s.version = '0.2.2' 4 | s.summary = 'A control mimicking UISegmentedControl behaviour but allowing for multiple segment selection' 5 | 6 | s.description = <<-DESC 7 | ATHMultiSelectionSegmentedControl is a UIView based control that mimicks UISegmentedControl's API but also allows for multiple segment selection. It's battle tested and fully tested. If you find any bugs or want to suggest improvements please feel free to contribute.' 8 | DESC 9 | 10 | s.homepage = 'https://github.com/attheodo/ATHMultiSelectionSegmentedControl' 11 | s.license = { :type => 'MIT', :file => 'LICENSE' } 12 | s.author = { 'attheodo' => 'at@atworks.gr' } 13 | s.source = { :git => 'https://github.com/attheodo/ATHMultiSelectionSegmentedControl.git', :tag => s.version.to_s } 14 | s.social_media_url = 'https://twitter.com/attheodo' 15 | 16 | s.ios.deployment_target = '8.0' 17 | 18 | s.source_files = 'ATHMultiSelectionSegmentedControl/Classes/**/*' 19 | 20 | s.frameworks = 'UIKit', 'Foundation', 'QuartzCore' 21 | 22 | end 23 | -------------------------------------------------------------------------------- /ATHMultiSelectionSegmentedControl/Classes/ATHMultiSelectionControlSegmentButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATHMultiSelectionControlSegmentButton.swift 3 | // Pods 4 | // 5 | // Created by Athanasios Theodoridis on 06/06/16. 6 | // 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | import QuartzCore 13 | 14 | internal class ATHMultiSelectionControlSegmentButton: UIButton { 15 | 16 | // MARK: - Private Properties 17 | fileprivate var _isButtonSelected: Bool = false 18 | fileprivate var _isButtonEnabled: Bool = true 19 | 20 | // MARK: - Public Properties 21 | /// Whether the button is currently in a selected state 22 | internal var isButtonSelected: Bool { 23 | return _isButtonSelected 24 | } 25 | /// Whether the button 26 | internal var isButtonEnabled: Bool { 27 | return _isButtonEnabled 28 | } 29 | 30 | override var isHighlighted: Bool { 31 | 32 | didSet { 33 | 34 | // ignore highlighting if button is disabled 35 | if !_isButtonEnabled { return } 36 | 37 | if isHighlighted { 38 | backgroundColor = tintColor.withAlphaComponent(0.1) 39 | } else { 40 | 41 | if _isButtonSelected { 42 | backgroundColor = tintColor 43 | } else { 44 | backgroundColor = UIColor.clear 45 | } 46 | 47 | } 48 | 49 | } 50 | } 51 | 52 | // MARK: - Initialisers 53 | override init(frame: CGRect) { 54 | super.init(frame: frame) 55 | _configureButton() 56 | } 57 | 58 | required init?(coder aDecoder: NSCoder) { 59 | super.init(coder: aDecoder) 60 | } 61 | 62 | // MARK: - Private Methods 63 | /** 64 | Configures the initial style of the button 65 | - Sets title color 66 | - Clears background color 67 | - Adds a border of 0.5 px 68 | */ 69 | fileprivate func _configureButton() { 70 | 71 | setTitleColor(tintColor, for: .normal) 72 | 73 | backgroundColor = UIColor.clear 74 | 75 | layer.borderWidth = 0.5 76 | layer.borderColor = tintColor.cgColor 77 | 78 | } 79 | 80 | /** 81 | Styles the button as selected 82 | */ 83 | fileprivate func _setSelectedState() { 84 | 85 | layer.borderColor = backgroundColor?.cgColor 86 | backgroundColor = tintColor 87 | setTitleColor(UIColor.white, for: .normal) 88 | 89 | } 90 | 91 | /** 92 | Styles the button as deselected 93 | */ 94 | fileprivate func _setDeselectedState() { 95 | 96 | backgroundColor = UIColor.clear 97 | setTitleColor(tintColor, for: .normal) 98 | layer.borderColor = tintColor.cgColor 99 | 100 | } 101 | 102 | // MARK: - Public Methods 103 | /** 104 | Toggles the receiver's selection state and styles it appropriately 105 | */ 106 | internal func setButtonSelected(_ isSelected: Bool) { 107 | 108 | _isButtonSelected = isSelected 109 | _isButtonSelected ? _setSelectedState() : _setDeselectedState() 110 | 111 | } 112 | 113 | /** 114 | Toggles the receiver's enabled/disabled state and styles it appropriately 115 | */ 116 | internal func setButtonEnabled(_ isEnabled: Bool) { 117 | 118 | if isEnabled { 119 | _setDeselectedState() 120 | } else { 121 | setTitleColor(UIColor.gray, for: .normal) 122 | backgroundColor = UIColor.clear 123 | } 124 | 125 | _isButtonEnabled = isEnabled 126 | 127 | } 128 | 129 | } 130 | -------------------------------------------------------------------------------- /ATHMultiSelectionSegmentedControl/Classes/ATHMultiSelectionSegmentedControl.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ATHMultiSelectionSegmentedControl.swift 3 | // ATHMultiSelectionSegmentedControl 4 | // 5 | // Created by Athanasios Theodoridis on 06/06/16. 6 | // 7 | // 8 | 9 | import Foundation 10 | import UIKit 11 | 12 | /** 13 | MultiSelectionSegmentedControlDelegate delegate protocol. 14 | */ 15 | public protocol MultiSelectionSegmentedControlDelegate: class { 16 | /// Gets called *ONLY* if the user interacts with the control and not 17 | /// when the control is configured programatically 18 | func multiSelectionSegmentedControl(_ control: MultiSelectionSegmentedControl, selectedIndices indices: [Int]) 19 | } 20 | 21 | open class MultiSelectionSegmentedControl: UIView { 22 | 23 | // MARK: - Private Properties 24 | fileprivate var _segmentButtons: [ATHMultiSelectionControlSegmentButton]? 25 | fileprivate var _items: [String]? 26 | 27 | // MARK: - Public Properties 28 | open weak var delegate: MultiSelectionSegmentedControlDelegate? 29 | 30 | open var cornerRadius: CGFloat = 3 { 31 | didSet { 32 | layer.cornerRadius = cornerRadius 33 | layer.masksToBounds = cornerRadius > 0 34 | } 35 | } 36 | 37 | open var borderWidth: CGFloat = 1 { 38 | didSet { 39 | layer.borderWidth = borderWidth 40 | } 41 | } 42 | 43 | open var font: UIFont = UIFont.systemFont(ofSize: 14) { 44 | didSet { 45 | if let segmentButtons = _segmentButtons { 46 | for (_, button) in segmentButtons.enumerated() { 47 | button.titleLabel?.font = font 48 | } 49 | } 50 | } 51 | } 52 | 53 | override open var tintColor: UIColor! { 54 | didSet { 55 | layer.borderColor = tintColor.cgColor 56 | if let segmentButtons = _segmentButtons { 57 | for (index, button) in segmentButtons.enumerated() { 58 | button.isHighlighted = selectedSegmentIndices.contains(index) 59 | } 60 | } 61 | } 62 | } 63 | 64 | open override var backgroundColor: UIColor? { 65 | didSet { 66 | if let segmentButtons = _segmentButtons { 67 | for (index, button) in segmentButtons.enumerated() { 68 | button.isHighlighted = selectedSegmentIndices.contains(index) 69 | } 70 | } 71 | } 72 | } 73 | 74 | /// Returns the number of segments the receiver has. (read-only) 75 | open var numberOfSegments: Int { 76 | 77 | guard let segments = _segmentButtons , segments.count > 0 else { 78 | return 0 79 | } 80 | 81 | return segments.count 82 | } 83 | 84 | /** 85 | An array with the currently selected segment indices of the receiver. 86 | */ 87 | open var selectedSegmentIndices: [Int] { 88 | 89 | get { 90 | 91 | guard let segments = _segmentButtons , segments.count > 0 else { 92 | return [] 93 | } 94 | 95 | var indices: [Int] = [] 96 | 97 | for (index, segmentButton) in segments.enumerated() { 98 | if segmentButton.isButtonSelected && segmentButton.isButtonEnabled { 99 | indices.append(index) 100 | } 101 | } 102 | 103 | return indices 104 | 105 | } 106 | 107 | set { 108 | 109 | guard let segments = _segmentButtons , segments.count > 0 else { 110 | return 111 | } 112 | 113 | _deselectAllSegments() 114 | 115 | for index in newValue { 116 | if segments[index].isButtonEnabled { 117 | segments[index].setButtonSelected(true) 118 | } 119 | } 120 | 121 | } 122 | 123 | } 124 | 125 | // MARK: - Initialisers 126 | 127 | /** 128 | Initialises and returns a multiple-selection segmented control having the given titles. 129 | 130 | - parameter items: An array of `String` objects with the segments titles 131 | - returns: An initialised `MultiSelectionSegmentedControl` object 132 | */ 133 | public init(items: [String]?) { 134 | 135 | _items = items 136 | 137 | super.init(frame: CGRect.zero) 138 | _configureAppearance() 139 | 140 | } 141 | 142 | required public init?(coder aDecoder: NSCoder) { 143 | super.init(coder: aDecoder) 144 | } 145 | 146 | open override func awakeFromNib() { 147 | super.awakeFromNib() 148 | _configureAppearance() 149 | } 150 | 151 | // MARK: - Public Methods 152 | override open func layoutSubviews() { 153 | 154 | guard let items = _items , items.count > 0 else { 155 | return 156 | } 157 | 158 | if subviews.count == 0 { 159 | 160 | _segmentButtons = [] 161 | 162 | 163 | let buttonWidth = frame.width / CGFloat(items.count) 164 | let buttonHeight = frame.height 165 | 166 | for (index, segmentTitle) in items.enumerated() { 167 | let buttonFrame = CGRect(x: CGFloat(index)*buttonWidth, y: 0, width: buttonWidth, height: buttonHeight) 168 | 169 | let button = ATHMultiSelectionControlSegmentButton(frame: buttonFrame) 170 | 171 | button.titleLabel?.font = font 172 | button.tintColor = tintColor 173 | button.backgroundColor = backgroundColor 174 | button.setButtonSelected(selectedSegmentIndices.contains(index)) 175 | button.addTarget(self, action: #selector(self._didTouchUpInsideSegment(_:)), for: .touchUpInside) 176 | 177 | button.setTitle(segmentTitle, for: .normal) 178 | 179 | _segmentButtons?.append(button) 180 | 181 | self.addSubview(button) 182 | 183 | } 184 | 185 | } 186 | else { 187 | if let segmentButtons = _segmentButtons { 188 | let buttonWidth = frame.width / CGFloat(segmentButtons.count) 189 | let buttonHeight = frame.height 190 | 191 | for (index, button) in segmentButtons.enumerated() { 192 | let buttonFrame = CGRect(x: CGFloat(index)*buttonWidth, y: 0, width: buttonWidth, height: buttonHeight) 193 | button.frame = buttonFrame 194 | button.setButtonSelected(selectedSegmentIndices.contains(index)) 195 | } 196 | } 197 | } 198 | 199 | } 200 | 201 | // MARK: Managing Segment Content 202 | /** 203 | Sets the title of a segment. 204 | 205 | - parameter title: A string to display in the segments as its title. 206 | - parameter segment: An index number identifying a segment in the control. 207 | It must be a number between 0 and the number of segments (numberOfSegments) minus 1; values exceeding this upper range are pinned to it. 208 | */ 209 | open func setTitle(_ title: String, forSegmentAtIndex segment: Int) { 210 | 211 | guard let segments = _segmentButtons , segments.count > 0 && segment >= 0 else { 212 | return 213 | } 214 | 215 | let index = segment > segments.count - 1 ? segments.count - 1 : segment 216 | 217 | segments[index].setTitle(title, for: .normal) 218 | 219 | } 220 | 221 | /** 222 | Returns the title of the specified segment. 223 | 224 | - parameter segment: An index number identifying a segment in the control. It must be a number between 0 and the number of segments (numberOfSegments) 225 | minus 1; values exceeding this upper range are pinned to it. 226 | - returns: Returns the string (title) assigned to the receiver as content. 227 | */ 228 | open func titleForSegmentAtIndex(_ segment: Int) -> String? { 229 | 230 | guard let segments = _segmentButtons , segments.count > 0 && segment >= 0 else { 231 | return nil 232 | } 233 | 234 | let index = segment > segments.count - 1 ? segments.count - 1 : segment 235 | 236 | return segments[index].titleLabel?.text 237 | 238 | } 239 | 240 | // MARK: Managing Segment Behavior 241 | 242 | /** 243 | Enables the specified segment. 244 | 245 | - parameter enabled: `true` to enable the specified segment or `false` to disable the segment. 246 | By default all segments are enabled 247 | */ 248 | open func setEnabled(_ enabled: Bool, forSegmentAtIndex segment: Int) { 249 | 250 | DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(0 * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC)) { () -> Void in 251 | 252 | guard let segments = self._segmentButtons , segments.count > 0 && segment >= 0 else { 253 | return 254 | } 255 | 256 | let index = segment > segments.count - 1 ? segments.count - 1 : segment 257 | segments[index].setButtonEnabled(enabled) 258 | 259 | } 260 | 261 | } 262 | 263 | /** 264 | Returns whether the indicated segment is enabled. 265 | 266 | - parameter segment: An index number identifying a segment in the control. It must be a number between 0 and the number of segments (numberOfSegments) minus 1; 267 | values exceeding this upper range are pinned to it. 268 | 269 | - returns: `true` if the given segment is enabled and `false` if the segment is disabled. By default, segments are enabled. 270 | */ 271 | open func isEnabledForSegmentAtIndex(_ segment: Int) -> Bool { 272 | 273 | guard let segments = _segmentButtons , segments.count > 0 && segment >= 0 else { 274 | return false 275 | } 276 | 277 | let index = segment > segments.count - 1 ? segments.count - 1 : segment 278 | 279 | return segments[index].isButtonEnabled 280 | 281 | } 282 | 283 | // MARK: Managing Segments 284 | /** 285 | Creates a number of segments based on the passed array of titles 286 | 287 | - parameter titles: The titles of the segments to create. 288 | */ 289 | open func insertSegmentsWithTitles(_ titles: [String]) { 290 | 291 | _items = titles 292 | _configureAppearance() 293 | 294 | setNeedsLayout() 295 | 296 | } 297 | 298 | /** 299 | Inserts a segment at a specific position in the receiver and gives it a title as content. 300 | 301 | - parameter title: A string to use as the segment’s title. 302 | - parameter segment: An index number identifying a segment in the control. The new segment is inserted just before the designated one. 303 | - parameter animated: true if the insertion of the new segment should be animated, otherwise false. 304 | */ 305 | open func insertSegmentWithTitle(_ title: String, atIndex segment: Int, animated: Bool) { 306 | 307 | guard segment >= 0 else { 308 | return 309 | } 310 | 311 | if numberOfSegments == 0 { 312 | _configureAppearance() 313 | } 314 | 315 | let index = segment 316 | 317 | if _items == nil { _items = [] } 318 | if _segmentButtons == nil { _segmentButtons = [] } 319 | 320 | if index > _items!.count { 321 | _items!.append(title) 322 | } else { 323 | _items!.insert(title, at: index) 324 | } 325 | 326 | let button = ATHMultiSelectionControlSegmentButton(frame: CGRect(x: self.frame.width, y: 0, width: 0, height: self.frame.height)) 327 | 328 | button.tintColor = tintColor 329 | button.backgroundColor = backgroundColor 330 | button.addTarget(self, action: #selector(self._didTouchUpInsideSegment(_:)), for: .touchUpInside) 331 | 332 | button.setTitle(title, for: .normal) 333 | 334 | addSubview(button) 335 | 336 | if index > _segmentButtons!.count { 337 | _segmentButtons?.append(button) 338 | } else { 339 | _segmentButtons!.insert(button, at: index) 340 | } 341 | 342 | let duration = animated ? 0.35 : 0 343 | 344 | UIView.animate(withDuration: duration, animations: { 345 | 346 | for (index, segment) in self._segmentButtons!.enumerated() { 347 | 348 | let buttonWidth = self.frame.width / CGFloat(self._items!.count) 349 | let buttonHeight = self.frame.height 350 | 351 | let buttonFrame = CGRect(x: CGFloat(index)*buttonWidth, y: 0, width: buttonWidth, height: buttonHeight) 352 | segment.frame = buttonFrame 353 | 354 | } 355 | 356 | }) 357 | 358 | } 359 | 360 | /** 361 | Removes the specified segment from the receiver, optionally animating the transition. 362 | 363 | - parameter segment: An index number identifying a segment in the control. It must be a number between 0 and the number of segments (numberOfSegments) minus 1; 364 | values exceeding this upper range are pinned to it. 365 | - parameter animated: `true` if the removal of the new segment should be animated, otherwise `false`. 366 | */ 367 | open func removeSegmentAtIndex(_ segment: Int, animated: Bool) { 368 | 369 | guard var segments = _segmentButtons , segments.count > 0 && segment >= 0 else { 370 | return 371 | } 372 | 373 | // if segment is out of range pin it 374 | let index = segment > segments.count - 1 ? segments.count - 1 : segment 375 | 376 | _items!.remove(at: index) 377 | 378 | segments[index].removeFromSuperview() 379 | segments.remove(at: index) 380 | _segmentButtons!.remove(at: index) 381 | 382 | let duration = animated ? 0.35 : 0 383 | 384 | UIView.animate(withDuration: duration, animations: { 385 | for (index, _) in segments.enumerated() { 386 | 387 | let buttonWidth = self.frame.width / CGFloat(segments.count) 388 | let buttonHeight = self.frame.height 389 | 390 | segments[index].frame = CGRect(x: CGFloat(index)*buttonWidth, y: 0, width: buttonWidth, height: buttonHeight) 391 | 392 | } 393 | }) 394 | 395 | if segments.count == 0 { 396 | layer.borderWidth = 0 397 | } 398 | 399 | } 400 | 401 | /** 402 | Removes all segments of the receiver. 403 | */ 404 | open func removeAllSegments() { 405 | 406 | layer.borderWidth = 0 407 | 408 | _segmentButtons?.forEach { segment in 409 | segment.removeFromSuperview() 410 | } 411 | _segmentButtons?.removeAll() 412 | _items?.removeAll() 413 | 414 | } 415 | 416 | // MARK: - Private Methods 417 | /** 418 | Configures the control's appearance: 419 | - Clears background color 420 | - Sets corner radius 421 | - Sets border width and color 422 | */ 423 | fileprivate func _configureAppearance() { 424 | 425 | // backgroundColor = UIColor.clearColor() 426 | layer.cornerRadius = cornerRadius 427 | layer.masksToBounds = true 428 | layer.borderWidth = 1.0 429 | layer.borderColor = tintColor.cgColor 430 | 431 | if UIApplication.shared.userInterfaceLayoutDirection == .rightToLeft { 432 | _flipHorizontally() 433 | } 434 | 435 | } 436 | 437 | /** 438 | Selector to the control's segment buttons. Handles selecting/deselecting segments 439 | according to whether they are enabled or not. 440 | */ 441 | @objc fileprivate func _didTouchUpInsideSegment(_ segmentButton: ATHMultiSelectionControlSegmentButton) { 442 | 443 | guard let segmentButtons = _segmentButtons , segmentButtons.count > 0 else { 444 | return 445 | } 446 | 447 | guard segmentButton.isButtonEnabled else { 448 | return 449 | } 450 | 451 | if segmentButton.isButtonSelected { 452 | segmentButton.setButtonSelected(false) 453 | } else { 454 | segmentButton.setButtonSelected(true) 455 | } 456 | 457 | delegate?.multiSelectionSegmentedControl(self, selectedIndices: selectedSegmentIndices) 458 | 459 | } 460 | 461 | /** 462 | Deselects all segments of the segmented control 463 | */ 464 | fileprivate func _deselectAllSegments() { 465 | 466 | guard let segments = _segmentButtons , segments.count > 0 else { 467 | return 468 | } 469 | 470 | segments.forEach { segment in 471 | segment.setButtonSelected(false) 472 | } 473 | 474 | } 475 | 476 | /** 477 | Flips (horizontally) the segmented control and all its component segments 478 | */ 479 | fileprivate func _flipHorizontally() { 480 | 481 | guard let segments = _segmentButtons , segments.count > 0 else { 482 | return 483 | } 484 | 485 | self.transform = CGAffineTransform(scaleX: -1, y: 1) 486 | 487 | segments.forEach { segment in 488 | segment.transform = CGAffineTransform(scaleX: -1, y: 1) 489 | } 490 | 491 | } 492 | 493 | } 494 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 05DDF13078D347182654D5CF /* Pods_ATHMultiSelectionSegmentedControl_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 082D3F33D51F31B5559AD3E8 /* Pods_ATHMultiSelectionSegmentedControl_Example.framework */; }; 11 | 4D796BD31D05E7E900CA0F00 /* ATHMultiSelectionSegmentedControlTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D796BD11D05E7DD00CA0F00 /* ATHMultiSelectionSegmentedControlTests.swift */; }; 12 | 4D9938091DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D9938071DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl.h */; settings = {ATTRIBUTES = (Public, ); }; }; 13 | 4D9938111DD8B4F700DAD213 /* ATHMultiSelectionControlSegmentButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D99380F1DD8B4F700DAD213 /* ATHMultiSelectionControlSegmentButton.swift */; }; 14 | 4D9938121DD8B4F700DAD213 /* ATHMultiSelectionSegmentedControl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D9938101DD8B4F700DAD213 /* ATHMultiSelectionSegmentedControl.swift */; }; 15 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; 16 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; 17 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; 18 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; 19 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 20 | 81F51D8D8A6AE6339023F6CE /* Pods_ATHMultiSelectionSegmentedControl_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51E9094BB37854DB5D708176 /* Pods_ATHMultiSelectionSegmentedControl_Tests.framework */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXContainerItemProxy section */ 24 | 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { 25 | isa = PBXContainerItemProxy; 26 | containerPortal = 607FACC81AFB9204008FA782 /* Project object */; 27 | proxyType = 1; 28 | remoteGlobalIDString = 607FACCF1AFB9204008FA782; 29 | remoteInfo = ATHMultiSelectionSegmentedControl; 30 | }; 31 | /* End PBXContainerItemProxy section */ 32 | 33 | /* Begin PBXCopyFilesBuildPhase section */ 34 | 4D9937EE1DD8996B00DAD213 /* Embed Frameworks */ = { 35 | isa = PBXCopyFilesBuildPhase; 36 | buildActionMask = 2147483647; 37 | dstPath = ""; 38 | dstSubfolderSpec = 10; 39 | files = ( 40 | ); 41 | name = "Embed Frameworks"; 42 | runOnlyForDeploymentPostprocessing = 0; 43 | }; 44 | /* End PBXCopyFilesBuildPhase section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 082D3F33D51F31B5559AD3E8 /* Pods_ATHMultiSelectionSegmentedControl_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ATHMultiSelectionSegmentedControl_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 11196A8CF97C486FC2B0D302 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; 49 | 1B0E1020D83AD7AFBFF30EF1 /* Pods-ATHMultiSelectionSegmentedControl_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ATHMultiSelectionSegmentedControl_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example.debug.xcconfig"; sourceTree = ""; }; 50 | 2769D367A19A8F4D737DB23D /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = ""; }; 51 | 45A662688298A735AAE4EAA8 /* Pods-ATHMultiSelectionSegmentedControl_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ATHMultiSelectionSegmentedControl_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests.release.xcconfig"; sourceTree = ""; }; 52 | 4D796BD11D05E7DD00CA0F00 /* ATHMultiSelectionSegmentedControlTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ATHMultiSelectionSegmentedControlTests.swift; sourceTree = ""; }; 53 | 4D9937E41DD8996B00DAD213 /* ATHMultiSelectionSegmentedControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ATHMultiSelectionSegmentedControl.h; sourceTree = ""; }; 54 | 4D9937E51DD8996B00DAD213 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 55 | 4D9938051DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = ATHMultiSelectionSegmentedControl.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 4D9938071DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ATHMultiSelectionSegmentedControl.h; sourceTree = ""; }; 57 | 4D9938081DD8B44D00DAD213 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | 4D99380F1DD8B4F700DAD213 /* ATHMultiSelectionControlSegmentButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ATHMultiSelectionControlSegmentButton.swift; path = ../../ATHMultiSelectionSegmentedControl/Classes/ATHMultiSelectionControlSegmentButton.swift; sourceTree = ""; }; 59 | 4D9938101DD8B4F700DAD213 /* ATHMultiSelectionSegmentedControl.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ATHMultiSelectionSegmentedControl.swift; path = ../../ATHMultiSelectionSegmentedControl/Classes/ATHMultiSelectionSegmentedControl.swift; sourceTree = ""; }; 60 | 51E9094BB37854DB5D708176 /* Pods_ATHMultiSelectionSegmentedControl_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ATHMultiSelectionSegmentedControl_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 61 | 607FACD01AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ATHMultiSelectionSegmentedControl_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; 62 | 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 63 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 64 | 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 65 | 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 66 | 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 67 | 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 68 | 607FACE51AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ATHMultiSelectionSegmentedControl_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 69 | 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 70 | A095ABEE7B69D7344D756EA2 /* Pods-ATHMultiSelectionSegmentedControl_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ATHMultiSelectionSegmentedControl_Example.release.xcconfig"; path = "Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example.release.xcconfig"; sourceTree = ""; }; 71 | A9BF265CAB9E2333FB668A2E /* ATHMultiSelectionSegmentedControl.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ATHMultiSelectionSegmentedControl.podspec; path = ../ATHMultiSelectionSegmentedControl.podspec; sourceTree = ""; }; 72 | AE773375C1AD31AF0D725F93 /* Pods-ATHMultiSelectionSegmentedControl_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ATHMultiSelectionSegmentedControl_Tests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests.debug.xcconfig"; sourceTree = ""; }; 73 | /* End PBXFileReference section */ 74 | 75 | /* Begin PBXFrameworksBuildPhase section */ 76 | 4D9938011DD8B44D00DAD213 /* Frameworks */ = { 77 | isa = PBXFrameworksBuildPhase; 78 | buildActionMask = 2147483647; 79 | files = ( 80 | ); 81 | runOnlyForDeploymentPostprocessing = 0; 82 | }; 83 | 607FACCD1AFB9204008FA782 /* Frameworks */ = { 84 | isa = PBXFrameworksBuildPhase; 85 | buildActionMask = 2147483647; 86 | files = ( 87 | 05DDF13078D347182654D5CF /* Pods_ATHMultiSelectionSegmentedControl_Example.framework in Frameworks */, 88 | ); 89 | runOnlyForDeploymentPostprocessing = 0; 90 | }; 91 | 607FACE21AFB9204008FA782 /* Frameworks */ = { 92 | isa = PBXFrameworksBuildPhase; 93 | buildActionMask = 2147483647; 94 | files = ( 95 | 81F51D8D8A6AE6339023F6CE /* Pods_ATHMultiSelectionSegmentedControl_Tests.framework in Frameworks */, 96 | ); 97 | runOnlyForDeploymentPostprocessing = 0; 98 | }; 99 | /* End PBXFrameworksBuildPhase section */ 100 | 101 | /* Begin PBXGroup section */ 102 | 4D9937E31DD8996B00DAD213 /* ATHMultiSelectionSegmentedControl */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | 4D9937E41DD8996B00DAD213 /* ATHMultiSelectionSegmentedControl.h */, 106 | 4D9937E51DD8996B00DAD213 /* Info.plist */, 107 | ); 108 | path = ATHMultiSelectionSegmentedControl; 109 | sourceTree = ""; 110 | }; 111 | 4D9938061DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl */ = { 112 | isa = PBXGroup; 113 | children = ( 114 | 4D9938071DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl.h */, 115 | 4D99380F1DD8B4F700DAD213 /* ATHMultiSelectionControlSegmentButton.swift */, 116 | 4D9938101DD8B4F700DAD213 /* ATHMultiSelectionSegmentedControl.swift */, 117 | 4D9938081DD8B44D00DAD213 /* Info.plist */, 118 | ); 119 | path = ATHMultiSelectionSegmentedControl; 120 | sourceTree = ""; 121 | }; 122 | 607FACC71AFB9204008FA782 = { 123 | isa = PBXGroup; 124 | children = ( 125 | 607FACF51AFB993E008FA782 /* Podspec Metadata */, 126 | 607FACD21AFB9204008FA782 /* Example for ATHMultiSelectionSegmentedControl */, 127 | 607FACE81AFB9204008FA782 /* Tests */, 128 | 4D9937E31DD8996B00DAD213 /* ATHMultiSelectionSegmentedControl */, 129 | 4D9938061DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl */, 130 | 607FACD11AFB9204008FA782 /* Products */, 131 | DBD5C5C9C8DEA24A5CD05402 /* Pods */, 132 | E91E566443CD3684B07E2953 /* Frameworks */, 133 | ); 134 | sourceTree = ""; 135 | }; 136 | 607FACD11AFB9204008FA782 /* Products */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 607FACD01AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Example.app */, 140 | 607FACE51AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Tests.xctest */, 141 | 4D9938051DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl.framework */, 142 | ); 143 | name = Products; 144 | sourceTree = ""; 145 | }; 146 | 607FACD21AFB9204008FA782 /* Example for ATHMultiSelectionSegmentedControl */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 607FACD51AFB9204008FA782 /* AppDelegate.swift */, 150 | 607FACD71AFB9204008FA782 /* ViewController.swift */, 151 | 607FACD91AFB9204008FA782 /* Main.storyboard */, 152 | 607FACDC1AFB9204008FA782 /* Images.xcassets */, 153 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, 154 | 607FACD31AFB9204008FA782 /* Supporting Files */, 155 | ); 156 | name = "Example for ATHMultiSelectionSegmentedControl"; 157 | path = ATHMultiSelectionSegmentedControl; 158 | sourceTree = ""; 159 | }; 160 | 607FACD31AFB9204008FA782 /* Supporting Files */ = { 161 | isa = PBXGroup; 162 | children = ( 163 | 607FACD41AFB9204008FA782 /* Info.plist */, 164 | ); 165 | name = "Supporting Files"; 166 | sourceTree = ""; 167 | }; 168 | 607FACE81AFB9204008FA782 /* Tests */ = { 169 | isa = PBXGroup; 170 | children = ( 171 | 4D796BD11D05E7DD00CA0F00 /* ATHMultiSelectionSegmentedControlTests.swift */, 172 | 607FACE91AFB9204008FA782 /* Supporting Files */, 173 | ); 174 | path = Tests; 175 | sourceTree = ""; 176 | }; 177 | 607FACE91AFB9204008FA782 /* Supporting Files */ = { 178 | isa = PBXGroup; 179 | children = ( 180 | 607FACEA1AFB9204008FA782 /* Info.plist */, 181 | ); 182 | name = "Supporting Files"; 183 | sourceTree = ""; 184 | }; 185 | 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { 186 | isa = PBXGroup; 187 | children = ( 188 | A9BF265CAB9E2333FB668A2E /* ATHMultiSelectionSegmentedControl.podspec */, 189 | 2769D367A19A8F4D737DB23D /* README.md */, 190 | 11196A8CF97C486FC2B0D302 /* LICENSE */, 191 | ); 192 | name = "Podspec Metadata"; 193 | sourceTree = ""; 194 | }; 195 | DBD5C5C9C8DEA24A5CD05402 /* Pods */ = { 196 | isa = PBXGroup; 197 | children = ( 198 | 1B0E1020D83AD7AFBFF30EF1 /* Pods-ATHMultiSelectionSegmentedControl_Example.debug.xcconfig */, 199 | A095ABEE7B69D7344D756EA2 /* Pods-ATHMultiSelectionSegmentedControl_Example.release.xcconfig */, 200 | AE773375C1AD31AF0D725F93 /* Pods-ATHMultiSelectionSegmentedControl_Tests.debug.xcconfig */, 201 | 45A662688298A735AAE4EAA8 /* Pods-ATHMultiSelectionSegmentedControl_Tests.release.xcconfig */, 202 | ); 203 | name = Pods; 204 | sourceTree = ""; 205 | }; 206 | E91E566443CD3684B07E2953 /* Frameworks */ = { 207 | isa = PBXGroup; 208 | children = ( 209 | 082D3F33D51F31B5559AD3E8 /* Pods_ATHMultiSelectionSegmentedControl_Example.framework */, 210 | 51E9094BB37854DB5D708176 /* Pods_ATHMultiSelectionSegmentedControl_Tests.framework */, 211 | ); 212 | name = Frameworks; 213 | sourceTree = ""; 214 | }; 215 | /* End PBXGroup section */ 216 | 217 | /* Begin PBXHeadersBuildPhase section */ 218 | 4D9938021DD8B44D00DAD213 /* Headers */ = { 219 | isa = PBXHeadersBuildPhase; 220 | buildActionMask = 2147483647; 221 | files = ( 222 | 4D9938091DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl.h in Headers */, 223 | ); 224 | runOnlyForDeploymentPostprocessing = 0; 225 | }; 226 | /* End PBXHeadersBuildPhase section */ 227 | 228 | /* Begin PBXNativeTarget section */ 229 | 4D9938041DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl */ = { 230 | isa = PBXNativeTarget; 231 | buildConfigurationList = 4D99380A1DD8B44D00DAD213 /* Build configuration list for PBXNativeTarget "ATHMultiSelectionSegmentedControl" */; 232 | buildPhases = ( 233 | 4D9938001DD8B44D00DAD213 /* Sources */, 234 | 4D9938011DD8B44D00DAD213 /* Frameworks */, 235 | 4D9938021DD8B44D00DAD213 /* Headers */, 236 | 4D9938031DD8B44D00DAD213 /* Resources */, 237 | ); 238 | buildRules = ( 239 | ); 240 | dependencies = ( 241 | ); 242 | name = ATHMultiSelectionSegmentedControl; 243 | productName = ATHMultiSelectionSegmentedControl; 244 | productReference = 4D9938051DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl.framework */; 245 | productType = "com.apple.product-type.framework"; 246 | }; 247 | 607FACCF1AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Example */ = { 248 | isa = PBXNativeTarget; 249 | buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ATHMultiSelectionSegmentedControl_Example" */; 250 | buildPhases = ( 251 | 8861E583EE9BE9AAE76FCED8 /* 📦 Check Pods Manifest.lock */, 252 | 09B35B2D2F8364D66A51DECB /* [CP] Check Pods Manifest.lock */, 253 | 607FACCC1AFB9204008FA782 /* Sources */, 254 | 607FACCD1AFB9204008FA782 /* Frameworks */, 255 | 607FACCE1AFB9204008FA782 /* Resources */, 256 | F33516182D55E0C96BC8E888 /* [CP] Embed Pods Frameworks */, 257 | D0A089C5FB3E0DED96BB0BF4 /* [CP] Copy Pods Resources */, 258 | DA78EA3DE134B288775135BC /* 📦 Embed Pods Frameworks */, 259 | BC2B40D084CBAFADFBE9792A /* 📦 Copy Pods Resources */, 260 | 4D9937EE1DD8996B00DAD213 /* Embed Frameworks */, 261 | ); 262 | buildRules = ( 263 | ); 264 | dependencies = ( 265 | ); 266 | name = ATHMultiSelectionSegmentedControl_Example; 267 | productName = ATHMultiSelectionSegmentedControl; 268 | productReference = 607FACD01AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Example.app */; 269 | productType = "com.apple.product-type.application"; 270 | }; 271 | 607FACE41AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Tests */ = { 272 | isa = PBXNativeTarget; 273 | buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ATHMultiSelectionSegmentedControl_Tests" */; 274 | buildPhases = ( 275 | ABF739092FECEECEC9994DCE /* 📦 Check Pods Manifest.lock */, 276 | B211F59A2C1452EF269CA53A /* [CP] Check Pods Manifest.lock */, 277 | 607FACE11AFB9204008FA782 /* Sources */, 278 | 607FACE21AFB9204008FA782 /* Frameworks */, 279 | 607FACE31AFB9204008FA782 /* Resources */, 280 | 75F934903169AC1917D7B763 /* [CP] Embed Pods Frameworks */, 281 | D10F3B9FE442F67411566606 /* [CP] Copy Pods Resources */, 282 | 6DAD0EA19B1CC730C945EC76 /* 📦 Embed Pods Frameworks */, 283 | B5F616002D89602248238573 /* 📦 Copy Pods Resources */, 284 | ); 285 | buildRules = ( 286 | ); 287 | dependencies = ( 288 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */, 289 | ); 290 | name = ATHMultiSelectionSegmentedControl_Tests; 291 | productName = Tests; 292 | productReference = 607FACE51AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Tests.xctest */; 293 | productType = "com.apple.product-type.bundle.unit-test"; 294 | }; 295 | /* End PBXNativeTarget section */ 296 | 297 | /* Begin PBXProject section */ 298 | 607FACC81AFB9204008FA782 /* Project object */ = { 299 | isa = PBXProject; 300 | attributes = { 301 | LastSwiftUpdateCheck = 0720; 302 | LastUpgradeCheck = 0910; 303 | ORGANIZATIONNAME = CocoaPods; 304 | TargetAttributes = { 305 | 4D9938041DD8B44D00DAD213 = { 306 | CreatedOnToolsVersion = 8.1; 307 | DevelopmentTeam = SEWZXLUE96; 308 | LastSwiftMigration = 0910; 309 | ProvisioningStyle = Automatic; 310 | }; 311 | 607FACCF1AFB9204008FA782 = { 312 | CreatedOnToolsVersion = 6.3.1; 313 | LastSwiftMigration = 0910; 314 | }; 315 | 607FACE41AFB9204008FA782 = { 316 | CreatedOnToolsVersion = 6.3.1; 317 | LastSwiftMigration = 0910; 318 | TestTargetID = 607FACCF1AFB9204008FA782; 319 | }; 320 | }; 321 | }; 322 | buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "ATHMultiSelectionSegmentedControl" */; 323 | compatibilityVersion = "Xcode 3.2"; 324 | developmentRegion = English; 325 | hasScannedForEncodings = 0; 326 | knownRegions = ( 327 | en, 328 | Base, 329 | ); 330 | mainGroup = 607FACC71AFB9204008FA782; 331 | productRefGroup = 607FACD11AFB9204008FA782 /* Products */; 332 | projectDirPath = ""; 333 | projectRoot = ""; 334 | targets = ( 335 | 607FACCF1AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Example */, 336 | 607FACE41AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Tests */, 337 | 4D9938041DD8B44D00DAD213 /* ATHMultiSelectionSegmentedControl */, 338 | ); 339 | }; 340 | /* End PBXProject section */ 341 | 342 | /* Begin PBXResourcesBuildPhase section */ 343 | 4D9938031DD8B44D00DAD213 /* Resources */ = { 344 | isa = PBXResourcesBuildPhase; 345 | buildActionMask = 2147483647; 346 | files = ( 347 | ); 348 | runOnlyForDeploymentPostprocessing = 0; 349 | }; 350 | 607FACCE1AFB9204008FA782 /* Resources */ = { 351 | isa = PBXResourcesBuildPhase; 352 | buildActionMask = 2147483647; 353 | files = ( 354 | 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, 355 | 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, 356 | 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, 357 | ); 358 | runOnlyForDeploymentPostprocessing = 0; 359 | }; 360 | 607FACE31AFB9204008FA782 /* Resources */ = { 361 | isa = PBXResourcesBuildPhase; 362 | buildActionMask = 2147483647; 363 | files = ( 364 | ); 365 | runOnlyForDeploymentPostprocessing = 0; 366 | }; 367 | /* End PBXResourcesBuildPhase section */ 368 | 369 | /* Begin PBXShellScriptBuildPhase section */ 370 | 09B35B2D2F8364D66A51DECB /* [CP] Check Pods Manifest.lock */ = { 371 | isa = PBXShellScriptBuildPhase; 372 | buildActionMask = 2147483647; 373 | files = ( 374 | ); 375 | inputPaths = ( 376 | ); 377 | name = "[CP] Check Pods Manifest.lock"; 378 | outputPaths = ( 379 | ); 380 | runOnlyForDeploymentPostprocessing = 0; 381 | shellPath = /bin/sh; 382 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 383 | showEnvVarsInLog = 0; 384 | }; 385 | 6DAD0EA19B1CC730C945EC76 /* 📦 Embed Pods Frameworks */ = { 386 | isa = PBXShellScriptBuildPhase; 387 | buildActionMask = 2147483647; 388 | files = ( 389 | ); 390 | inputPaths = ( 391 | ); 392 | name = "📦 Embed Pods Frameworks"; 393 | outputPaths = ( 394 | ); 395 | runOnlyForDeploymentPostprocessing = 0; 396 | shellPath = /bin/sh; 397 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests-frameworks.sh\"\n"; 398 | showEnvVarsInLog = 0; 399 | }; 400 | 75F934903169AC1917D7B763 /* [CP] Embed Pods Frameworks */ = { 401 | isa = PBXShellScriptBuildPhase; 402 | buildActionMask = 2147483647; 403 | files = ( 404 | ); 405 | inputPaths = ( 406 | ); 407 | name = "[CP] Embed Pods Frameworks"; 408 | outputPaths = ( 409 | ); 410 | runOnlyForDeploymentPostprocessing = 0; 411 | shellPath = /bin/sh; 412 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests-frameworks.sh\"\n"; 413 | showEnvVarsInLog = 0; 414 | }; 415 | 8861E583EE9BE9AAE76FCED8 /* 📦 Check Pods Manifest.lock */ = { 416 | isa = PBXShellScriptBuildPhase; 417 | buildActionMask = 2147483647; 418 | files = ( 419 | ); 420 | inputPaths = ( 421 | ); 422 | name = "📦 Check Pods Manifest.lock"; 423 | outputPaths = ( 424 | ); 425 | runOnlyForDeploymentPostprocessing = 0; 426 | shellPath = /bin/sh; 427 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 428 | showEnvVarsInLog = 0; 429 | }; 430 | ABF739092FECEECEC9994DCE /* 📦 Check Pods Manifest.lock */ = { 431 | isa = PBXShellScriptBuildPhase; 432 | buildActionMask = 2147483647; 433 | files = ( 434 | ); 435 | inputPaths = ( 436 | ); 437 | name = "📦 Check Pods Manifest.lock"; 438 | outputPaths = ( 439 | ); 440 | runOnlyForDeploymentPostprocessing = 0; 441 | shellPath = /bin/sh; 442 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; 443 | showEnvVarsInLog = 0; 444 | }; 445 | B211F59A2C1452EF269CA53A /* [CP] Check Pods Manifest.lock */ = { 446 | isa = PBXShellScriptBuildPhase; 447 | buildActionMask = 2147483647; 448 | files = ( 449 | ); 450 | inputPaths = ( 451 | ); 452 | name = "[CP] Check Pods Manifest.lock"; 453 | outputPaths = ( 454 | ); 455 | runOnlyForDeploymentPostprocessing = 0; 456 | shellPath = /bin/sh; 457 | shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 458 | showEnvVarsInLog = 0; 459 | }; 460 | B5F616002D89602248238573 /* 📦 Copy Pods Resources */ = { 461 | isa = PBXShellScriptBuildPhase; 462 | buildActionMask = 2147483647; 463 | files = ( 464 | ); 465 | inputPaths = ( 466 | ); 467 | name = "📦 Copy Pods Resources"; 468 | outputPaths = ( 469 | ); 470 | runOnlyForDeploymentPostprocessing = 0; 471 | shellPath = /bin/sh; 472 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests-resources.sh\"\n"; 473 | showEnvVarsInLog = 0; 474 | }; 475 | BC2B40D084CBAFADFBE9792A /* 📦 Copy Pods Resources */ = { 476 | isa = PBXShellScriptBuildPhase; 477 | buildActionMask = 2147483647; 478 | files = ( 479 | ); 480 | inputPaths = ( 481 | ); 482 | name = "📦 Copy Pods Resources"; 483 | outputPaths = ( 484 | ); 485 | runOnlyForDeploymentPostprocessing = 0; 486 | shellPath = /bin/sh; 487 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example-resources.sh\"\n"; 488 | showEnvVarsInLog = 0; 489 | }; 490 | D0A089C5FB3E0DED96BB0BF4 /* [CP] Copy Pods Resources */ = { 491 | isa = PBXShellScriptBuildPhase; 492 | buildActionMask = 2147483647; 493 | files = ( 494 | ); 495 | inputPaths = ( 496 | ); 497 | name = "[CP] Copy Pods Resources"; 498 | outputPaths = ( 499 | ); 500 | runOnlyForDeploymentPostprocessing = 0; 501 | shellPath = /bin/sh; 502 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example-resources.sh\"\n"; 503 | showEnvVarsInLog = 0; 504 | }; 505 | D10F3B9FE442F67411566606 /* [CP] Copy Pods Resources */ = { 506 | isa = PBXShellScriptBuildPhase; 507 | buildActionMask = 2147483647; 508 | files = ( 509 | ); 510 | inputPaths = ( 511 | ); 512 | name = "[CP] Copy Pods Resources"; 513 | outputPaths = ( 514 | ); 515 | runOnlyForDeploymentPostprocessing = 0; 516 | shellPath = /bin/sh; 517 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests-resources.sh\"\n"; 518 | showEnvVarsInLog = 0; 519 | }; 520 | DA78EA3DE134B288775135BC /* 📦 Embed Pods Frameworks */ = { 521 | isa = PBXShellScriptBuildPhase; 522 | buildActionMask = 2147483647; 523 | files = ( 524 | ); 525 | inputPaths = ( 526 | ); 527 | name = "📦 Embed Pods Frameworks"; 528 | outputPaths = ( 529 | ); 530 | runOnlyForDeploymentPostprocessing = 0; 531 | shellPath = /bin/sh; 532 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example-frameworks.sh\"\n"; 533 | showEnvVarsInLog = 0; 534 | }; 535 | F33516182D55E0C96BC8E888 /* [CP] Embed Pods Frameworks */ = { 536 | isa = PBXShellScriptBuildPhase; 537 | buildActionMask = 2147483647; 538 | files = ( 539 | ); 540 | inputPaths = ( 541 | ); 542 | name = "[CP] Embed Pods Frameworks"; 543 | outputPaths = ( 544 | ); 545 | runOnlyForDeploymentPostprocessing = 0; 546 | shellPath = /bin/sh; 547 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example-frameworks.sh\"\n"; 548 | showEnvVarsInLog = 0; 549 | }; 550 | /* End PBXShellScriptBuildPhase section */ 551 | 552 | /* Begin PBXSourcesBuildPhase section */ 553 | 4D9938001DD8B44D00DAD213 /* Sources */ = { 554 | isa = PBXSourcesBuildPhase; 555 | buildActionMask = 2147483647; 556 | files = ( 557 | 4D9938111DD8B4F700DAD213 /* ATHMultiSelectionControlSegmentButton.swift in Sources */, 558 | 4D9938121DD8B4F700DAD213 /* ATHMultiSelectionSegmentedControl.swift in Sources */, 559 | ); 560 | runOnlyForDeploymentPostprocessing = 0; 561 | }; 562 | 607FACCC1AFB9204008FA782 /* Sources */ = { 563 | isa = PBXSourcesBuildPhase; 564 | buildActionMask = 2147483647; 565 | files = ( 566 | 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, 567 | 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, 568 | ); 569 | runOnlyForDeploymentPostprocessing = 0; 570 | }; 571 | 607FACE11AFB9204008FA782 /* Sources */ = { 572 | isa = PBXSourcesBuildPhase; 573 | buildActionMask = 2147483647; 574 | files = ( 575 | 4D796BD31D05E7E900CA0F00 /* ATHMultiSelectionSegmentedControlTests.swift in Sources */, 576 | ); 577 | runOnlyForDeploymentPostprocessing = 0; 578 | }; 579 | /* End PBXSourcesBuildPhase section */ 580 | 581 | /* Begin PBXTargetDependency section */ 582 | 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { 583 | isa = PBXTargetDependency; 584 | target = 607FACCF1AFB9204008FA782 /* ATHMultiSelectionSegmentedControl_Example */; 585 | targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; 586 | }; 587 | /* End PBXTargetDependency section */ 588 | 589 | /* Begin PBXVariantGroup section */ 590 | 607FACD91AFB9204008FA782 /* Main.storyboard */ = { 591 | isa = PBXVariantGroup; 592 | children = ( 593 | 607FACDA1AFB9204008FA782 /* Base */, 594 | ); 595 | name = Main.storyboard; 596 | sourceTree = ""; 597 | }; 598 | 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { 599 | isa = PBXVariantGroup; 600 | children = ( 601 | 607FACDF1AFB9204008FA782 /* Base */, 602 | ); 603 | name = LaunchScreen.xib; 604 | sourceTree = ""; 605 | }; 606 | /* End PBXVariantGroup section */ 607 | 608 | /* Begin XCBuildConfiguration section */ 609 | 4D99380B1DD8B44D00DAD213 /* Debug */ = { 610 | isa = XCBuildConfiguration; 611 | buildSettings = { 612 | CLANG_ANALYZER_NONNULL = YES; 613 | CLANG_ENABLE_MODULES = YES; 614 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 615 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 616 | CODE_SIGN_IDENTITY = ""; 617 | CURRENT_PROJECT_VERSION = 1; 618 | DEBUG_INFORMATION_FORMAT = dwarf; 619 | DEFINES_MODULE = YES; 620 | DEVELOPMENT_TEAM = SEWZXLUE96; 621 | DYLIB_COMPATIBILITY_VERSION = 1; 622 | DYLIB_CURRENT_VERSION = 1; 623 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 624 | INFOPLIST_FILE = ATHMultiSelectionSegmentedControl/Info.plist; 625 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 626 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 627 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 628 | PRODUCT_BUNDLE_IDENTIFIER = com.attheodo.ATHMultiSelectionSegmentedControl; 629 | PRODUCT_NAME = "$(TARGET_NAME)"; 630 | SKIP_INSTALL = YES; 631 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 632 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 633 | SWIFT_VERSION = 3.0; 634 | TARGETED_DEVICE_FAMILY = "1,2"; 635 | VERSIONING_SYSTEM = "apple-generic"; 636 | VERSION_INFO_PREFIX = ""; 637 | }; 638 | name = Debug; 639 | }; 640 | 4D99380C1DD8B44D00DAD213 /* Release */ = { 641 | isa = XCBuildConfiguration; 642 | buildSettings = { 643 | CLANG_ANALYZER_NONNULL = YES; 644 | CLANG_ENABLE_MODULES = YES; 645 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 646 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 647 | CODE_SIGN_IDENTITY = ""; 648 | CURRENT_PROJECT_VERSION = 1; 649 | DEFINES_MODULE = YES; 650 | DEVELOPMENT_TEAM = SEWZXLUE96; 651 | DYLIB_COMPATIBILITY_VERSION = 1; 652 | DYLIB_CURRENT_VERSION = 1; 653 | DYLIB_INSTALL_NAME_BASE = "@rpath"; 654 | INFOPLIST_FILE = ATHMultiSelectionSegmentedControl/Info.plist; 655 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; 656 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 657 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 658 | PRODUCT_BUNDLE_IDENTIFIER = com.attheodo.ATHMultiSelectionSegmentedControl; 659 | PRODUCT_NAME = "$(TARGET_NAME)"; 660 | SKIP_INSTALL = YES; 661 | SWIFT_VERSION = 3.0; 662 | TARGETED_DEVICE_FAMILY = "1,2"; 663 | VERSIONING_SYSTEM = "apple-generic"; 664 | VERSION_INFO_PREFIX = ""; 665 | }; 666 | name = Release; 667 | }; 668 | 607FACED1AFB9204008FA782 /* Debug */ = { 669 | isa = XCBuildConfiguration; 670 | buildSettings = { 671 | ALWAYS_SEARCH_USER_PATHS = NO; 672 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 673 | CLANG_CXX_LIBRARY = "libc++"; 674 | CLANG_ENABLE_MODULES = YES; 675 | CLANG_ENABLE_OBJC_ARC = YES; 676 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 677 | CLANG_WARN_BOOL_CONVERSION = YES; 678 | CLANG_WARN_COMMA = YES; 679 | CLANG_WARN_CONSTANT_CONVERSION = YES; 680 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 681 | CLANG_WARN_EMPTY_BODY = YES; 682 | CLANG_WARN_ENUM_CONVERSION = YES; 683 | CLANG_WARN_INFINITE_RECURSION = YES; 684 | CLANG_WARN_INT_CONVERSION = YES; 685 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 686 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 687 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 688 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 689 | CLANG_WARN_STRICT_PROTOTYPES = YES; 690 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 691 | CLANG_WARN_UNREACHABLE_CODE = YES; 692 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 693 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 694 | COPY_PHASE_STRIP = NO; 695 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 696 | ENABLE_STRICT_OBJC_MSGSEND = YES; 697 | ENABLE_TESTABILITY = YES; 698 | GCC_C_LANGUAGE_STANDARD = gnu99; 699 | GCC_DYNAMIC_NO_PIC = NO; 700 | GCC_NO_COMMON_BLOCKS = YES; 701 | GCC_OPTIMIZATION_LEVEL = 0; 702 | GCC_PREPROCESSOR_DEFINITIONS = ( 703 | "DEBUG=1", 704 | "$(inherited)", 705 | ); 706 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 707 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 708 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 709 | GCC_WARN_UNDECLARED_SELECTOR = YES; 710 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 711 | GCC_WARN_UNUSED_FUNCTION = YES; 712 | GCC_WARN_UNUSED_VARIABLE = YES; 713 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 714 | MTL_ENABLE_DEBUG_INFO = YES; 715 | ONLY_ACTIVE_ARCH = YES; 716 | SDKROOT = iphoneos; 717 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 718 | SWIFT_VERSION = 3.0; 719 | }; 720 | name = Debug; 721 | }; 722 | 607FACEE1AFB9204008FA782 /* Release */ = { 723 | isa = XCBuildConfiguration; 724 | buildSettings = { 725 | ALWAYS_SEARCH_USER_PATHS = NO; 726 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 727 | CLANG_CXX_LIBRARY = "libc++"; 728 | CLANG_ENABLE_MODULES = YES; 729 | CLANG_ENABLE_OBJC_ARC = YES; 730 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 731 | CLANG_WARN_BOOL_CONVERSION = YES; 732 | CLANG_WARN_COMMA = YES; 733 | CLANG_WARN_CONSTANT_CONVERSION = YES; 734 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 735 | CLANG_WARN_EMPTY_BODY = YES; 736 | CLANG_WARN_ENUM_CONVERSION = YES; 737 | CLANG_WARN_INFINITE_RECURSION = YES; 738 | CLANG_WARN_INT_CONVERSION = YES; 739 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 740 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 741 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 742 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 743 | CLANG_WARN_STRICT_PROTOTYPES = YES; 744 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 745 | CLANG_WARN_UNREACHABLE_CODE = YES; 746 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 747 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 748 | COPY_PHASE_STRIP = NO; 749 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 750 | ENABLE_NS_ASSERTIONS = NO; 751 | ENABLE_STRICT_OBJC_MSGSEND = YES; 752 | GCC_C_LANGUAGE_STANDARD = gnu99; 753 | GCC_NO_COMMON_BLOCKS = YES; 754 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 755 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 756 | GCC_WARN_UNDECLARED_SELECTOR = YES; 757 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 758 | GCC_WARN_UNUSED_FUNCTION = YES; 759 | GCC_WARN_UNUSED_VARIABLE = YES; 760 | IPHONEOS_DEPLOYMENT_TARGET = 8.3; 761 | MTL_ENABLE_DEBUG_INFO = NO; 762 | SDKROOT = iphoneos; 763 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 764 | SWIFT_VERSION = 3.0; 765 | VALIDATE_PRODUCT = YES; 766 | }; 767 | name = Release; 768 | }; 769 | 607FACF01AFB9204008FA782 /* Debug */ = { 770 | isa = XCBuildConfiguration; 771 | baseConfigurationReference = 1B0E1020D83AD7AFBFF30EF1 /* Pods-ATHMultiSelectionSegmentedControl_Example.debug.xcconfig */; 772 | buildSettings = { 773 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 774 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 775 | INFOPLIST_FILE = ATHMultiSelectionSegmentedControl/Info.plist; 776 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 777 | MODULE_NAME = ExampleApp; 778 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 779 | PRODUCT_NAME = "$(TARGET_NAME)"; 780 | SWIFT_VERSION = 3.0; 781 | }; 782 | name = Debug; 783 | }; 784 | 607FACF11AFB9204008FA782 /* Release */ = { 785 | isa = XCBuildConfiguration; 786 | baseConfigurationReference = A095ABEE7B69D7344D756EA2 /* Pods-ATHMultiSelectionSegmentedControl_Example.release.xcconfig */; 787 | buildSettings = { 788 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 789 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 790 | INFOPLIST_FILE = ATHMultiSelectionSegmentedControl/Info.plist; 791 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 792 | MODULE_NAME = ExampleApp; 793 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; 794 | PRODUCT_NAME = "$(TARGET_NAME)"; 795 | SWIFT_VERSION = 3.0; 796 | }; 797 | name = Release; 798 | }; 799 | 607FACF31AFB9204008FA782 /* Debug */ = { 800 | isa = XCBuildConfiguration; 801 | baseConfigurationReference = AE773375C1AD31AF0D725F93 /* Pods-ATHMultiSelectionSegmentedControl_Tests.debug.xcconfig */; 802 | buildSettings = { 803 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 804 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 805 | GCC_PREPROCESSOR_DEFINITIONS = ( 806 | "DEBUG=1", 807 | "$(inherited)", 808 | ); 809 | INFOPLIST_FILE = Tests/Info.plist; 810 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 811 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 812 | PRODUCT_NAME = "$(TARGET_NAME)"; 813 | SWIFT_VERSION = 3.0; 814 | }; 815 | name = Debug; 816 | }; 817 | 607FACF41AFB9204008FA782 /* Release */ = { 818 | isa = XCBuildConfiguration; 819 | baseConfigurationReference = 45A662688298A735AAE4EAA8 /* Pods-ATHMultiSelectionSegmentedControl_Tests.release.xcconfig */; 820 | buildSettings = { 821 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 822 | FRAMEWORK_SEARCH_PATHS = "$(inherited)"; 823 | INFOPLIST_FILE = Tests/Info.plist; 824 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 825 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; 826 | PRODUCT_NAME = "$(TARGET_NAME)"; 827 | SWIFT_VERSION = 3.0; 828 | }; 829 | name = Release; 830 | }; 831 | /* End XCBuildConfiguration section */ 832 | 833 | /* Begin XCConfigurationList section */ 834 | 4D99380A1DD8B44D00DAD213 /* Build configuration list for PBXNativeTarget "ATHMultiSelectionSegmentedControl" */ = { 835 | isa = XCConfigurationList; 836 | buildConfigurations = ( 837 | 4D99380B1DD8B44D00DAD213 /* Debug */, 838 | 4D99380C1DD8B44D00DAD213 /* Release */, 839 | ); 840 | defaultConfigurationIsVisible = 0; 841 | defaultConfigurationName = Release; 842 | }; 843 | 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "ATHMultiSelectionSegmentedControl" */ = { 844 | isa = XCConfigurationList; 845 | buildConfigurations = ( 846 | 607FACED1AFB9204008FA782 /* Debug */, 847 | 607FACEE1AFB9204008FA782 /* Release */, 848 | ); 849 | defaultConfigurationIsVisible = 0; 850 | defaultConfigurationName = Release; 851 | }; 852 | 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ATHMultiSelectionSegmentedControl_Example" */ = { 853 | isa = XCConfigurationList; 854 | buildConfigurations = ( 855 | 607FACF01AFB9204008FA782 /* Debug */, 856 | 607FACF11AFB9204008FA782 /* Release */, 857 | ); 858 | defaultConfigurationIsVisible = 0; 859 | defaultConfigurationName = Release; 860 | }; 861 | 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "ATHMultiSelectionSegmentedControl_Tests" */ = { 862 | isa = XCConfigurationList; 863 | buildConfigurations = ( 864 | 607FACF31AFB9204008FA782 /* Debug */, 865 | 607FACF41AFB9204008FA782 /* Release */, 866 | ); 867 | defaultConfigurationIsVisible = 0; 868 | defaultConfigurationName = Release; 869 | }; 870 | /* End XCConfigurationList section */ 871 | }; 872 | rootObject = 607FACC81AFB9204008FA782 /* Project object */; 873 | } 874 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl.xcodeproj/xcshareddata/xcschemes/ATHMultiSelectionSegmentedControl-Example.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 46 | 47 | 49 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 67 | 68 | 69 | 70 | 81 | 83 | 89 | 90 | 91 | 92 | 93 | 94 | 100 | 102 | 108 | 109 | 110 | 111 | 113 | 114 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl.xcodeproj/xcshareddata/xcschemes/ATHMultiSelectionSegmentedControl.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 35 | 36 | 47 | 48 | 54 | 55 | 56 | 57 | 58 | 59 | 65 | 66 | 72 | 73 | 74 | 75 | 77 | 78 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // ATHMultiSelectionSegmentedControl.h 3 | // ATHMultiSelectionSegmentedControl 4 | // 5 | // Created by Athanasios Theodoridis on 13/11/2016. 6 | // Copyright © 2016 CocoaPods. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for ATHMultiSelectionSegmentedControl. 12 | FOUNDATION_EXPORT double ATHMultiSelectionSegmentedControlVersionNumber; 13 | 14 | //! Project version string for ATHMultiSelectionSegmentedControl. 15 | FOUNDATION_EXPORT const unsigned char ATHMultiSelectionSegmentedControlVersionString[]; 16 | 17 | // In this header, you should import all the public headers of your framework using statements like #import 18 | 19 | 20 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // ATHMultiSelectionSegmentedControl 4 | // 5 | // Created by attheodo on 06/03/2016. 6 | // Copyright (c) 2016 attheodo. 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: [UIApplicationLaunchOptionsKey: 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 throttle down OpenGL ES frame rates. 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 inactive 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 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 34 | 40 | 47 | 54 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl/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 19 | CFBundleVersion 20 | $(CURRENT_PROJECT_VERSION) 21 | NSPrincipalClass 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /Example/ATHMultiSelectionSegmentedControl/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // ATHMultiSelectionSegmentedControl 4 | // 5 | // Created by attheodo on 06/03/2016. 6 | // Copyright (c) 2016 attheodo. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import ATHMultiSelectionSegmentedControl 11 | 12 | class ViewController: UIViewController, MultiSelectionSegmentedControlDelegate { 13 | 14 | // MARK: - IBOutlets 15 | /// The multi selection segmented control 16 | @IBOutlet weak var multiSegmentedControl: MultiSelectionSegmentedControl! 17 | /// The label indicating the selected indices 18 | @IBOutlet weak var selectedIndicesLabel: UILabel! 19 | /// Button for inserting segments 20 | @IBOutlet weak var insertSegmentButton: UIButton! 21 | /// Button for removing segments 22 | @IBOutlet weak var removeSegmentButton: UIButton! 23 | /// Button for remove all segments 24 | @IBOutlet weak var removeAllSegments: UIButton! 25 | 26 | // MARK: - View Lifecyle 27 | override func viewDidLoad() { 28 | super.viewDidLoad() 29 | 30 | /* 31 | Here the control is added as an IBOutlet. You can always add it programmatically like 32 | 33 | let multiSegmentedControl = MultiSelectionSegmentedControl() 34 | view.addSubview(multiSegmentedControl) 35 | */ 36 | 37 | multiSegmentedControl.insertSegmentsWithTitles(["Title 1"]) 38 | multiSegmentedControl.delegate = self 39 | } 40 | 41 | override func didReceiveMemoryWarning() { 42 | super.didReceiveMemoryWarning() 43 | // Dispose of any resources that can be recreated. 44 | } 45 | 46 | // MARK: - IBActions 47 | @IBAction func insertSegment(_ sender: UIButton) { 48 | 49 | let title = "Title \(String(multiSegmentedControl.numberOfSegments + 1))" 50 | 51 | multiSegmentedControl.insertSegmentWithTitle(title, atIndex: multiSegmentedControl.numberOfSegments, animated: true) 52 | 53 | } 54 | 55 | @IBAction func removeSegment(_ sender: UIButton) { 56 | multiSegmentedControl.removeSegmentAtIndex(multiSegmentedControl.numberOfSegments, animated: true) 57 | } 58 | 59 | @IBAction func removeAllSegments(_ sender: UIButton) { 60 | multiSegmentedControl.removeAllSegments() 61 | } 62 | 63 | // MARK: - ATHMultiSelectionSegmentedControlDelegate 64 | 65 | /** 66 | Delegate method for `MultiSelectionSegmentedControl`. Called only when the user 67 | interacts with the control and not when the control is configured programmatically! 68 | */ 69 | func multiSelectionSegmentedControl(_ control: MultiSelectionSegmentedControl, selectedIndices indices: [Int]) { 70 | 71 | selectedIndicesLabel.text = "Selected Indices: [" 72 | 73 | for index in indices { 74 | selectedIndicesLabel.text?.append("\(String(index)),") 75 | } 76 | 77 | if indices.count != 0 { 78 | selectedIndicesLabel.text = String(selectedIndicesLabel.text!.characters.dropLast()) 79 | } 80 | 81 | selectedIndicesLabel.text?.append("]") 82 | 83 | } 84 | 85 | } 86 | 87 | -------------------------------------------------------------------------------- /Example/Podfile: -------------------------------------------------------------------------------- 1 | use_frameworks! 2 | 3 | target 'ATHMultiSelectionSegmentedControl_Example' do 4 | pod 'ATHMultiSelectionSegmentedControl', :path => '../' 5 | end 6 | 7 | target 'ATHMultiSelectionSegmentedControl_Tests' do 8 | inherit! :search_paths 9 | pod 'ATHMultiSelectionSegmentedControl', :path => '../' 10 | pod 'Nimble' 11 | end 12 | 13 | -------------------------------------------------------------------------------- /Example/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ATHMultiSelectionSegmentedControl (0.2.0) 3 | - Nimble (5.0.0) 4 | 5 | DEPENDENCIES: 6 | - ATHMultiSelectionSegmentedControl (from `../`) 7 | - Nimble 8 | 9 | EXTERNAL SOURCES: 10 | ATHMultiSelectionSegmentedControl: 11 | :path: ../ 12 | 13 | SPEC CHECKSUMS: 14 | ATHMultiSelectionSegmentedControl: d3b8ec8b2b98d301f21eac4234d6a3a5d4752e1e 15 | Nimble: 56fc9f5020effa2206de22c3dd910f4fb011b92f 16 | 17 | PODFILE CHECKSUM: 0f726248125018a5fd94c733c65f88c765b5fa80 18 | 19 | COCOAPODS: 1.0.0 20 | -------------------------------------------------------------------------------- /Example/Pods/Local Podspecs/ATHMultiSelectionSegmentedControl.podspec.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ATHMultiSelectionSegmentedControl", 3 | "version": "0.2.0", 4 | "summary": "A control mimicking UISegmentedControl behaviour but allowing for multiple segment selection", 5 | "description": "ATHMultiSelectionSegmentedControl is a UIView based control that mimicks UISegmentedControl's API but also allows for multiple segment selection. It's battle tested and fully tested. If you find any bugs or want to suggest improvements please feel free to contribute.'", 6 | "homepage": "https://github.com/attheodo/ATHMultiSelectionSegmentedControl", 7 | "license": { 8 | "type": "MIT", 9 | "file": "LICENSE" 10 | }, 11 | "authors": { 12 | "attheodo": "at@atworks.gr" 13 | }, 14 | "source": { 15 | "git": "https://github.com/attheodo/ATHMultiSelectionSegmentedControl.git", 16 | "tag": "0.2.0" 17 | }, 18 | "social_media_url": "https://twitter.com/attheodo", 19 | "platforms": { 20 | "ios": "8.0" 21 | }, 22 | "source_files": "ATHMultiSelectionSegmentedControl/Classes/**/*", 23 | "frameworks": [ 24 | "UIKit", 25 | "Foundation", 26 | "QuartzCore" 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /Example/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - ATHMultiSelectionSegmentedControl (0.2.0) 3 | - Nimble (5.0.0) 4 | 5 | DEPENDENCIES: 6 | - ATHMultiSelectionSegmentedControl (from `../`) 7 | - Nimble 8 | 9 | EXTERNAL SOURCES: 10 | ATHMultiSelectionSegmentedControl: 11 | :path: ../ 12 | 13 | SPEC CHECKSUMS: 14 | ATHMultiSelectionSegmentedControl: d3b8ec8b2b98d301f21eac4234d6a3a5d4752e1e 15 | Nimble: 56fc9f5020effa2206de22c3dd910f4fb011b92f 16 | 17 | PODFILE CHECKSUM: 0f726248125018a5fd94c733c65f88c765b5fa80 18 | 19 | COCOAPODS: 1.0.0 20 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_ATHMultiSelectionSegmentedControl : NSObject 3 | @end 4 | @implementation PodsDummy_ATHMultiSelectionSegmentedControl 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double ATHMultiSelectionSegmentedControlVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char ATHMultiSelectionSegmentedControlVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.modulemap: -------------------------------------------------------------------------------- 1 | framework module ATHMultiSelectionSegmentedControl { 2 | umbrella header "ATHMultiSelectionSegmentedControl-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.xcconfig: -------------------------------------------------------------------------------- 1 | CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/ATHMultiSelectionSegmentedControl 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" 4 | OTHER_LDFLAGS = -framework "Foundation" -framework "QuartzCore" -framework "UIKit" 5 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 6 | PODS_BUILD_DIR = $BUILD_DIR 7 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 8 | PODS_ROOT = ${SRCROOT} 9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} 10 | SKIP_INSTALL = YES 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/ATHMultiSelectionSegmentedControl/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 | 0.2.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSPrincipalClass 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ATHMultiSelectionSegmentedControl 5 | 6 | Copyright (c) 2016 attheodo 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | Generated by CocoaPods - https://cocoapods.org 27 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2016 attheodo <at@atworks.gr> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | ATHMultiSelectionSegmentedControl 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Generated by CocoaPods - https://cocoapods.org 45 | Title 46 | 47 | Type 48 | PSGroupSpecifier 49 | 50 | 51 | StringsTable 52 | Acknowledgements 53 | Title 54 | Acknowledgements 55 | 56 | 57 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ATHMultiSelectionSegmentedControl_Example : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ATHMultiSelectionSegmentedControl_Example 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_framework "$BUILT_PRODUCTS_DIR/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.framework" 88 | fi 89 | if [[ "$CONFIGURATION" == "Release" ]]; then 90 | install_framework "$BUILT_PRODUCTS_DIR/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.framework" 91 | fi 92 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | realpath() { 27 | DIRECTORY="$(cd "${1%/*}" && pwd)" 28 | FILENAME="${1##*/}" 29 | echo "$DIRECTORY/$FILENAME" 30 | } 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_ATHMultiSelectionSegmentedControl_ExampleVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_ATHMultiSelectionSegmentedControl_ExampleVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example.debug.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ATHMultiSelectionSegmentedControl" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "ATHMultiSelectionSegmentedControl" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ATHMultiSelectionSegmentedControl_Example { 2 | umbrella header "Pods-ATHMultiSelectionSegmentedControl_Example-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Example/Pods-ATHMultiSelectionSegmentedControl_Example.release.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ATHMultiSelectionSegmentedControl" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "ATHMultiSelectionSegmentedControl" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/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 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## ATHMultiSelectionSegmentedControl 5 | 6 | Copyright (c) 2016 attheodo 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## Nimble 28 | 29 | Apache License 30 | Version 2.0, January 2004 31 | http://www.apache.org/licenses/ 32 | 33 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 34 | 35 | 1. Definitions. 36 | 37 | "License" shall mean the terms and conditions for use, reproduction, 38 | and distribution as defined by Sections 1 through 9 of this document. 39 | 40 | "Licensor" shall mean the copyright owner or entity authorized by 41 | the copyright owner that is granting the License. 42 | 43 | "Legal Entity" shall mean the union of the acting entity and all 44 | other entities that control, are controlled by, or are under common 45 | control with that entity. For the purposes of this definition, 46 | "control" means (i) the power, direct or indirect, to cause the 47 | direction or management of such entity, whether by contract or 48 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 49 | outstanding shares, or (iii) beneficial ownership of such entity. 50 | 51 | "You" (or "Your") shall mean an individual or Legal Entity 52 | exercising permissions granted by this License. 53 | 54 | "Source" form shall mean the preferred form for making modifications, 55 | including but not limited to software source code, documentation 56 | source, and configuration files. 57 | 58 | "Object" form shall mean any form resulting from mechanical 59 | transformation or translation of a Source form, including but 60 | not limited to compiled object code, generated documentation, 61 | and conversions to other media types. 62 | 63 | "Work" shall mean the work of authorship, whether in Source or 64 | Object form, made available under the License, as indicated by a 65 | copyright notice that is included in or attached to the work 66 | (an example is provided in the Appendix below). 67 | 68 | "Derivative Works" shall mean any work, whether in Source or Object 69 | form, that is based on (or derived from) the Work and for which the 70 | editorial revisions, annotations, elaborations, or other modifications 71 | represent, as a whole, an original work of authorship. For the purposes 72 | of this License, Derivative Works shall not include works that remain 73 | separable from, or merely link (or bind by name) to the interfaces of, 74 | the Work and Derivative Works thereof. 75 | 76 | "Contribution" shall mean any work of authorship, including 77 | the original version of the Work and any modifications or additions 78 | to that Work or Derivative Works thereof, that is intentionally 79 | submitted to Licensor for inclusion in the Work by the copyright owner 80 | or by an individual or Legal Entity authorized to submit on behalf of 81 | the copyright owner. For the purposes of this definition, "submitted" 82 | means any form of electronic, verbal, or written communication sent 83 | to the Licensor or its representatives, including but not limited to 84 | communication on electronic mailing lists, source code control systems, 85 | and issue tracking systems that are managed by, or on behalf of, the 86 | Licensor for the purpose of discussing and improving the Work, but 87 | excluding communication that is conspicuously marked or otherwise 88 | designated in writing by the copyright owner as "Not a Contribution." 89 | 90 | "Contributor" shall mean Licensor and any individual or Legal Entity 91 | on behalf of whom a Contribution has been received by Licensor and 92 | subsequently incorporated within the Work. 93 | 94 | 2. Grant of Copyright License. Subject to the terms and conditions of 95 | this License, each Contributor hereby grants to You a perpetual, 96 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 97 | copyright license to reproduce, prepare Derivative Works of, 98 | publicly display, publicly perform, sublicense, and distribute the 99 | Work and such Derivative Works in Source or Object form. 100 | 101 | 3. Grant of Patent License. Subject to the terms and conditions of 102 | this License, each Contributor hereby grants to You a perpetual, 103 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 104 | (except as stated in this section) patent license to make, have made, 105 | use, offer to sell, sell, import, and otherwise transfer the Work, 106 | where such license applies only to those patent claims licensable 107 | by such Contributor that are necessarily infringed by their 108 | Contribution(s) alone or by combination of their Contribution(s) 109 | with the Work to which such Contribution(s) was submitted. If You 110 | institute patent litigation against any entity (including a 111 | cross-claim or counterclaim in a lawsuit) alleging that the Work 112 | or a Contribution incorporated within the Work constitutes direct 113 | or contributory patent infringement, then any patent licenses 114 | granted to You under this License for that Work shall terminate 115 | as of the date such litigation is filed. 116 | 117 | 4. Redistribution. You may reproduce and distribute copies of the 118 | Work or Derivative Works thereof in any medium, with or without 119 | modifications, and in Source or Object form, provided that You 120 | meet the following conditions: 121 | 122 | (a) You must give any other recipients of the Work or 123 | Derivative Works a copy of this License; and 124 | 125 | (b) You must cause any modified files to carry prominent notices 126 | stating that You changed the files; and 127 | 128 | (c) You must retain, in the Source form of any Derivative Works 129 | that You distribute, all copyright, patent, trademark, and 130 | attribution notices from the Source form of the Work, 131 | excluding those notices that do not pertain to any part of 132 | the Derivative Works; and 133 | 134 | (d) If the Work includes a "NOTICE" text file as part of its 135 | distribution, then any Derivative Works that You distribute must 136 | include a readable copy of the attribution notices contained 137 | within such NOTICE file, excluding those notices that do not 138 | pertain to any part of the Derivative Works, in at least one 139 | of the following places: within a NOTICE text file distributed 140 | as part of the Derivative Works; within the Source form or 141 | documentation, if provided along with the Derivative Works; or, 142 | within a display generated by the Derivative Works, if and 143 | wherever such third-party notices normally appear. The contents 144 | of the NOTICE file are for informational purposes only and 145 | do not modify the License. You may add Your own attribution 146 | notices within Derivative Works that You distribute, alongside 147 | or as an addendum to the NOTICE text from the Work, provided 148 | that such additional attribution notices cannot be construed 149 | as modifying the License. 150 | 151 | You may add Your own copyright statement to Your modifications and 152 | may provide additional or different license terms and conditions 153 | for use, reproduction, or distribution of Your modifications, or 154 | for any such Derivative Works as a whole, provided Your use, 155 | reproduction, and distribution of the Work otherwise complies with 156 | the conditions stated in this License. 157 | 158 | 5. Submission of Contributions. Unless You explicitly state otherwise, 159 | any Contribution intentionally submitted for inclusion in the Work 160 | by You to the Licensor shall be under the terms and conditions of 161 | this License, without any additional terms or conditions. 162 | Notwithstanding the above, nothing herein shall supersede or modify 163 | the terms of any separate license agreement you may have executed 164 | with Licensor regarding such Contributions. 165 | 166 | 6. Trademarks. This License does not grant permission to use the trade 167 | names, trademarks, service marks, or product names of the Licensor, 168 | except as required for reasonable and customary use in describing the 169 | origin of the Work and reproducing the content of the NOTICE file. 170 | 171 | 7. Disclaimer of Warranty. Unless required by applicable law or 172 | agreed to in writing, Licensor provides the Work (and each 173 | Contributor provides its Contributions) on an "AS IS" BASIS, 174 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 175 | implied, including, without limitation, any warranties or conditions 176 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 177 | PARTICULAR PURPOSE. You are solely responsible for determining the 178 | appropriateness of using or redistributing the Work and assume any 179 | risks associated with Your exercise of permissions under this License. 180 | 181 | 8. Limitation of Liability. In no event and under no legal theory, 182 | whether in tort (including negligence), contract, or otherwise, 183 | unless required by applicable law (such as deliberate and grossly 184 | negligent acts) or agreed to in writing, shall any Contributor be 185 | liable to You for damages, including any direct, indirect, special, 186 | incidental, or consequential damages of any character arising as a 187 | result of this License or out of the use or inability to use the 188 | Work (including but not limited to damages for loss of goodwill, 189 | work stoppage, computer failure or malfunction, or any and all 190 | other commercial damages or losses), even if such Contributor 191 | has been advised of the possibility of such damages. 192 | 193 | 9. Accepting Warranty or Additional Liability. While redistributing 194 | the Work or Derivative Works thereof, You may choose to offer, 195 | and charge a fee for, acceptance of support, warranty, indemnity, 196 | or other liability obligations and/or rights consistent with this 197 | License. However, in accepting such obligations, You may act only 198 | on Your own behalf and on Your sole responsibility, not on behalf 199 | of any other Contributor, and only if You agree to indemnify, 200 | defend, and hold each Contributor harmless for any liability 201 | incurred by, or claims asserted against, such Contributor by reason 202 | of your accepting any such warranty or additional liability. 203 | 204 | END OF TERMS AND CONDITIONS 205 | 206 | APPENDIX: How to apply the Apache License to your work. 207 | 208 | To apply the Apache License to your work, attach the following 209 | boilerplate notice, with the fields enclosed by brackets "{}" 210 | replaced with your own identifying information. (Don't include 211 | the brackets!) The text should be enclosed in the appropriate 212 | comment syntax for the file format. We also recommend that a 213 | file or class name and description of purpose be included on the 214 | same "printed page" as the copyright notice for easier 215 | identification within third-party archives. 216 | 217 | Copyright 2014 Quick Team 218 | 219 | Licensed under the Apache License, Version 2.0 (the "License"); 220 | you may not use this file except in compliance with the License. 221 | You may obtain a copy of the License at 222 | 223 | http://www.apache.org/licenses/LICENSE-2.0 224 | 225 | Unless required by applicable law or agreed to in writing, software 226 | distributed under the License is distributed on an "AS IS" BASIS, 227 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 228 | See the License for the specific language governing permissions and 229 | limitations under the License. 230 | 231 | Generated by CocoaPods - https://cocoapods.org 232 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests-acknowledgements.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreferenceSpecifiers 6 | 7 | 8 | FooterText 9 | This application makes use of the following third party libraries: 10 | Title 11 | Acknowledgements 12 | Type 13 | PSGroupSpecifier 14 | 15 | 16 | FooterText 17 | Copyright (c) 2016 attheodo <at@atworks.gr> 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy 20 | of this software and associated documentation files (the "Software"), to deal 21 | in the Software without restriction, including without limitation the rights 22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 23 | copies of the Software, and to permit persons to whom the Software is 24 | furnished to do so, subject to the following conditions: 25 | 26 | The above copyright notice and this permission notice shall be included in 27 | all copies or substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 35 | THE SOFTWARE. 36 | 37 | Title 38 | ATHMultiSelectionSegmentedControl 39 | Type 40 | PSGroupSpecifier 41 | 42 | 43 | FooterText 44 | Apache License 45 | Version 2.0, January 2004 46 | http://www.apache.org/licenses/ 47 | 48 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 49 | 50 | 1. Definitions. 51 | 52 | "License" shall mean the terms and conditions for use, reproduction, 53 | and distribution as defined by Sections 1 through 9 of this document. 54 | 55 | "Licensor" shall mean the copyright owner or entity authorized by 56 | the copyright owner that is granting the License. 57 | 58 | "Legal Entity" shall mean the union of the acting entity and all 59 | other entities that control, are controlled by, or are under common 60 | control with that entity. For the purposes of this definition, 61 | "control" means (i) the power, direct or indirect, to cause the 62 | direction or management of such entity, whether by contract or 63 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 64 | outstanding shares, or (iii) beneficial ownership of such entity. 65 | 66 | "You" (or "Your") shall mean an individual or Legal Entity 67 | exercising permissions granted by this License. 68 | 69 | "Source" form shall mean the preferred form for making modifications, 70 | including but not limited to software source code, documentation 71 | source, and configuration files. 72 | 73 | "Object" form shall mean any form resulting from mechanical 74 | transformation or translation of a Source form, including but 75 | not limited to compiled object code, generated documentation, 76 | and conversions to other media types. 77 | 78 | "Work" shall mean the work of authorship, whether in Source or 79 | Object form, made available under the License, as indicated by a 80 | copyright notice that is included in or attached to the work 81 | (an example is provided in the Appendix below). 82 | 83 | "Derivative Works" shall mean any work, whether in Source or Object 84 | form, that is based on (or derived from) the Work and for which the 85 | editorial revisions, annotations, elaborations, or other modifications 86 | represent, as a whole, an original work of authorship. For the purposes 87 | of this License, Derivative Works shall not include works that remain 88 | separable from, or merely link (or bind by name) to the interfaces of, 89 | the Work and Derivative Works thereof. 90 | 91 | "Contribution" shall mean any work of authorship, including 92 | the original version of the Work and any modifications or additions 93 | to that Work or Derivative Works thereof, that is intentionally 94 | submitted to Licensor for inclusion in the Work by the copyright owner 95 | or by an individual or Legal Entity authorized to submit on behalf of 96 | the copyright owner. For the purposes of this definition, "submitted" 97 | means any form of electronic, verbal, or written communication sent 98 | to the Licensor or its representatives, including but not limited to 99 | communication on electronic mailing lists, source code control systems, 100 | and issue tracking systems that are managed by, or on behalf of, the 101 | Licensor for the purpose of discussing and improving the Work, but 102 | excluding communication that is conspicuously marked or otherwise 103 | designated in writing by the copyright owner as "Not a Contribution." 104 | 105 | "Contributor" shall mean Licensor and any individual or Legal Entity 106 | on behalf of whom a Contribution has been received by Licensor and 107 | subsequently incorporated within the Work. 108 | 109 | 2. Grant of Copyright License. Subject to the terms and conditions of 110 | this License, each Contributor hereby grants to You a perpetual, 111 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 112 | copyright license to reproduce, prepare Derivative Works of, 113 | publicly display, publicly perform, sublicense, and distribute the 114 | Work and such Derivative Works in Source or Object form. 115 | 116 | 3. Grant of Patent License. Subject to the terms and conditions of 117 | this License, each Contributor hereby grants to You a perpetual, 118 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 119 | (except as stated in this section) patent license to make, have made, 120 | use, offer to sell, sell, import, and otherwise transfer the Work, 121 | where such license applies only to those patent claims licensable 122 | by such Contributor that are necessarily infringed by their 123 | Contribution(s) alone or by combination of their Contribution(s) 124 | with the Work to which such Contribution(s) was submitted. If You 125 | institute patent litigation against any entity (including a 126 | cross-claim or counterclaim in a lawsuit) alleging that the Work 127 | or a Contribution incorporated within the Work constitutes direct 128 | or contributory patent infringement, then any patent licenses 129 | granted to You under this License for that Work shall terminate 130 | as of the date such litigation is filed. 131 | 132 | 4. Redistribution. You may reproduce and distribute copies of the 133 | Work or Derivative Works thereof in any medium, with or without 134 | modifications, and in Source or Object form, provided that You 135 | meet the following conditions: 136 | 137 | (a) You must give any other recipients of the Work or 138 | Derivative Works a copy of this License; and 139 | 140 | (b) You must cause any modified files to carry prominent notices 141 | stating that You changed the files; and 142 | 143 | (c) You must retain, in the Source form of any Derivative Works 144 | that You distribute, all copyright, patent, trademark, and 145 | attribution notices from the Source form of the Work, 146 | excluding those notices that do not pertain to any part of 147 | the Derivative Works; and 148 | 149 | (d) If the Work includes a "NOTICE" text file as part of its 150 | distribution, then any Derivative Works that You distribute must 151 | include a readable copy of the attribution notices contained 152 | within such NOTICE file, excluding those notices that do not 153 | pertain to any part of the Derivative Works, in at least one 154 | of the following places: within a NOTICE text file distributed 155 | as part of the Derivative Works; within the Source form or 156 | documentation, if provided along with the Derivative Works; or, 157 | within a display generated by the Derivative Works, if and 158 | wherever such third-party notices normally appear. The contents 159 | of the NOTICE file are for informational purposes only and 160 | do not modify the License. You may add Your own attribution 161 | notices within Derivative Works that You distribute, alongside 162 | or as an addendum to the NOTICE text from the Work, provided 163 | that such additional attribution notices cannot be construed 164 | as modifying the License. 165 | 166 | You may add Your own copyright statement to Your modifications and 167 | may provide additional or different license terms and conditions 168 | for use, reproduction, or distribution of Your modifications, or 169 | for any such Derivative Works as a whole, provided Your use, 170 | reproduction, and distribution of the Work otherwise complies with 171 | the conditions stated in this License. 172 | 173 | 5. Submission of Contributions. Unless You explicitly state otherwise, 174 | any Contribution intentionally submitted for inclusion in the Work 175 | by You to the Licensor shall be under the terms and conditions of 176 | this License, without any additional terms or conditions. 177 | Notwithstanding the above, nothing herein shall supersede or modify 178 | the terms of any separate license agreement you may have executed 179 | with Licensor regarding such Contributions. 180 | 181 | 6. Trademarks. This License does not grant permission to use the trade 182 | names, trademarks, service marks, or product names of the Licensor, 183 | except as required for reasonable and customary use in describing the 184 | origin of the Work and reproducing the content of the NOTICE file. 185 | 186 | 7. Disclaimer of Warranty. Unless required by applicable law or 187 | agreed to in writing, Licensor provides the Work (and each 188 | Contributor provides its Contributions) on an "AS IS" BASIS, 189 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 190 | implied, including, without limitation, any warranties or conditions 191 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 192 | PARTICULAR PURPOSE. You are solely responsible for determining the 193 | appropriateness of using or redistributing the Work and assume any 194 | risks associated with Your exercise of permissions under this License. 195 | 196 | 8. Limitation of Liability. In no event and under no legal theory, 197 | whether in tort (including negligence), contract, or otherwise, 198 | unless required by applicable law (such as deliberate and grossly 199 | negligent acts) or agreed to in writing, shall any Contributor be 200 | liable to You for damages, including any direct, indirect, special, 201 | incidental, or consequential damages of any character arising as a 202 | result of this License or out of the use or inability to use the 203 | Work (including but not limited to damages for loss of goodwill, 204 | work stoppage, computer failure or malfunction, or any and all 205 | other commercial damages or losses), even if such Contributor 206 | has been advised of the possibility of such damages. 207 | 208 | 9. Accepting Warranty or Additional Liability. While redistributing 209 | the Work or Derivative Works thereof, You may choose to offer, 210 | and charge a fee for, acceptance of support, warranty, indemnity, 211 | or other liability obligations and/or rights consistent with this 212 | License. However, in accepting such obligations, You may act only 213 | on Your own behalf and on Your sole responsibility, not on behalf 214 | of any other Contributor, and only if You agree to indemnify, 215 | defend, and hold each Contributor harmless for any liability 216 | incurred by, or claims asserted against, such Contributor by reason 217 | of your accepting any such warranty or additional liability. 218 | 219 | END OF TERMS AND CONDITIONS 220 | 221 | APPENDIX: How to apply the Apache License to your work. 222 | 223 | To apply the Apache License to your work, attach the following 224 | boilerplate notice, with the fields enclosed by brackets "{}" 225 | replaced with your own identifying information. (Don't include 226 | the brackets!) The text should be enclosed in the appropriate 227 | comment syntax for the file format. We also recommend that a 228 | file or class name and description of purpose be included on the 229 | same "printed page" as the copyright notice for easier 230 | identification within third-party archives. 231 | 232 | Copyright 2014 Quick Team 233 | 234 | Licensed under the Apache License, Version 2.0 (the "License"); 235 | you may not use this file except in compliance with the License. 236 | You may obtain a copy of the License at 237 | 238 | http://www.apache.org/licenses/LICENSE-2.0 239 | 240 | Unless required by applicable law or agreed to in writing, software 241 | distributed under the License is distributed on an "AS IS" BASIS, 242 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 243 | See the License for the specific language governing permissions and 244 | limitations under the License. 245 | 246 | Title 247 | Nimble 248 | Type 249 | PSGroupSpecifier 250 | 251 | 252 | FooterText 253 | Generated by CocoaPods - https://cocoapods.org 254 | Title 255 | 256 | Type 257 | PSGroupSpecifier 258 | 259 | 260 | StringsTable 261 | Acknowledgements 262 | Title 263 | Acknowledgements 264 | 265 | 266 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods_ATHMultiSelectionSegmentedControl_Tests : NSObject 3 | @end 4 | @implementation PodsDummy_Pods_ATHMultiSelectionSegmentedControl_Tests 5 | @end 6 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests-frameworks.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 5 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 6 | 7 | SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" 8 | 9 | install_framework() 10 | { 11 | if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then 12 | local source="${BUILT_PRODUCTS_DIR}/$1" 13 | elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then 14 | local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")" 15 | elif [ -r "$1" ]; then 16 | local source="$1" 17 | fi 18 | 19 | local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 20 | 21 | if [ -L "${source}" ]; then 22 | echo "Symlinked..." 23 | source="$(readlink "${source}")" 24 | fi 25 | 26 | # use filter instead of exclude so missing patterns dont' throw errors 27 | echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" 28 | rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" 29 | 30 | local basename 31 | basename="$(basename -s .framework "$1")" 32 | binary="${destination}/${basename}.framework/${basename}" 33 | if ! [ -r "$binary" ]; then 34 | binary="${destination}/${basename}" 35 | fi 36 | 37 | # Strip invalid architectures so "fat" simulator / device frameworks work on device 38 | if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then 39 | strip_invalid_archs "$binary" 40 | fi 41 | 42 | # Resign the code if required by the build settings to avoid unstable apps 43 | code_sign_if_enabled "${destination}/$(basename "$1")" 44 | 45 | # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. 46 | if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then 47 | local swift_runtime_libs 48 | swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) 49 | for lib in $swift_runtime_libs; do 50 | echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" 51 | rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" 52 | code_sign_if_enabled "${destination}/${lib}" 53 | done 54 | fi 55 | } 56 | 57 | # Signs a framework with the provided identity 58 | code_sign_if_enabled() { 59 | if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then 60 | # Use the current code_sign_identitiy 61 | echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" 62 | echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" 63 | /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" 64 | fi 65 | } 66 | 67 | # Strip invalid architectures 68 | strip_invalid_archs() { 69 | binary="$1" 70 | # Get architectures for current file 71 | archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" 72 | stripped="" 73 | for arch in $archs; do 74 | if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then 75 | # Strip non-valid architectures in-place 76 | lipo -remove "$arch" -output "$binary" "$binary" || exit 1 77 | stripped="$stripped $arch" 78 | fi 79 | done 80 | if [[ "$stripped" ]]; then 81 | echo "Stripped $binary of architectures:$stripped" 82 | fi 83 | } 84 | 85 | 86 | if [[ "$CONFIGURATION" == "Debug" ]]; then 87 | install_framework "$BUILT_PRODUCTS_DIR/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.framework" 88 | install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" 89 | fi 90 | if [[ "$CONFIGURATION" == "Release" ]]; then 91 | install_framework "$BUILT_PRODUCTS_DIR/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.framework" 92 | install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" 93 | fi 94 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | case "${TARGETED_DEVICE_FAMILY}" in 12 | 1,2) 13 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 14 | ;; 15 | 1) 16 | TARGET_DEVICE_ARGS="--target-device iphone" 17 | ;; 18 | 2) 19 | TARGET_DEVICE_ARGS="--target-device ipad" 20 | ;; 21 | *) 22 | TARGET_DEVICE_ARGS="--target-device mac" 23 | ;; 24 | esac 25 | 26 | realpath() { 27 | DIRECTORY="$(cd "${1%/*}" && pwd)" 28 | FILENAME="${1##*/}" 29 | echo "$DIRECTORY/$FILENAME" 30 | } 31 | 32 | install_resource() 33 | { 34 | if [[ "$1" = /* ]] ; then 35 | RESOURCE_PATH="$1" 36 | else 37 | RESOURCE_PATH="${PODS_ROOT}/$1" 38 | fi 39 | if [[ ! -e "$RESOURCE_PATH" ]] ; then 40 | cat << EOM 41 | error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. 42 | EOM 43 | exit 1 44 | fi 45 | case $RESOURCE_PATH in 46 | *.storyboard) 47 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" 48 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} 49 | ;; 50 | *.xib) 51 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT}" 52 | ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" 53 | ;; 54 | *.framework) 55 | echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 56 | mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 57 | echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 58 | rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 59 | ;; 60 | *.xcdatamodel) 61 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" 62 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" 63 | ;; 64 | *.xcdatamodeld) 65 | echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" 66 | xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" 67 | ;; 68 | *.xcmappingmodel) 69 | echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" 70 | xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" 71 | ;; 72 | *.xcassets) 73 | ABSOLUTE_XCASSET_FILE=$(realpath "$RESOURCE_PATH") 74 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 75 | ;; 76 | *) 77 | echo "$RESOURCE_PATH" 78 | echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" 79 | ;; 80 | esac 81 | } 82 | 83 | mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 84 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 85 | if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then 86 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 87 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 88 | fi 89 | rm -f "$RESOURCES_TO_COPY" 90 | 91 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 92 | then 93 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 94 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 95 | while read line; do 96 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 97 | XCASSET_FILES+=("$line") 98 | fi 99 | done <<<"$OTHER_XCASSETS" 100 | 101 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 102 | fi 103 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests-umbrella.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | 4 | FOUNDATION_EXPORT double Pods_ATHMultiSelectionSegmentedControl_TestsVersionNumber; 5 | FOUNDATION_EXPORT const unsigned char Pods_ATHMultiSelectionSegmentedControl_TestsVersionString[]; 6 | 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests.debug.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ATHMultiSelectionSegmentedControl" "$PODS_CONFIGURATION_BUILD_DIR/Nimble" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble/Nimble.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "ATHMultiSelectionSegmentedControl" -framework "Nimble" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests.modulemap: -------------------------------------------------------------------------------- 1 | framework module Pods_ATHMultiSelectionSegmentedControl_Tests { 2 | umbrella header "Pods-ATHMultiSelectionSegmentedControl_Tests-umbrella.h" 3 | 4 | export * 5 | module * { export * } 6 | } 7 | -------------------------------------------------------------------------------- /Example/Pods/Target Support Files/Pods-ATHMultiSelectionSegmentedControl_Tests/Pods-ATHMultiSelectionSegmentedControl_Tests.release.xcconfig: -------------------------------------------------------------------------------- 1 | EMBEDDED_CONTENT_CONTAINS_SWIFT = YES 2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/ATHMultiSelectionSegmentedControl" "$PODS_CONFIGURATION_BUILD_DIR/Nimble" 3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 4 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' 5 | OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/ATHMultiSelectionSegmentedControl/ATHMultiSelectionSegmentedControl.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble/Nimble.framework/Headers" 6 | OTHER_LDFLAGS = $(inherited) -framework "ATHMultiSelectionSegmentedControl" -framework "Nimble" 7 | OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" 8 | PODS_BUILD_DIR = $BUILD_DIR 9 | PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) 10 | PODS_ROOT = ${SRCROOT}/Pods 11 | -------------------------------------------------------------------------------- /Example/Tests/ATHMultiSelectionSegmentedControlTests.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import XCTest 3 | 4 | import ATHMultiSelectionSegmentedControl 5 | import Nimble 6 | 7 | 8 | class ATHMultiSelectionSegmentedControlTests: XCTestCase { 9 | 10 | var segmentedControl: MultiSelectionSegmentedControl! 11 | 12 | override func setUp() { 13 | 14 | super.setUp() 15 | segmentedControl = MultiSelectionSegmentedControl(items: nil) 16 | 17 | } 18 | 19 | override func tearDown() { 20 | super.tearDown() 21 | } 22 | 23 | func testNumberOfSegmentsPropertyWithNoItems() { 24 | expect(self.segmentedControl.numberOfSegments) == 0 25 | } 26 | 27 | func testNumberOfSegmentsPropertyWithItems() { 28 | 29 | segmentedControl.insertSegmentsWithTitles(["1", "2", "3", "4"]) 30 | segmentedControl.layoutSubviews() 31 | 32 | expect(self.segmentedControl.numberOfSegments) == 4 33 | 34 | } 35 | 36 | func testSelectedSegmentIndicesPropertyWithNoItems() { 37 | expect(self.segmentedControl.selectedSegmentIndices.count) == 0 38 | } 39 | 40 | func testSelectedSegmentIndicesPropertyWithItemsButNoSelection() { 41 | 42 | segmentedControl.insertSegmentsWithTitles(["1", "2", "3", "4"]) 43 | segmentedControl.layoutSubviews() 44 | 45 | expect(self.segmentedControl.selectedSegmentIndices.count) == 0 46 | 47 | } 48 | 49 | func testSelectedSegmentIndicesPropertyWithItemsAndSelection() { 50 | 51 | segmentedControl.insertSegmentsWithTitles(["1", "2", "3", "4"]) 52 | segmentedControl.layoutSubviews() 53 | 54 | segmentedControl.selectedSegmentIndices = [0, 1] 55 | 56 | expect(self.segmentedControl.selectedSegmentIndices.count) == 2 57 | 58 | } 59 | 60 | func testTitleForSegmentAtIndexMethodWithInvalidIndex() { 61 | 62 | segmentedControl.insertSegmentsWithTitles(["1", "2", "3", "4"]) 63 | segmentedControl.layoutSubviews() 64 | 65 | expect(self.segmentedControl.titleForSegmentAtIndex(-1)).to(beNil()) 66 | 67 | } 68 | 69 | func testTitleForSegmentAtIndexMethod() { 70 | 71 | segmentedControl.insertSegmentsWithTitles(["1", "2", "3", "4"]) 72 | segmentedControl.layoutSubviews() 73 | 74 | expect(self.segmentedControl.titleForSegmentAtIndex(0)) == "1" 75 | expect(self.segmentedControl.titleForSegmentAtIndex(1)) == "2" 76 | expect(self.segmentedControl.titleForSegmentAtIndex(2)) == "3" 77 | expect(self.segmentedControl.titleForSegmentAtIndex(3)) == "4" 78 | expect(self.segmentedControl.titleForSegmentAtIndex(100)) == "4" 79 | 80 | } 81 | 82 | func testSetTitleForSegmentAtIndexMethod() { 83 | 84 | segmentedControl.insertSegmentsWithTitles(["1", "2", "3", "4"]) 85 | segmentedControl.layoutSubviews() 86 | 87 | segmentedControl.setTitle("one", forSegmentAtIndex: 0) 88 | segmentedControl.setTitle("two", forSegmentAtIndex: 1) 89 | segmentedControl.setTitle("three", forSegmentAtIndex: 2) 90 | segmentedControl.setTitle("four", forSegmentAtIndex: 3) 91 | 92 | expect(self.segmentedControl.titleForSegmentAtIndex(0)) == "one" 93 | expect(self.segmentedControl.titleForSegmentAtIndex(1)) == "two" 94 | expect(self.segmentedControl.titleForSegmentAtIndex(2)) == "three" 95 | expect(self.segmentedControl.titleForSegmentAtIndex(3)) == "four" 96 | 97 | segmentedControl.setTitle("five", forSegmentAtIndex: 100) 98 | expect(self.segmentedControl.titleForSegmentAtIndex(3)) == "five" 99 | 100 | } 101 | 102 | func testInsertSegmentAtIndexMethodWithNegativeIndex() { 103 | 104 | segmentedControl.insertSegmentWithTitle("blah", atIndex: -1, animated: true) 105 | 106 | expect(self.segmentedControl.numberOfSegments) == 0 107 | 108 | } 109 | 110 | func testInsertSegmentAtIndexMethod() { 111 | 112 | segmentedControl.insertSegmentWithTitle("one", atIndex: 0, animated: true) 113 | 114 | expect(self.segmentedControl.numberOfSegments) == 1 115 | expect(self.segmentedControl.titleForSegmentAtIndex(0)) == "one" 116 | 117 | segmentedControl.insertSegmentWithTitle("two", atIndex: 0, animated: true) 118 | expect(self.segmentedControl.numberOfSegments) == 2 119 | expect(self.segmentedControl.titleForSegmentAtIndex(0)) == "two" 120 | 121 | segmentedControl.insertSegmentWithTitle("three", atIndex: 1, animated: true) 122 | expect(self.segmentedControl.numberOfSegments) == 3 123 | expect(self.segmentedControl.titleForSegmentAtIndex(0)) == "two" 124 | expect(self.segmentedControl.titleForSegmentAtIndex(1)) == "three" 125 | expect(self.segmentedControl.titleForSegmentAtIndex(2)) == "one" 126 | 127 | } 128 | 129 | func testSetEnabledMethodWithInvalidIndex() { 130 | 131 | segmentedControl.insertSegmentsWithTitles(["1", "2", "3", "4"]) 132 | segmentedControl.layoutSubviews() 133 | 134 | segmentedControl.setEnabled(false, forSegmentAtIndex: -1) 135 | 136 | for index in 0.. 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 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2016 attheodo 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.0 2 | 3 | import PackageDescription 4 | 5 | let package = Package( 6 | name: "ATHMultiSelectionSegmentedControl", 7 | products: [ 8 | .library(name: "ATHMultiSelectionSegmentedControl", targets: ["ATHMultiSelectionSegmentedControl"]), 9 | ], 10 | dependencies: [], 11 | targets: [ 12 | .target( 13 | name: "ATHMultiSelectionSegmentedControl", 14 | path: "./ATHMultiSelectionSegmentedControl" 15 | ) 16 | ] 17 | ) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ATHMultiSelectionSegmentedControl 2 | 3 | [![CI Status](http://img.shields.io/travis/attheodo/ATHMultiSelectionSegmentedControl.svg?style=flat)](https://travis-ci.org/attheodo/ATHMultiSelectionSegmentedControl) 4 | [![Version](https://img.shields.io/cocoapods/v/ATHMultiSelectionSegmentedControl.svg?style=flat)](http://cocoapods.org/pods/ATHMultiSelectionSegmentedControl) 5 | [![License](https://img.shields.io/cocoapods/l/ATHMultiSelectionSegmentedControl.svg?style=flat)](http://cocoapods.org/pods/ATHMultiSelectionSegmentedControl) 6 | [![Platform](https://img.shields.io/cocoapods/p/ATHMultiSelectionSegmentedControl.svg?style=flat)](http://cocoapods.org/pods/ATHMultiSelectionSegmentedControl) 7 | [![Language](https://img.shields.io/badge/language-Swift%203.0-orange.svg)](https://developer.apple.com/swift/) 8 | 9 | [![Logo](misc/logo.png "ATHExtensions")](/) 10 | 11 | **ATHMultiSelectionSegmentedControl** is a `UIView` based control mimicking the API of `UISegmentedControl` but also allowing for multiple selection of segments. It's fully battle and unit-tested. If you find any bugs or want to suggest improvements please feel free to contribute. 12 | 13 | [![Demo](misc/demo.gif "ATHMultiSelectionSegmentedControl")](/) 14 | 15 | ## Compatibility 16 | * Use `swift2.2` branch for Swift 2.2 17 | * Use `master` branch for Swift 3.0 18 | 19 | ## API 20 | ```swift 21 | import ATHMultiSelectionSegmentedControl 22 | 23 | // initialize empty segmented control 24 | let segmentedControl = ATHMultiSelectionSegmentedControl() 25 | 26 | // Add items to segmented control at once... 27 | segmentedControl.insertSegmentsWithTitles(["Segment 1", "Segment 2", "Segment 3"]) 28 | 29 | // ... or one by one 30 | segmentedControl.insertSegmentWithTitle("Segment 4", atIndex: 3, animated: true) 31 | 32 | // Get and set items 33 | segmentedControl.titleForSegmentAtIndex(0) // Segment 1 34 | segmentControl.setTitle("Title", forSegmentAtIndex: 0) 35 | segmentedControl.titleForSegmentAtIndex(0) // Title 36 | 37 | // Enable or disable an option 38 | segmentedControl.setEnabled(false, forSegmentAtIndex: 0) // "Title" segment is now disabled 39 | segmentedControl.isEnabledForSegmentAtIndex(0) // false 40 | segmentedControl.setEnabled(true, forSegmentAtIndex: 0) // "Title" segment is now enabled 41 | segmentedControl.isEnabledForSegmentAtIndex(0) // true 42 | 43 | 44 | ``` 45 | 46 | ## Example 47 | 48 | To run the example project, clone the repo, and run `pod install` from the Example directory first. 49 | 50 | ## Installation 51 | 52 | ATHMultiSelectionSegmentedControl is available through [CocoaPods](http://cocoapods.org). To install 53 | it, simply add the following line to your Podfile: 54 | 55 | ```ruby 56 | pod "ATHMultiSelectionSegmentedControl" 57 | ``` 58 | 59 | ## Author 60 | 61 | attheodo, at@atworks.gr 62 | 63 | ## License 64 | 65 | ATHMultiSelectionSegmentedControl is available under the MIT license. See the LICENSE file for more info. 66 | 67 | ## Changelog 68 | - **v0.2.0**, *September 2016* 69 | - Migration to Swift 3.0 70 | - **v0.1.1**, *July 2016* 71 | - Bug fixes for tinting and button insertion 72 | - **v0.1.0**, *May 2016* 73 | - Initial release 74 | -------------------------------------------------------------------------------- /misc/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/attheodo/ATHMultiSelectionSegmentedControl/95bc34786c4ad285a43afb2ef61e9228aeec626f/misc/demo.gif -------------------------------------------------------------------------------- /misc/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/attheodo/ATHMultiSelectionSegmentedControl/95bc34786c4ad285a43afb2ef61e9228aeec626f/misc/logo.png --------------------------------------------------------------------------------