Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #34 #35

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
1 change: 0 additions & 1 deletion .swift-version

This file was deleted.

5 changes: 3 additions & 2 deletions ScrollPager.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
Pod::Spec.new do |s|
s.name = 'ScrollPager'
s.version = '0.9'
s.version = '1.0.0'
s.summary = 'A fully featured scroll pager similar to the one in flipboard, fully configurable through storyboard'
s.homepage = 'https://github.com/aryaxt/ScrollPager'
s.license = {
:type => 'MIT',
:file => 'License.txt'
}
s.author = {'Aryan Ghassemi' => 'https://github.com/aryaxt/ScrollPager'}
s.source = {:git => 'https://github.com/aryaxt/ScrollPager.git', :tag => '0.9'}
s.source = {:git => 'https://github.com/eddy-lau/ScrollPager.git', :tag => '1.0.0'}
s.swift_version = '5.0'
s.platform = :ios, '8.0'
s.source_files = 'ScrollPager/Source/*.{swift}'
s.framework = 'Foundation', 'UIKit'
Expand Down
9 changes: 5 additions & 4 deletions ScrollPager.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -368,7 +369,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.aryaxt.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -381,7 +382,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.aryaxt.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -401,7 +402,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.aryaxt.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ScrollPager.app/ScrollPager";
};
name = Debug;
Expand All @@ -418,7 +419,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.aryaxt.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ScrollPager.app/ScrollPager";
};
name = Release;
Expand Down
6 changes: 3 additions & 3 deletions ScrollPager/Source/ScrollPager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ import UIKit

private func initialize() {
#if TARGET_INTERFACE_BUILDER
addSegmentsWithTitles(["One", "Two", "Three", "Four"])
addSegmentsWithTitles(segmentTitles: ["One", "Two", "Three", "Four"])
#endif
}

Expand Down Expand Up @@ -213,7 +213,7 @@ import UIKit
if strongSelf.indicatorSizeMatchesTitle {
guard let string = button.titleLabel?.text else { fatalError("missing title on button, title is required for width calculation") }
guard let font = button.titleLabel?.font else { fatalError("missing dont on button, title is required for width calculation") }
let size = string.size(attributes: [NSFontAttributeName: font])
let size = string.size(withAttributes: [.font: font])
let x = width * CGFloat(index) + ((width - size.width) / CGFloat(2))
strongSelf.indicatorView.frame = CGRect(x: x, y: indicatorY, width: size.width, height: strongSelf.indicatorHeight)
}
Expand Down Expand Up @@ -266,7 +266,7 @@ import UIKit
}
}

internal func buttonSelected(sender: UIButton) {
@objc internal func buttonSelected(sender: UIButton) {
if sender.tag == selectedIndex {
return
}
Expand Down