Skip to content

Commit

Permalink
Merge pull request #145 from gmarm/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
gmarm authored Oct 21, 2020
2 parents ccb393f + 82672cc commit 098a800
Show file tree
Hide file tree
Showing 13 changed files with 50 additions and 4 deletions.
4 changes: 2 additions & 2 deletions BetterSegmentedControl.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "BetterSegmentedControl"
s.version = "2.0"
s.version = "2.0.0"
s.swift_version = "5.1"
s.summary = "An easy to use, customizable replacement for UISegmentedControl & UISwitch."
s.description = <<-DESC
Expand All @@ -9,7 +9,7 @@ DESC
s.homepage = "https://github.com/gmarm/BetterSegmentedControl"
s.license = 'MIT'
s.author = { "George Marmaridis" => "[email protected]" }
s.source = { :git => "https://github.com/gmarm/BetterSegmentedControl.git", :tag => "2.0" }
s.source = { :git => "https://github.com/gmarm/BetterSegmentedControl.git", :tag => "2.0.0" }
s.social_media_url = 'https://twitter.com/gmarmas'
s.platform = :ios, '9.0'
s.requires_arc = true
Expand Down
6 changes: 4 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ let package = Package(
products: [
.library(
name: "BetterSegmentedControl",
targets: ["BetterSegmentedControl"])
targets: ["BetterSegmentedControl"]
)
],
targets: [
.target(
name: "BetterSegmentedControl",
path: "Pod")
path: "Pod/Classes"
)
],
swiftLanguageVersions: [.v5]
)
4 changes: 4 additions & 0 deletions Pod/Classes/BetterSegmentedControl+IBDesignable.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by George Marmaridis on 20.10.20.
//

#if canImport(UIKit)

import UIKit

extension BetterSegmentedControl {
Expand Down Expand Up @@ -36,3 +38,5 @@ extension BetterSegmentedControl {
}
}
}

#endif
4 changes: 4 additions & 0 deletions Pod/Classes/BetterSegmentedControl+IndicatorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by George Marmaridis on 19.10.20.
//

#if canImport(UIKit)

import UIKit

extension BetterSegmentedControl {
Expand Down Expand Up @@ -37,3 +39,5 @@ extension BetterSegmentedControl {
}
}
}

#endif
4 changes: 4 additions & 0 deletions Pod/Classes/BetterSegmentedControl+Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
//
//

#if canImport(UIKit)

import UIKit

public extension BetterSegmentedControl {
Expand All @@ -30,3 +32,5 @@ public extension BetterSegmentedControl {
case cornerRadius(CGFloat)
}
}

#endif
4 changes: 4 additions & 0 deletions Pod/Classes/BetterSegmentedControl+PredefinedStyles.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by George Marmaridis on 18.10.20.
//

#if canImport(UIKit)

import UIKit

public extension BetterSegmentedControl {
Expand All @@ -21,3 +23,5 @@ public extension BetterSegmentedControl {
return control
}
}

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by George Marmaridis on 19.10.20.
//

#if canImport(UIKit)

import UIKit

@available(iOS 13.4, *)
Expand Down Expand Up @@ -32,3 +34,5 @@ extension BetterSegmentedControl: UIPointerInteractionDelegate {
return .init(effect: .highlight(.init(view: view)))
}
}

#endif
4 changes: 4 additions & 0 deletions Pod/Classes/BetterSegmentedControl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Copyright © 2020 George Marmaridis. All rights reserved.
//

#if canImport(UIKit)

import UIKit

@IBDesignable open class BetterSegmentedControl: UIControl {
Expand Down Expand Up @@ -499,3 +501,5 @@ extension BetterSegmentedControl: UIGestureRecognizerDelegate {
return super.gestureRecognizerShouldBegin(gestureRecognizer)
}
}

#endif
4 changes: 4 additions & 0 deletions Pod/Classes/Helpers/UIColor+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by George Marmaridis on 16.10.20.
//

#if canImport(UIKit)

import UIKit

extension UIColor {
Expand All @@ -18,3 +20,5 @@ extension UIColor {
.black
}
}

#endif
4 changes: 4 additions & 0 deletions Pod/Classes/Helpers/UIView+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
// Created by George Marmaridis on 19.10.20.
//

#if canImport(UIKit)

import UIKit

extension UIView {
var width: CGFloat { bounds.width }
var height: CGFloat { bounds.height }
}

#endif
4 changes: 4 additions & 0 deletions Pod/Classes/Segments/BetterSegmentedControlSegment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by George Marmaridis on 08/10/2017.
//

#if canImport(UIKit)

import UIKit

/// A segment is comprised of a normal state view and a selected state view. These need to be separate view instances.
Expand All @@ -18,3 +20,5 @@ public protocol BetterSegmentedControlSegment {
/// The view to be shown for the active or selected state.
var selectedView: UIView { get }
}

#endif
4 changes: 4 additions & 0 deletions Pod/Classes/Segments/IconSegment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by George Marmaridis on 10/02/2018.
//

#if canImport(UIKit)

import UIKit

open class IconSegment: BetterSegmentedControlSegment {
Expand Down Expand Up @@ -93,3 +95,5 @@ public extension IconSegment {
}
}
}

#endif
4 changes: 4 additions & 0 deletions Pod/Classes/Segments/LabelSegment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
// Created by George Marmaridis on 08/10/2017.
//

#if canImport(UIKit)

import UIKit

open class LabelSegment: BetterSegmentedControlSegment {
Expand Down Expand Up @@ -111,3 +113,5 @@ public extension LabelSegment {
}
}
}

#endif

0 comments on commit 098a800

Please sign in to comment.