Skip to content

Commit

Permalink
library updated
Browse files Browse the repository at this point in the history
  • Loading branch information
megaganjotsingh committed Jun 12, 2024
1 parent f973c52 commit c91d6f8
Show file tree
Hide file tree
Showing 60 changed files with 586 additions and 974 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ language: objective-c
# - gem install cocoapods # Since Travis is not always on latest version
# - pod install --project-directory=Example
script:
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/ToggleSwitch.xcworkspace -scheme ToggleSwitch-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/GSToggleSwitch.xcworkspace -scheme GSToggleSwitch-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty
- pod lib lint
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation
import UIKit.UIView

class ToggleSwitch: UIView {
class GSToggleSwitch: UIView {
enum State {
case on
case off
Expand Down
2 changes: 1 addition & 1 deletion Classes/ThumbView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class ThumbView: UIView {
}
}

func setImage(withState state: ToggleSwitch.State) {
func setImage(withState state: GSToggleSwitch.State) {
let image = state == .on ? properties.thumbOnImage : properties.thumbOffImage
UIView.transition(with: imageView, duration: 0.3, options: .transitionCrossDissolve) { [weak self] in
self?.imageView.image = image
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "ToggleSwitch_Example.app"
BlueprintName = "ToggleSwitch_Example"
ReferencedContainer = "container:ToggleSwitch.xcodeproj">
BuildableName = "GSToggleSwitch_Example.app"
BlueprintName = "GSToggleSwitch_Example"
ReferencedContainer = "container:GSToggleSwitch.xcodeproj">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
Expand All @@ -29,9 +29,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACE41AFB9204008FA782"
BuildableName = "ToggleSwitch_Tests.xctest"
BlueprintName = "ToggleSwitch_Tests"
ReferencedContainer = "container:ToggleSwitch.xcodeproj">
BuildableName = "GSToggleSwitch_Tests.xctest"
BlueprintName = "GSToggleSwitch_Tests"
ReferencedContainer = "container:GSToggleSwitch.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
Expand All @@ -48,19 +48,19 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACE41AFB9204008FA782"
BuildableName = "ToggleSwitch_Tests.xctest"
BlueprintName = "ToggleSwitch_Tests"
ReferencedContainer = "container:ToggleSwitch.xcodeproj">
BuildableName = "GSToggleSwitch_Tests.xctest"
BlueprintName = "GSToggleSwitch_Tests"
ReferencedContainer = "container:GSToggleSwitch.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "ToggleSwitch_Example.app"
BlueprintName = "ToggleSwitch_Example"
ReferencedContainer = "container:ToggleSwitch.xcodeproj">
BuildableName = "GSToggleSwitch_Example.app"
BlueprintName = "GSToggleSwitch_Example"
ReferencedContainer = "container:GSToggleSwitch.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
Expand All @@ -82,9 +82,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "ToggleSwitch_Example.app"
BlueprintName = "ToggleSwitch_Example"
ReferencedContainer = "container:ToggleSwitch.xcodeproj">
BuildableName = "GSToggleSwitch_Example.app"
BlueprintName = "GSToggleSwitch_Example"
ReferencedContainer = "container:GSToggleSwitch.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
Expand All @@ -101,9 +101,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
BuildableName = "ToggleSwitch_Example.app"
BlueprintName = "ToggleSwitch_Example"
ReferencedContainer = "container:ToggleSwitch.xcodeproj">
BuildableName = "GSToggleSwitch_Example.app"
BlueprintName = "GSToggleSwitch_Example"
ReferencedContainer = "container:GSToggleSwitch.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//
// AppDelegate.swift
// ToggleSwitch
// GSToggleSwitch
//
// Created by megaganjotsingh on 06/11/2024.
// Created by megaganjotsingh on 06/12/2024.
// Copyright (c) 2024 megaganjotsingh. All rights reserved.
//

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ToggleSwitch" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="GSToggleSwitch" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
<rect key="frame" x="20" y="140" width="441" height="43"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
Expand Down
30 changes: 30 additions & 0 deletions Example/GSToggleSwitch/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="vXZ-lx-hvc">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="ufC-wZ-h7g">
<objects>
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModule="GSToggleSwitch_Example" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
File renamed without changes.
24 changes: 24 additions & 0 deletions Example/GSToggleSwitch/ViewController.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// ViewController.swift
// GSToggleSwitch
//
// Created by megaganjotsingh on 06/12/2024.
// Copyright (c) 2024 megaganjotsingh. All rights reserved.
//

import UIKit

class ViewController: UIViewController {

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}

}

6 changes: 3 additions & 3 deletions Example/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use_frameworks!

platform :ios, '10.0'

target 'ToggleSwitch_Example' do
pod 'GSToggleSwitch'
target 'GSToggleSwitch_Example' do
pod 'GSToggleSwitch', :path => '../'

target 'ToggleSwitch_Tests' do
target 'GSToggleSwitch_Tests' do
inherit! :search_paths


Expand Down
12 changes: 6 additions & 6 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ PODS:
- GSToggleSwitch (0.1.0)

DEPENDENCIES:
- GSToggleSwitch
- GSToggleSwitch (from `../`)

SPEC REPOS:
trunk:
- GSToggleSwitch
EXTERNAL SOURCES:
GSToggleSwitch:
:path: "../"

SPEC CHECKSUMS:
GSToggleSwitch: 5f105949c7b6719f145110cb78ef71de5fc65252
GSToggleSwitch: 54f5d3f8d114fb077431e352d11b9e5aa4889b3f

PODFILE CHECKSUM: 304b638bdd580f94a270fad5a4e92a0a5b23e9c6
PODFILE CHECKSUM: cdfb4c22e1b3878552c70145d1f1cbd760733408

COCOAPODS: 1.14.3
55 changes: 0 additions & 55 deletions Example/Pods/GSToggleSwitch/Classes/ThumbView.swift

This file was deleted.

26 changes: 0 additions & 26 deletions Example/Pods/GSToggleSwitch/Classes/ToggleProperties.swift

This file was deleted.

Loading

0 comments on commit c91d6f8

Please sign in to comment.