Skip to content

Commit

Permalink
Merge pull request #5 from michallaskowski/master
Browse files Browse the repository at this point in the history
More generic version of SMSegmentView and .podspec
  • Loading branch information
Si committed Nov 30, 2015
2 parents 9082b35 + 93540fe commit b5c087f
Show file tree
Hide file tree
Showing 12 changed files with 777 additions and 222 deletions.
58 changes: 58 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Created by https://www.gitignore.io/api/xcode,osx

### Carthage ###
Carthage/

### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
build/
DerivedData

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata

## Other
*.xccheckout
*.moved-aside
*.xcuserstate


### OSX ###
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

28 changes: 28 additions & 0 deletions SMSegmentView.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Pod::Spec.new do |s|

s.name = "SMSegmentView"
s.version = "0.0.1"
s.summary = "Custom segmented control for iOS 7 and above"

s.description = <<-DESC
Written in Swift.
Support both images and text.
Support vertically organise segments
More customisible than UISegmentedControl and easier to expand with new style.
DESC

s.homepage = "https://github.com/allenbryan11/SMSegmentView"
s.license = { :type => "MIT", :file => "LICENSE.md" }
s.author = "allenbryan11"
s.platform = :ios, "7.0"

s.ios.deployment_target = "7.0"

s.source = { :git => "https://github.com/allenbryan11/SMSegmentView.git", :branch => "master" }


s.source_files = "SMSegmentViewController/SMSegmentView/*.swift"
s.requires_arc = true
s.frameworks = 'UIKit'

end
26 changes: 26 additions & 0 deletions SMSegmentView/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
19 changes: 19 additions & 0 deletions SMSegmentView/SMSegmentView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// SMSegmentView.h
// SMSegmentView
//
// Created by mlaskowski on 22/10/15.
// Copyright © 2015 si.ma. All rights reserved.
//

#import <UIKit/UIKit.h>

//! Project version number for SMSegmentView.
FOUNDATION_EXPORT double SMSegmentViewVersionNumber;

//! Project version string for SMSegmentView.
FOUNDATION_EXPORT const unsigned char SMSegmentViewVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <SMSegmentView/PublicHeader.h>


144 changes: 144 additions & 0 deletions SMSegmentViewController.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@
6957D72E1A5A997A007AC81B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6957D72D1A5A997A007AC81B /* Images.xcassets */; };
6957D7311A5A997A007AC81B /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6957D72F1A5A997A007AC81B /* LaunchScreen.xib */; };
6957D73D1A5A997A007AC81B /* SMSegmentViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6957D73C1A5A997A007AC81B /* SMSegmentViewControllerTests.swift */; };
C19086811BBCBCF900DCF698 /* SMBasicSegmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C19086801BBCBCF900DCF698 /* SMBasicSegmentView.swift */; settings = {ASSET_TAGS = (); }; };
C19086831BBCBD1300DCF698 /* SMBasicSegment.swift in Sources */ = {isa = PBXBuildFile; fileRef = C19086821BBCBD1300DCF698 /* SMBasicSegment.swift */; settings = {ASSET_TAGS = (); }; };
C19086851BBCC92A00DCF698 /* SMAlphaImageSegment.swift in Sources */ = {isa = PBXBuildFile; fileRef = C19086841BBCC92A00DCF698 /* SMAlphaImageSegment.swift */; settings = {ASSET_TAGS = (); }; };
C19594531BD91785008D80C0 /* SMSegmentView.h in Headers */ = {isa = PBXBuildFile; fileRef = C19594521BD91785008D80C0 /* SMSegmentView.h */; settings = {ATTRIBUTES = (Public, ); }; };
C19594581BD917ED008D80C0 /* SMSegmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2346DF371A619FC200DEFA20 /* SMSegmentView.swift */; };
C19594591BD917ED008D80C0 /* SMSegment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2346DF361A619FC200DEFA20 /* SMSegment.swift */; };
C195945A1BD917ED008D80C0 /* SMBasicSegmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C19086801BBCBCF900DCF698 /* SMBasicSegmentView.swift */; };
C195945B1BD917ED008D80C0 /* SMBasicSegment.swift in Sources */ = {isa = PBXBuildFile; fileRef = C19086821BBCBD1300DCF698 /* SMBasicSegment.swift */; };
C195945C1BD917ED008D80C0 /* SMAlphaImageSegment.swift in Sources */ = {isa = PBXBuildFile; fileRef = C19086841BBCC92A00DCF698 /* SMAlphaImageSegment.swift */; };
/* End PBXBuildFile section */

