Skip to content
This repository was archived by the owner on Mar 24, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# FSVerticalTabBarController CHANGELOG

## 0.1.0

Initial release.
Empty file added Classes/ios/.gitkeep
Empty file.
File renamed without changes.
File renamed without changes.
19 changes: 19 additions & 0 deletions FSVerticalTabBarController.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Pod::Spec.new do |s|
s.name = "FSVerticalTabBarController"
s.version = "0.1.0"
s.summary = "Vertical tab bar controller for iOS mimicking UITabBarController look and behavior"
s.homepage = "https://github.com/futuresimple/FSVerticalTabBarController"
s.screenshots = "https://github.com/futuresimple/FSVerticalTabBarController/raw/master/images/sample_screenshot.png"
s.license = 'MIT'
s.author = { "futuresimple" => "bejo@Poland" }
s.source = { :git => "https://github.com/ivoryxiong/FSVerticalTabBarController.git", :tag => "0.1.0" }

s.platform = :ios, '5.0'
s.ios.deployment_target = '5.0'
s.requires_arc = true

s.source_files = 'Classes/**/*.{h,m}'
s.resources = 'Assets'

s.public_header_files = 'Classes/**/*.h'
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@

/* Begin PBXBuildFile section */
061C61F215712A3E00E644A0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 061C61F115712A3E00E644A0 /* QuartzCore.framework */; };
0923DAF015656F6A004CFAB8 /* FSVerticalTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = 0923DAE915656F6A004CFAB8 /* FSVerticalTabBar.m */; };
0923DAF115656F6A004CFAB8 /* FSVerticalTabBarButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 0923DAEB15656F6A004CFAB8 /* FSVerticalTabBarButton.m */; };
0923DAF215656F6A004CFAB8 /* FSVerticalTabBarController.m in Sources */ = {isa = PBXBuildFile; fileRef = 0923DAED15656F6A004CFAB8 /* FSVerticalTabBarController.m */; };
0923DAF315656F6A004CFAB8 /* selectionIndicatorImage.png in Resources */ = {isa = PBXBuildFile; fileRef = 0923DAEE15656F6A004CFAB8 /* selectionIndicatorImage.png */; };
0923DAF415656F6A004CFAB8 /* [email protected] in Resources */ = {isa = PBXBuildFile; fileRef = 0923DAEF15656F6A004CFAB8 /* [email protected] */; };
783C22161BE74339A3522AB8 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C0D8FFE7178F403599EFA77B /* libPods.a */; };
FD1AC80B15584B7300A8E36A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1AC80A15584B7300A8E36A /* UIKit.framework */; };
FD1AC80D15584B7300A8E36A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1AC80C15584B7300A8E36A /* Foundation.framework */; };
FD1AC80F15584B7300A8E36A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1AC80E15584B7300A8E36A /* CoreGraphics.framework */; };
Expand All @@ -29,14 +25,8 @@

