Skip to content

Commit

Permalink
Fix access control problem throughout whole library
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishan Niraula committed Dec 11, 2017
1 parent e250e73 commit b87056d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 27 deletions.
5 changes: 3 additions & 2 deletions ViewPager-Swift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
TargetAttributes = {
5F7D16CB1C6A1F80006B63C2 = {
CreatedOnToolsVersion = 7.2;
DevelopmentTeam = 55Z2G9C58Y;
LastSwiftMigration = 0910;
};
};
Expand Down Expand Up @@ -296,7 +297,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 55Z2G9C58Y;
INFOPLIST_FILE = "ViewPager-Swift/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.nishan.ViewPager-Swift";
Expand All @@ -311,7 +312,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "Brand Assets";
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 55Z2G9C58Y;
INFOPLIST_FILE = "ViewPager-Swift/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.nishan.ViewPager-Swift";
Expand Down
42 changes: 21 additions & 21 deletions ViewPager-Swift/Core/ViewPagerOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,45 +11,45 @@ import Foundation

public class ViewPagerOptions {

internal var viewPagerFrame:CGRect = CGRect.zero
public var viewPagerFrame:CGRect = CGRect.zero

// Tabs Customization
var tabType:ViewPagerTabType = .basic
var isTabHighlightAvailable:Bool = false
var isTabIndicatorAvailable:Bool = true
var tabViewBackgroundDefaultColor:UIColor = Color.tabViewBackground
var tabViewBackgroundHighlightColor:UIColor = Color.tabViewHighlight
var tabViewTextDefaultColor:UIColor = Color.textDefault
var tabViewTextHighlightColor:UIColor = Color.textHighlight
public var tabType:ViewPagerTabType = .basic
public var isTabHighlightAvailable:Bool = false
public var isTabIndicatorAvailable:Bool = true
public var tabViewBackgroundDefaultColor:UIColor = Color.tabViewBackground
public var tabViewBackgroundHighlightColor:UIColor = Color.tabViewHighlight
public var tabViewTextDefaultColor:UIColor = Color.textDefault
public var tabViewTextHighlightColor:UIColor = Color.textHighlight

// Booleans

/// Width of each tab is equal to the width of the largest tab. Tabs are laid out from Left - Right and are scrollable
var isEachTabEvenlyDistributed:Bool = false
public var isEachTabEvenlyDistributed:Bool = false
/// All the tabs are squeezed to fit inside the screen width. Tabs are not scrollable. Also it overrides isEachTabEvenlyDistributed
var fitAllTabsInView:Bool = false
public var fitAllTabsInView:Bool = false

// Tab Properties
var tabViewHeight:CGFloat = 50.0
var tabViewPaddingLeft:CGFloat = 10.0
var tabViewPaddingRight:CGFloat = 10.0
var tabViewTextFont:UIFont = UIFont.systemFont(ofSize: 16)
var tabViewImageSize:CGSize = CGSize(width: 25, height: 25)
var tabViewImageMarginTop:CGFloat = 5
var tabViewImageMarginBottom:CGFloat = 5
public var tabViewHeight:CGFloat = 50.0
public var tabViewPaddingLeft:CGFloat = 10.0
public var tabViewPaddingRight:CGFloat = 10.0
public var tabViewTextFont:UIFont = UIFont.systemFont(ofSize: 16)
public var tabViewImageSize:CGSize = CGSize(width: 25, height: 25)
public var tabViewImageMarginTop:CGFloat = 5
public var tabViewImageMarginBottom:CGFloat = 5

// Tab Indicator
var tabIndicatorViewHeight:CGFloat = 3
var tabIndicatorViewBackgroundColor:UIColor = Color.tabIndicator
public var tabIndicatorViewHeight:CGFloat = 3
public var tabIndicatorViewBackgroundColor:UIColor = Color.tabIndicator

// ViewPager
var viewPagerTransitionStyle:UIPageViewControllerTransitionStyle = .scroll
public var viewPagerTransitionStyle:UIPageViewControllerTransitionStyle = .scroll

/**
* Initializes Options for ViewPager. The frame of the supplied UIView in view parameter is
* used as reference for ViewPager width and height.
*/
init(viewPagerWithFrame frame:CGRect) {
public init(viewPagerWithFrame frame:CGRect) {
self.viewPagerFrame = frame
}

Expand Down
6 changes: 3 additions & 3 deletions ViewPager-Swift/Core/ViewPagerTab.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public enum ViewPagerTabType {

public struct ViewPagerTab {

var title:String!
var image:UIImage?
public var title:String!
public var image:UIImage?

init(title:String, image:UIImage?) {
public init(title:String, image:UIImage?) {
self.title = title
self.image = image
}
Expand Down
2 changes: 1 addition & 1 deletion ViewPager-Swift/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MainViewController: UIViewController {
self.title = "Awesome View pager"

options = ViewPagerOptions(viewPagerWithFrame: self.view.bounds)
options.tabType = ViewPagerTabType.imageWithText
options.tabType = ViewPagerTabType.basic
options.tabViewImageSize = CGSize(width: 20, height: 20)
options.tabViewTextFont = UIFont.systemFont(ofSize: 16)
options.tabViewPaddingLeft = 20
Expand Down

0 comments on commit b87056d

Please sign in to comment.