/* Begin PBXContainerItemProxy section */
Expand Down Expand Up @@ -64,6 +73,12 @@
6957D7361A5A997A007AC81B /* SMSegmentViewControllerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SMSegmentViewControllerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
6957D73B1A5A997A007AC81B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
6957D73C1A5A997A007AC81B /* SMSegmentViewControllerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SMSegmentViewControllerTests.swift; sourceTree = "<group>"; };
C19086801BBCBCF900DCF698 /* SMBasicSegmentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SMBasicSegmentView.swift; sourceTree = "<group>"; };
C19086821BBCBD1300DCF698 /* SMBasicSegment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SMBasicSegment.swift; sourceTree = "<group>"; };
C19086841BBCC92A00DCF698 /* SMAlphaImageSegment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SMAlphaImageSegment.swift; sourceTree = "<group>"; };
C19594501BD91785008D80C0 /* SMSegmentView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SMSegmentView.framework; sourceTree = BUILT_PRODUCTS_DIR; };
C19594521BD91785008D80C0 /* SMSegmentView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SMSegmentView.h; sourceTree = "<group>"; };
C19594541BD91785008D80C0 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand All @@ -81,6 +96,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
C195944C1BD91785008D80C0 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
Expand All @@ -89,6 +111,9 @@
children = (
2346DF371A619FC200DEFA20 /* SMSegmentView.swift */,
2346DF361A619FC200DEFA20 /* SMSegment.swift */,
C19086801BBCBCF900DCF698 /* SMBasicSegmentView.swift */,
C19086821BBCBD1300DCF698 /* SMBasicSegment.swift */,
C19086841BBCC92A00DCF698 /* SMAlphaImageSegment.swift */,
);
path = SMSegmentView;
sourceTree = "<group>";
Expand All @@ -98,6 +123,7 @@
children = (
6957D7231A5A997A007AC81B /* SMSegmentViewController */,
6957D7391A5A997A007AC81B /* SMSegmentViewControllerTests */,
C19594511BD91785008D80C0 /* SMSegmentView */,
6957D7221A5A997A007AC81B /* Products */,
);
sourceTree = "<group>";
Expand All @@ -107,6 +133,7 @@
children = (
6957D7211A5A997A007AC81B /* SMSegmentViewController.app */,
6957D7361A5A997A007AC81B /* SMSegmentViewControllerTests.xctest */,
C19594501BD91785008D80C0 /* SMSegmentView.framework */,
);
name = Products;
sourceTree = "<group>";
Expand Down Expand Up @@ -170,8 +197,28 @@
path = Images;
sourceTree = "<group>";
};
C19594511BD91785008D80C0 /* SMSegmentView */ = {
isa = PBXGroup;
children = (
C19594521BD91785008D80C0 /* SMSegmentView.h */,
C19594541BD91785008D80C0 /* Info.plist */,
);
path = SMSegmentView;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXHeadersBuildPhase section */
C195944D1BD91785008D80C0 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
C19594531BD91785008D80C0 /* SMSegmentView.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */

/* Begin PBXNativeTarget section */
6957D7201A5A997A007AC81B /* SMSegmentViewController */ = {
isa = PBXNativeTarget;
Expand Down Expand Up @@ -208,6 +255,24 @@
productReference = 6957D7361A5A997A007AC81B /* SMSegmentViewControllerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
C195944F1BD91785008D80C0 /* SMSegmentView */ = {
isa = PBXNativeTarget;
buildConfigurationList = C19594571BD91785008D80C0 /* Build configuration list for PBXNativeTarget "SMSegmentView" */;
buildPhases = (
C195944B1BD91785008D80C0 /* Sources */,
C195944C1BD91785008D80C0 /* Frameworks */,
C195944D1BD91785008D80C0 /* Headers */,
C195944E1BD91785008D80C0 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = SMSegmentView;
productName = SMSegmentView;
productReference = C19594501BD91785008D80C0 /* SMSegmentView.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
Expand All @@ -226,6 +291,9 @@
CreatedOnToolsVersion = 6.1;
TestTargetID = 6957D7201A5A997A007AC81B;
};
C195944F1BD91785008D80C0 = {
CreatedOnToolsVersion = 7.0.1;
};
};
};
buildConfigurationList = 6957D71C1A5A997A007AC81B /* Build configuration list for PBXProject "SMSegmentViewController" */;
Expand All @@ -243,6 +311,7 @@
targets = (
6957D7201A5A997A007AC81B /* SMSegmentViewController */,
6957D7351A5A997A007AC81B /* SMSegmentViewControllerTests */,
C195944F1BD91785008D80C0 /* SMSegmentView */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -277,6 +346,13 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
C195944E1BD91785008D80C0 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand All @@ -288,6 +364,9 @@
2346DF391A619FC200DEFA20 /* SMSegmentView.swift in Sources */,
2346DF381A619FC200DEFA20 /* SMSegment.swift in Sources */,
6957D7271A5A997A007AC81B /* AppDelegate.swift in Sources */,
C19086831BBCBD1300DCF698 /* SMBasicSegment.swift in Sources */,
C19086811BBCBCF900DCF698 /* SMBasicSegmentView.swift in Sources */,
C19086851BBCC92A00DCF698 /* SMAlphaImageSegment.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -299,6 +378,18 @@
);
runOnlyForDeploymentPostprocessing = 0;
};
C195944B1BD91785008D80C0 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C19594581BD917ED008D80C0 /* SMSegmentView.swift in Sources */,
C19594591BD917ED008D80C0 /* SMSegment.swift in Sources */,
C195945A1BD917ED008D80C0 /* SMBasicSegmentView.swift in Sources */,
C195945B1BD917ED008D80C0 /* SMBasicSegment.swift in Sources */,
C195945C1BD917ED008D80C0 /* SMAlphaImageSegment.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXTargetDependency section */
Expand Down Expand Up @@ -463,6 +554,51 @@
};
name = Release;
};
C19594551BD91785008D80C0 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = SMSegmentView/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = sima.SMSegmentView;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
C19594561BD91785008D80C0 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_NO_COMMON_BLOCKS = YES;
INFOPLIST_FILE = SMSegmentView/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = sima.SMSegmentView;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
Expand Down Expand Up @@ -493,6 +629,14 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C19594571BD91785008D80C0 /* Build configuration list for PBXNativeTarget "SMSegmentView" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C19594551BD91785008D80C0 /* Debug */,
C19594561BD91785008D80C0 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 6957D7191A5A997A007AC81B /* Project object */;
Expand Down
Loading

0 comments on commit b5c087f

Please sign in to comment.