/* Begin PBXFileReference section */
061C61F115712A3E00E644A0 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
0923DAE815656F6A004CFAB8 /* FSVerticalTabBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FSVerticalTabBar.h; path = ../src/FSVerticalTabBar.h; sourceTree = SOURCE_ROOT; };
0923DAE915656F6A004CFAB8 /* FSVerticalTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FSVerticalTabBar.m; path = ../src/FSVerticalTabBar.m; sourceTree = SOURCE_ROOT; };
0923DAEA15656F6A004CFAB8 /* FSVerticalTabBarButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FSVerticalTabBarButton.h; path = ../src/FSVerticalTabBarButton.h; sourceTree = SOURCE_ROOT; };
0923DAEB15656F6A004CFAB8 /* FSVerticalTabBarButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FSVerticalTabBarButton.m; path = ../src/FSVerticalTabBarButton.m; sourceTree = SOURCE_ROOT; };
0923DAEC15656F6A004CFAB8 /* FSVerticalTabBarController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FSVerticalTabBarController.h; path = ../src/FSVerticalTabBarController.h; sourceTree = SOURCE_ROOT; };
0923DAED15656F6A004CFAB8 /* FSVerticalTabBarController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FSVerticalTabBarController.m; path = ../src/FSVerticalTabBarController.m; sourceTree = SOURCE_ROOT; };
0923DAEE15656F6A004CFAB8 /* selectionIndicatorImage.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = selectionIndicatorImage.png; path = ../src/selectionIndicatorImage.png; sourceTree = SOURCE_ROOT; };
0923DAEF15656F6A004CFAB8 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "[email protected]"; path = "../src/[email protected]"; sourceTree = SOURCE_ROOT; };
22734BA23FCA494B886B73CB /* Pods.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.xcconfig; path = Pods/Pods.xcconfig; sourceTree = "<group>"; };
C0D8FFE7178F403599EFA77B /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
FD1AC80615584B7300A8E36A /* FSVerticalTabBarExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FSVerticalTabBarExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
FD1AC80A15584B7300A8E36A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
FD1AC80C15584B7300A8E36A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -65,6 +55,7 @@
FD1AC80B15584B7300A8E36A /* UIKit.framework in Frameworks */,
FD1AC80D15584B7300A8E36A /* Foundation.framework in Frameworks */,
FD1AC80F15584B7300A8E36A /* CoreGraphics.framework in Frameworks */,
783C22161BE74339A3522AB8 /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -77,10 +68,10 @@
FD1AC8401558570C00A8E36A /* ios-linen.png */,
FD1AC83815584E5400A8E36A /* magnifying-glass.png */,
FD1AC83915584E5400A8E36A /* [email protected] */,
FD1AC82A15584B8400A8E36A /* FSVerticalTabBarController */,
FD1AC81015584B7300A8E36A /* FSVerticalTabBarExample */,
FD1AC80915584B7300A8E36A /* Frameworks */,
FD1AC80715584B7300A8E36A /* Products */,
22734BA23FCA494B886B73CB /* Pods.xcconfig */,
);
sourceTree = "<group>";
};
Expand All @@ -99,6 +90,7 @@
FD1AC80A15584B7300A8E36A /* UIKit.framework */,
FD1AC80C15584B7300A8E36A /* Foundation.framework */,
FD1AC80E15584B7300A8E36A /* CoreGraphics.framework */,
C0D8FFE7178F403599EFA77B /* libPods.a */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -128,32 +120,18 @@
name = "Supporting Files";
sourceTree = "<group>";
};
FD1AC82A15584B8400A8E36A /* FSVerticalTabBarController */ = {
isa = PBXGroup;
children = (
0923DAE815656F6A004CFAB8 /* FSVerticalTabBar.h */,
0923DAE915656F6A004CFAB8 /* FSVerticalTabBar.m */,
0923DAEA15656F6A004CFAB8 /* FSVerticalTabBarButton.h */,
0923DAEB15656F6A004CFAB8 /* FSVerticalTabBarButton.m */,
0923DAEC15656F6A004CFAB8 /* FSVerticalTabBarController.h */,
0923DAED15656F6A004CFAB8 /* FSVerticalTabBarController.m */,
0923DAEE15656F6A004CFAB8 /* selectionIndicatorImage.png */,
0923DAEF15656F6A004CFAB8 /* [email protected] */,
);
name = FSVerticalTabBarController;
path = src;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
FD1AC80515584B7300A8E36A /* FSVerticalTabBarExample */ = {
isa = PBXNativeTarget;
buildConfigurationList = FD1AC82715584B7300A8E36A /* Build configuration list for PBXNativeTarget "FSVerticalTabBarExample" */;
buildPhases = (
8A6A1A9A62E84B159025FB14 /* Check Pods Manifest.lock */,
FD1AC80215584B7300A8E36A /* Sources */,
FD1AC80315584B7300A8E36A /* Frameworks */,
FD1AC80415584B7300A8E36A /* Resources */,
4A60575917F24A91923F5000 /* Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -201,13 +179,44 @@
FD1AC8411558570C00A8E36A /* ios-linen.png in Resources */,
FD27F21515596C5E0054F11E /* MainStoryboard_iPhone.storyboard in Resources */,
FD27F21615596C5E0054F11E /* MainStoryboard_iPad.storyboard in Resources */,
0923DAF315656F6A004CFAB8 /* selectionIndicatorImage.png in Resources */,
0923DAF415656F6A004CFAB8 /* [email protected] in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
4A60575917F24A91923F5000 /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
8A6A1A9A62E84B159025FB14 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
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";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
FD1AC80215584B7300A8E36A /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand All @@ -216,9 +225,6 @@
FD1AC81715584B7300A8E36A /* main.m in Sources */,
FD1AC81B15584B7300A8E36A /* FSAppDelegate.m in Sources */,
FD1AC82415584B7300A8E36A /* FSVerticalTabBarExampleController.m in Sources */,
0923DAF015656F6A004CFAB8 /* FSVerticalTabBar.m in Sources */,
0923DAF115656F6A004CFAB8 /* FSVerticalTabBarButton.m in Sources */,
0923DAF215656F6A004CFAB8 /* FSVerticalTabBarController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -285,6 +291,7 @@
};
FD1AC82815584B7300A8E36A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 22734BA23FCA494B886B73CB /* Pods.xcconfig */;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "FSVerticalTabBarExample/FSVerticalTabBarExample-Prefix.pch";
Expand All @@ -296,6 +303,7 @@
};
FD1AC82915584B7300A8E36A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 22734BA23FCA494B886B73CB /* Pods.xcconfig */;
buildSettings = {
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "FSVerticalTabBarExample/FSVerticalTabBarExample-Prefix.pch";
Expand Down
2 changes: 2 additions & 0 deletions Project/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
platform :ios, '5.0'
pod "FSVerticalTabBarController", :path => "../FSVerticalTabBarController.podspec"
148 changes: 148 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
desc "Runs the specs [EMPTY]"
task :spec do
# Provide your own implementation
end

task :version do
git_remotes = `git remote`.strip.split("\n")

if git_remotes.count > 0
puts "-- fetching version number from github"
sh 'git fetch'

remote_version = remote_spec_version
end

if remote_version.nil?
puts "There is no current released version. You're about to release a new Pod."
version = "0.0.1"
else
puts "The current released version of your pod is " + remote_spec_version.to_s()
version = suggested_version_number
end

puts "Enter the version you want to release (" + version + ") "
new_version_number = $stdin.gets.strip
if new_version_number == ""
new_version_number = version
end

replace_version_number(new_version_number)
end

desc "Release a new version of the Pod"
task :release do

puts "* Running version"
sh "rake version"

unless ENV['SKIP_CHECKS']
if `git symbolic-ref HEAD 2>/dev/null`.strip.split('/').last != 'master'
$stderr.puts "[!] You need to be on the `master' branch in order to be able to do a release."
exit 1
end

if `git tag`.strip.split("\n").include?(spec_version)
$stderr.puts "[!] A tag for version `#{spec_version}' already exists. Change the version in the podspec"
exit 1
end

puts "You are about to release `#{spec_version}`, is that correct? [y/n]"
exit if $stdin.gets.strip.downcase != 'y'
end

puts "* Running specs"
sh "rake spec"

puts "* Linting the podspec"
sh "pod lib lint"

# Then release
sh "git commit #{podspec_path} CHANGELOG.md -m 'Release #{spec_version}'"
sh "git tag -a #{spec_version} -m 'Release #{spec_version}'"
sh "git push origin master"
sh "git push origin --tags"
sh "pod push master #{podspec_path}"
end

# @return [Pod::Version] The version as reported by the Podspec.
#
def spec_version
require 'cocoapods'
spec = Pod::Specification.from_file(podspec_path)
spec.version
end

# @return [Pod::Version] The version as reported by the Podspec from remote.
#
def remote_spec_version
require 'cocoapods-core'

if spec_file_exist_on_remote?
remote_spec = eval(`git show origin/master:#{podspec_path}`)
remote_spec.version
else
nil
end
end

# @return [Bool] If the remote repository has a copy of the podpesc file or not.
#
def spec_file_exist_on_remote?
test_condition = `if git rev-parse --verify --quiet origin/master:#{podspec_path} >/dev/null;
then
echo 'true'
else
echo 'false'
fi`

'true' == test_condition.strip
end

# @return [String] The relative path of the Podspec.
#
def podspec_path
podspecs = Dir.glob('*.podspec')
if podspecs.count == 1
podspecs.first
else
raise "Could not select a podspec"
end
end

# @return [String] The suggested version number based on the local and remote version numbers.
#
def suggested_version_number
if spec_version != remote_spec_version
spec_version.to_s()
else
next_version(spec_version).to_s()
end
end

# @param [Pod::Version] version
# the version for which you need the next version
#
# @note It is computed by bumping the last component of the versino string by 1.
#
# @return [Pod::Version] The version that comes next after the version supplied.
#
def next_version(version)
version_components = version.to_s().split(".");
last = (version_components.last.to_i() + 1).to_s
version_components[-1] = last
Pod::Version.new(version_components.join("."))
end

# @param [String] new_version_number
# the new version number
#
# @note This methods replaces the version number in the podspec file with a new version number.
#
# @return void
#
def replace_version_number(new_version_number)
text = File.read(podspec_path)
text.gsub!(/(s.version( )*= ")#{spec_version}(")/, "\\1#{new_version_number}\\3")
File.open(podspec_path, "w") { |file| file.puts text }
end
Binary file removed images/sample_screenshot.png
Binary file not shown.