Compare commits
No commits in common. "master" and "hotfix/view-life-cycle-functions-called-multiple-times" have entirely different histories.
master
...
hotfix/vie
|
@ -1 +0,0 @@
|
|||
4.0
|
|
@ -0,0 +1,560 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
FFBF6CBA1E681DF6008B7F73 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFBF6CB91E681DF6008B7F73 /* AppDelegate.swift */; };
|
||||
FFBF6CBF1E681DF6008B7F73 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FFBF6CBD1E681DF6008B7F73 /* Main.storyboard */; };
|
||||
FFBF6CC11E681DF6008B7F73 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FFBF6CC01E681DF6008B7F73 /* Assets.xcassets */; };
|
||||
FFBF6CC41E681DF6008B7F73 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FFBF6CC21E681DF6008B7F73 /* LaunchScreen.storyboard */; };
|
||||
FFBF6CCF1E681DF6008B7F73 /* HorizontalMenuDemoUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFBF6CCE1E681DF6008B7F73 /* HorizontalMenuDemoUITests.swift */; };
|
||||
FFBF6CE51E681EF5008B7F73 /* TPGHorizontalMenu.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FFBF6CE21E681EE2008B7F73 /* TPGHorizontalMenu.framework */; };
|
||||
FFBF6CE61E681EF5008B7F73 /* TPGHorizontalMenu.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = FFBF6CE21E681EE2008B7F73 /* TPGHorizontalMenu.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
FFF72D481E89401B0012A0C0 /* UIStoryboard+Initialization.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF72D431E89401B0012A0C0 /* UIStoryboard+Initialization.swift */; };
|
||||
FFF72D491E89401B0012A0C0 /* MenuScreenViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF72D461E89401B0012A0C0 /* MenuScreenViewController.swift */; };
|
||||
FFF72D4A1E89401B0012A0C0 /* MenuContainerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF72D471E89401B0012A0C0 /* MenuContainerViewController.swift */; };
|
||||
FFF72D4D1E8946000012A0C0 /* UIColor+ApplicationColor.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF72D4C1E8946000012A0C0 /* UIColor+ApplicationColor.swift */; };
|
||||
FFF72D501E89467F0012A0C0 /* UIFont+ApplicationFonts.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF72D4F1E89467F0012A0C0 /* UIFont+ApplicationFonts.swift */; };
|
||||
FFF72D521E8946BF0012A0C0 /* DemoItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF72D511E8946BF0012A0C0 /* DemoItem.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
FFBF6CCB1E681DF6008B7F73 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FFBF6CAE1E681DF6008B7F73 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FFBF6CB51E681DF6008B7F73;
|
||||
remoteInfo = HorizontalMenuDemo;
|
||||
};
|
||||
FFBF6CE11E681EE2008B7F73 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FFBF6CDC1E681EE2008B7F73 /* TPGHorizontalMenu.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = FFBF6C931E681D7D008B7F73;
|
||||
remoteInfo = TPGHorizontalMenu;
|
||||
};
|
||||
FFBF6CE31E681EE2008B7F73 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FFBF6CDC1E681EE2008B7F73 /* TPGHorizontalMenu.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = FFBF6C9C1E681D7D008B7F73;
|
||||
remoteInfo = TPGHorizontalMenuTests;
|
||||
};
|
||||
FFBF6CE71E681EF5008B7F73 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = FFBF6CDC1E681EE2008B7F73 /* TPGHorizontalMenu.xcodeproj */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = FFBF6C921E681D7D008B7F73;
|
||||
remoteInfo = TPGHorizontalMenu;
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
FFBF6CE91E681EF5008B7F73 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
FFBF6CE61E681EF5008B7F73 /* TPGHorizontalMenu.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
FFBF6CB61E681DF6008B7F73 /* HorizontalMenuDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HorizontalMenuDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FFBF6CB91E681DF6008B7F73 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
FFBF6CBE1E681DF6008B7F73 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
FFBF6CC01E681DF6008B7F73 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
FFBF6CC31E681DF6008B7F73 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
FFBF6CC51E681DF6008B7F73 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
FFBF6CCA1E681DF6008B7F73 /* HorizontalMenuDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HorizontalMenuDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
FFBF6CCE1E681DF6008B7F73 /* HorizontalMenuDemoUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HorizontalMenuDemoUITests.swift; sourceTree = "<group>"; };
|
||||
FFBF6CD01E681DF6008B7F73 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
FFBF6CDC1E681EE2008B7F73 /* TPGHorizontalMenu.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TPGHorizontalMenu.xcodeproj; path = ../TPGHorizontalMenu/TPGHorizontalMenu.xcodeproj; sourceTree = "<group>"; };
|
||||
FFF72D431E89401B0012A0C0 /* UIStoryboard+Initialization.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIStoryboard+Initialization.swift"; sourceTree = "<group>"; };
|
||||
FFF72D461E89401B0012A0C0 /* MenuScreenViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuScreenViewController.swift; sourceTree = "<group>"; };
|
||||
FFF72D471E89401B0012A0C0 /* MenuContainerViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MenuContainerViewController.swift; sourceTree = "<group>"; };
|
||||
FFF72D4C1E8946000012A0C0 /* UIColor+ApplicationColor.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+ApplicationColor.swift"; sourceTree = "<group>"; };
|
||||
FFF72D4F1E89467F0012A0C0 /* UIFont+ApplicationFonts.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIFont+ApplicationFonts.swift"; sourceTree = "<group>"; };
|
||||
FFF72D511E8946BF0012A0C0 /* DemoItem.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DemoItem.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
FFBF6CB31E681DF6008B7F73 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FFBF6CE51E681EF5008B7F73 /* TPGHorizontalMenu.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FFBF6CC71E681DF6008B7F73 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
FFBF6CAD1E681DF6008B7F73 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FFBF6CDC1E681EE2008B7F73 /* TPGHorizontalMenu.xcodeproj */,
|
||||
FFBF6CB81E681DF6008B7F73 /* HorizontalMenuDemo */,
|
||||
FFBF6CCD1E681DF6008B7F73 /* HorizontalMenuDemoUITests */,
|
||||
FFBF6CB71E681DF6008B7F73 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FFBF6CB71E681DF6008B7F73 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FFBF6CB61E681DF6008B7F73 /* HorizontalMenuDemo.app */,
|
||||
FFBF6CCA1E681DF6008B7F73 /* HorizontalMenuDemoUITests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FFBF6CB81E681DF6008B7F73 /* HorizontalMenuDemo */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FFF72D421E89401B0012A0C0 /* Extensions */,
|
||||
FFF72D441E89401B0012A0C0 /* Model */,
|
||||
FFF72D451E89401B0012A0C0 /* View Controllers */,
|
||||
FFBF6CB91E681DF6008B7F73 /* AppDelegate.swift */,
|
||||
FFBF6CBD1E681DF6008B7F73 /* Main.storyboard */,
|
||||
FFBF6CC01E681DF6008B7F73 /* Assets.xcassets */,
|
||||
FFBF6CC21E681DF6008B7F73 /* LaunchScreen.storyboard */,
|
||||
FFBF6CC51E681DF6008B7F73 /* Info.plist */,
|
||||
);
|
||||
path = HorizontalMenuDemo;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FFBF6CCD1E681DF6008B7F73 /* HorizontalMenuDemoUITests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FFBF6CCE1E681DF6008B7F73 /* HorizontalMenuDemoUITests.swift */,
|
||||
FFBF6CD01E681DF6008B7F73 /* Info.plist */,
|
||||
);
|
||||
path = HorizontalMenuDemoUITests;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FFBF6CDD1E681EE2008B7F73 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FFBF6CE21E681EE2008B7F73 /* TPGHorizontalMenu.framework */,
|
||||
FFBF6CE41E681EE2008B7F73 /* TPGHorizontalMenuTests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FFF72D421E89401B0012A0C0 /* Extensions */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FFF72D431E89401B0012A0C0 /* UIStoryboard+Initialization.swift */,
|
||||
FFF72D4C1E8946000012A0C0 /* UIColor+ApplicationColor.swift */,
|
||||
FFF72D4F1E89467F0012A0C0 /* UIFont+ApplicationFonts.swift */,
|
||||
);
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FFF72D441E89401B0012A0C0 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FFF72D511E8946BF0012A0C0 /* DemoItem.swift */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FFF72D451E89401B0012A0C0 /* View Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
FFF72D461E89401B0012A0C0 /* MenuScreenViewController.swift */,
|
||||
FFF72D471E89401B0012A0C0 /* MenuContainerViewController.swift */,
|
||||
);
|
||||
path = "View Controllers";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
FFBF6CB51E681DF6008B7F73 /* HorizontalMenuDemo */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = FFBF6CD31E681DF6008B7F73 /* Build configuration list for PBXNativeTarget "HorizontalMenuDemo" */;
|
||||
buildPhases = (
|
||||
FFBF6CB21E681DF6008B7F73 /* Sources */,
|
||||
FFBF6CB31E681DF6008B7F73 /* Frameworks */,
|
||||
FFBF6CB41E681DF6008B7F73 /* Resources */,
|
||||
FFBF6CE91E681EF5008B7F73 /* Embed Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
FFBF6CE81E681EF5008B7F73 /* PBXTargetDependency */,
|
||||
);
|
||||
name = HorizontalMenuDemo;
|
||||
productName = HorizontalMenuDemo;
|
||||
productReference = FFBF6CB61E681DF6008B7F73 /* HorizontalMenuDemo.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
FFBF6CC91E681DF6008B7F73 /* HorizontalMenuDemoUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = FFBF6CD61E681DF6008B7F73 /* Build configuration list for PBXNativeTarget "HorizontalMenuDemoUITests" */;
|
||||
buildPhases = (
|
||||
FFBF6CC61E681DF6008B7F73 /* Sources */,
|
||||
FFBF6CC71E681DF6008B7F73 /* Frameworks */,
|
||||
FFBF6CC81E681DF6008B7F73 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
FFBF6CCC1E681DF6008B7F73 /* PBXTargetDependency */,
|
||||
);
|
||||
name = HorizontalMenuDemoUITests;
|
||||
productName = HorizontalMenuDemoUITests;
|
||||
productReference = FFBF6CCA1E681DF6008B7F73 /* HorizontalMenuDemoUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.ui-testing";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
FFBF6CAE1E681DF6008B7F73 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0820;
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = "3Pillar Global";
|
||||
TargetAttributes = {
|
||||
FFBF6CB51E681DF6008B7F73 = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
ProvisioningStyle = Manual;
|
||||
};
|
||||
FFBF6CC91E681DF6008B7F73 = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = FFBF6CB51E681DF6008B7F73;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = FFBF6CB11E681DF6008B7F73 /* Build configuration list for PBXProject "HorizontalMenuDemo" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = FFBF6CAD1E681DF6008B7F73;
|
||||
productRefGroup = FFBF6CB71E681DF6008B7F73 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectReferences = (
|
||||
{
|
||||
ProductGroup = FFBF6CDD1E681EE2008B7F73 /* Products */;
|
||||
ProjectRef = FFBF6CDC1E681EE2008B7F73 /* TPGHorizontalMenu.xcodeproj */;
|
||||
},
|
||||
);
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
FFBF6CB51E681DF6008B7F73 /* HorizontalMenuDemo */,
|
||||
FFBF6CC91E681DF6008B7F73 /* HorizontalMenuDemoUITests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXReferenceProxy section */
|
||||
FFBF6CE21E681EE2008B7F73 /* TPGHorizontalMenu.framework */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.framework;
|
||||
path = TPGHorizontalMenu.framework;
|
||||
remoteRef = FFBF6CE11E681EE2008B7F73 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
FFBF6CE41E681EE2008B7F73 /* TPGHorizontalMenuTests.xctest */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = wrapper.cfbundle;
|
||||
path = TPGHorizontalMenuTests.xctest;
|
||||
remoteRef = FFBF6CE31E681EE2008B7F73 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
/* End PBXReferenceProxy section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
FFBF6CB41E681DF6008B7F73 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FFBF6CC41E681DF6008B7F73 /* LaunchScreen.storyboard in Resources */,
|
||||
FFBF6CC11E681DF6008B7F73 /* Assets.xcassets in Resources */,
|
||||
FFBF6CBF1E681DF6008B7F73 /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FFBF6CC81E681DF6008B7F73 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
FFBF6CB21E681DF6008B7F73 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FFF72D4D1E8946000012A0C0 /* UIColor+ApplicationColor.swift in Sources */,
|
||||
FFF72D481E89401B0012A0C0 /* UIStoryboard+Initialization.swift in Sources */,
|
||||
FFBF6CBA1E681DF6008B7F73 /* AppDelegate.swift in Sources */,
|
||||
FFF72D4A1E89401B0012A0C0 /* MenuContainerViewController.swift in Sources */,
|
||||
FFF72D521E8946BF0012A0C0 /* DemoItem.swift in Sources */,
|
||||
FFF72D501E89467F0012A0C0 /* UIFont+ApplicationFonts.swift in Sources */,
|
||||
FFF72D491E89401B0012A0C0 /* MenuScreenViewController.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
FFBF6CC61E681DF6008B7F73 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
FFBF6CCF1E681DF6008B7F73 /* HorizontalMenuDemoUITests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
FFBF6CCC1E681DF6008B7F73 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = FFBF6CB51E681DF6008B7F73 /* HorizontalMenuDemo */;
|
||||
targetProxy = FFBF6CCB1E681DF6008B7F73 /* PBXContainerItemProxy */;
|
||||
};
|
||||
FFBF6CE81E681EF5008B7F73 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
name = TPGHorizontalMenu;
|
||||
targetProxy = FFBF6CE71E681EF5008B7F73 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
FFBF6CBD1E681DF6008B7F73 /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
FFBF6CBE1E681DF6008B7F73 /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
FFBF6CC21E681DF6008B7F73 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
FFBF6CC31E681DF6008B7F73 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
FFBF6CD11E681DF6008B7F73 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
FFBF6CD21E681DF6008B7F73 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
FFBF6CD41E681DF6008B7F73 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/HorizontalMenuDemo",
|
||||
);
|
||||
INFOPLIST_FILE = HorizontalMenuDemo/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "-PG.HorizontalMenuDemo";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
FFBF6CD51E681DF6008B7F73 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/HorizontalMenuDemo",
|
||||
);
|
||||
INFOPLIST_FILE = HorizontalMenuDemo/Info.plist;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "-PG.HorizontalMenuDemo";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
FFBF6CD71E681DF6008B7F73 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
INFOPLIST_FILE = HorizontalMenuDemoUITests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "-PG.HorizontalMenuDemoUITests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_TARGET_NAME = HorizontalMenuDemo;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
FFBF6CD81E681DF6008B7F73 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
INFOPLIST_FILE = HorizontalMenuDemoUITests/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "-PG.HorizontalMenuDemoUITests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 3.0;
|
||||
TEST_TARGET_NAME = HorizontalMenuDemo;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
FFBF6CB11E681DF6008B7F73 /* Build configuration list for PBXProject "HorizontalMenuDemo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FFBF6CD11E681DF6008B7F73 /* Debug */,
|
||||
FFBF6CD21E681DF6008B7F73 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
FFBF6CD31E681DF6008B7F73 /* Build configuration list for PBXNativeTarget "HorizontalMenuDemo" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FFBF6CD41E681DF6008B7F73 /* Debug */,
|
||||
FFBF6CD51E681DF6008B7F73 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
FFBF6CD61E681DF6008B7F73 /* Build configuration list for PBXNativeTarget "HorizontalMenuDemoUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
FFBF6CD71E681DF6008B7F73 /* Debug */,
|
||||
FFBF6CD81E681DF6008B7F73 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = FFBF6CAE1E681DF6008B7F73 /* Project object */;
|
||||
}
|
7
HorizontalMenuDemo/HorizontalMenuDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
HorizontalMenuDemo/HorizontalMenuDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:HorizontalMenuDemo.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -0,0 +1,44 @@
|
|||
//
|
||||
// AppDelegate.swift
|
||||
// HorizontalMenuDemo
|
||||
//
|
||||
// Created by David Livadaru on 02/03/2017.
|
||||
// Copyright © 2017 3Pillar Global. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func applicationWillResignActive(_ application: UIApplication) {
|
||||
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
|
||||
// Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
|
||||
}
|
||||
|
||||
func applicationDidEnterBackground(_ application: UIApplication) {
|
||||
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
|
||||
}
|
||||
|
||||
func applicationWillEnterForeground(_ application: UIApplication) {
|
||||
// Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
|
||||
}
|
||||
|
||||
func applicationDidBecomeActive(_ application: UIApplication) {
|
||||
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
|
||||
}
|
||||
|
||||
func applicationWillTerminate(_ application: UIApplication) {
|
||||
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "20x20",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "29x29",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "40x40",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "iphone",
|
||||
"size" : "60x60",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "20x20",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "29x29",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "40x40",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "76x76",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "ipad",
|
||||
"size" : "83.5x83.5",
|
||||
"scale" : "2x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
21
HorizontalMenuDemo/HorizontalMenuDemo/Assets.xcassets/swift.imageset/Contents.json
vendored
Normal file
21
HorizontalMenuDemo/HorizontalMenuDemo/Assets.xcassets/swift.imageset/Contents.json
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "swift.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
BIN
HorizontalMenuDemo/HorizontalMenuDemo/Assets.xcassets/swift.imageset/swift.png
vendored
Normal file
BIN
HorizontalMenuDemo/HorizontalMenuDemo/Assets.xcassets/swift.imageset/swift.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 26 KiB |
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VPX-Yu-l7b">
|
||||
<rect key="frame" x="24" y="301" width="326" height="65"/>
|
||||
<string key="text">Horizontal Menu
|
||||
Demo project</string>
|
||||
<fontDescription key="fontDescription" name="AmericanTypewriter" family="American Typewriter" pointSize="28"/>
|
||||
<color key="textColor" red="0.7843137255" green="0.7843137255" blue="0.7843137255" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.090196078431372548" green="0.090196078431372548" blue="0.090196078431372548" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="VPX-Yu-l7b" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="Oss-UY-E5w"/>
|
||||
<constraint firstItem="VPX-Yu-l7b" firstAttribute="leading" secondItem="Ze5-6b-2t3" secondAttribute="leading" constant="24" id="YFa-DE-4Hh"/>
|
||||
<constraint firstItem="VPX-Yu-l7b" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="h04-QX-PRo"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="220" y="229"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -0,0 +1,85 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11762" systemVersion="16D32" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="VVy-lN-G0E">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11757"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Menu Container View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="MenuContainerViewController" id="BYZ-38-t0r" customClass="MenuContainerViewController" customModule="HorizontalMenuDemo" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="64" width="375" height="603"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
</view>
|
||||
<navigationItem key="navigationItem" id="npd-4x-eRm"/>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="145" y="90"/>
|
||||
</scene>
|
||||
<!--Menu Screen View Controller-->
|
||||
<scene sceneID="oia-rO-e7m">
|
||||
<objects>
|
||||
<viewController storyboardIdentifier="MenuScreenViewController" id="hmE-RT-R0Z" customClass="MenuScreenViewController" customModule="HorizontalMenuDemo" customModuleProvider="target" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="gd7-4y-6TO"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="A24-9X-z5m"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="9IF-LK-hgw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nDP-rF-fHV">
|
||||
<rect key="frame" x="166.5" y="323" width="42" height="21"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<constraints>
|
||||
<constraint firstItem="nDP-rF-fHV" firstAttribute="centerX" secondItem="9IF-LK-hgw" secondAttribute="centerX" id="WqQ-SB-qkO"/>
|
||||
<constraint firstItem="nDP-rF-fHV" firstAttribute="centerY" secondItem="9IF-LK-hgw" secondAttribute="centerY" id="kFb-AC-dqy"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="textLabel" destination="nDP-rF-fHV" id="nAp-6E-hA2"/>
|
||||
</connections>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="lG4-yV-KGM" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="950" y="90"/>
|
||||
</scene>
|
||||
<!--Navigation Controller-->
|
||||
<scene sceneID="ejN-Pk-0xB">
|
||||
<objects>
|
||||
<navigationController id="VVy-lN-G0E" sceneMemberID="viewController">
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" barStyle="black" translucent="NO" prompted="NO"/>
|
||||
<navigationBar key="navigationBar" contentMode="scaleToFill" barStyle="black" translucent="NO" id="orz-TN-h1b">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</navigationBar>
|
||||
<toolbar key="toolbar" opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="leF-kB-hoL">
|
||||
<rect key="frame" x="0.0" y="623" width="375" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
</toolbar>
|
||||
<connections>
|
||||
<segue destination="BYZ-38-t0r" kind="relationship" relationship="rootViewController" id="IW0-5Q-VfP"/>
|
||||
</connections>
|
||||
</navigationController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="gek-xD-HQG" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="-694" y="90"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -0,0 +1,31 @@
|
|||
//
|
||||
// UIColor+ApplicationColor.swift
|
||||
// HorizontalMenuDemo
|
||||
//
|
||||
// Created by David Livadaru on 27/03/2017.
|
||||
// Copyright © 2017 3Pillar Global. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
extension UIColor {
|
||||
static func menuBackgroundColor() -> UIColor {
|
||||
return UIColor(red: 23.0 / 255.0, green: 23.0 / 255.0, blue: 23.0 / 255.0, alpha: 1.0)
|
||||
}
|
||||
|
||||
static func menuItemBackgroundColor() -> UIColor {
|
||||
return UIColor(red: 39.0 / 255.0, green: 39.0 / 255.0, blue: 39.0 / 255.0, alpha: 1.0)
|
||||
}
|
||||
|
||||
static func menuItemTextColor() -> UIColor {
|
||||
return UIColor(red: 200.0 / 255.0, green: 200.0 / 255.0, blue: 200.0 / 255.0, alpha: 1.0)
|
||||
}
|
||||
|
||||
static func menuItemBorderColor() -> UIColor {
|
||||
return UIColor(red: 80.0 / 255.0, green: 80.0 / 255.0, blue: 80.0 / 255.0, alpha: 1.0)
|
||||
}
|
||||
|
||||
static func menuIndicatorColor() -> UIColor {
|
||||
return UIColor.magenta
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
// UIFont+ApplicationFonts.swift
|
||||
// HorizontalMenuDemo
|
||||
//
|
||||
// Created by David Livadaru on 27/03/2017.
|
||||
// Copyright © 2017 3Pillar Global. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
extension UIFont {
|
||||
static func titleItemFont() -> UIFont? {
|
||||
return UIFont(name: "American Typewriter", size: 22.0)
|
||||
}
|
||||
|
||||
static func menuItemFont() -> UIFont? {
|
||||
return UIFont(name: "AmericanTypewriter", size: 18.0)
|
||||
}
|
||||
|
||||
static func menuItemFontHighlighted() -> UIFont? {
|
||||
return UIFont(name: "AmericanTypewriter-Light", size: 18.0)
|
||||
}
|
||||
|
||||
static func menuItemFontSelected() -> UIFont? {
|
||||
return UIFont(name: "AmericanTypewriter-Bold", size: 18.0)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
//
|
||||
// UIStoryboard+Initialization.swift
|
||||
// HorizontalMenuDemo
|
||||
//
|
||||
// Created by David Livadaru on 14/03/2017.
|
||||
// Copyright © 2017 3Pillar Global. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
extension UIStoryboard {
|
||||
static func loadMainStoryboardVC<T: UIViewController>() -> T {
|
||||
let storyboard = UIStoryboard(name: "Main", bundle: nil)
|
||||
return storyboard.instantiateViewController(withIdentifier: String(describing: T.self)) as! T
|
||||
}
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<?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>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
<key>Fabric</key>
|
||||
<dict>
|
||||
<key>APIKey</key>
|
||||
<string>b4ac1b762a095cfee63f1a4082a20084248675bf</string>
|
||||
<key>Kits</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>KitInfo</key>
|
||||
<dict/>
|
||||
<key>KitName</key>
|
||||
<string>Crashlytics</string>
|
||||
</dict>
|
||||
</array>
|
||||
</dict>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,15 @@
|
|||
//
|
||||
// DemoItem.swift
|
||||
// HorizontalMenuDemo
|
||||
//
|
||||
// Created by David Livadaru on 27/03/2017.
|
||||
// Copyright © 2017 3Pillar Global. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import TPGHorizontalMenu
|
||||
|
||||
struct DemoItem {
|
||||
let text: String
|
||||
let color: FinalColor
|
||||
}
|
|
@ -0,0 +1,132 @@
|
|||
//
|
||||
// MenuContainerViewController.swift
|
||||
// HorizontalMenuDemo
|
||||
//
|
||||
// Created by David Livadaru on 02/03/2017.
|
||||
// Copyright © 2017 3Pillar Global. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TPGHorizontalMenu
|
||||
|
||||
class MenuContainerViewController: UIViewController, LayoutControllerDelegate {
|
||||
private var menuViewController: HorizontalMenuViewController!
|
||||
|
||||
fileprivate let items: [DemoItem] = [DemoItem(text: " Privacy ", color: FinalColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0)),
|
||||
DemoItem(text: " Background refresh ", color: FinalColor(red: 0.0, green: 1.0, blue: 0.0, alpha: 1.0)),
|
||||
DemoItem(text: " Mail ", color: FinalColor(red: 0.0, green: 0.0, blue: 1.0, alpha: 1.0)),
|
||||
DemoItem(text: " Display brightness ", color: FinalColor(red: 1.0, green: 1.0, blue: 0.0, alpha: 1.0)),
|
||||
DemoItem(text: " Localization ", color: FinalColor(red: 0.0, green: 1.0, blue: 1.0, alpha: 1.0)),
|
||||
DemoItem(text: " Settings ", color: FinalColor(red: 1.0, green: 0.0, blue: 1.0, alpha: 1.0)),
|
||||
DemoItem(text: " Apple and iTunes Store ", color: FinalColor(red: 0.723, green: 0.45, blue: 0.15, alpha: 1.0))]
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
// Do any additional setup after loading the view, typically from a nib.
|
||||
|
||||
title = "Horizontal menu demo"
|
||||
|
||||
let shadowImage = UIImage()
|
||||
navigationController?.navigationBar.shadowImage = shadowImage
|
||||
navigationController?.navigationBar.setBackgroundImage(shadowImage, for: .default)
|
||||
navigationController?.navigationBar.barTintColor = UIColor.menuItemBackgroundColor()
|
||||
|
||||
if let titleFont = UIFont.titleItemFont() {
|
||||
navigationController?.navigationBar.titleTextAttributes = [NSFontAttributeName : titleFont,
|
||||
NSForegroundColorAttributeName : UIColor.menuItemTextColor()]
|
||||
}
|
||||
|
||||
menuViewController = HorizontalMenuViewController()
|
||||
menuViewController.dataSource = self
|
||||
menuViewController.willMove(toParentViewController: self)
|
||||
menuViewController.view.frame = view.bounds
|
||||
menuViewController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]
|
||||
menuViewController.view.backgroundColor = UIColor.menuBackgroundColor()
|
||||
view.addSubview(menuViewController.view)
|
||||
addChildViewController(menuViewController)
|
||||
|
||||
menuViewController.layoutDelegate = self
|
||||
}
|
||||
|
||||
// MARK: LayoutControllerDelegate
|
||||
|
||||
func layoutControllerMenuGeometry(layoutController: LayoutController) -> MenuGeometry {
|
||||
let scrollIndicatorGeometry = ScrollIndicatorGeometry(height: 2, verticalAlignment: .bottom)
|
||||
return MenuGeometry(itemsInset: UIEdgeInsets(top: 4.0, left: 4.0, bottom: 4.0, right: 4.0),
|
||||
itemSpacing: 4, prefferedHeight: 0,
|
||||
scrollIndicatorGeometry: scrollIndicatorGeometry)
|
||||
}
|
||||
|
||||
func layoutController(layoutController: LayoutController, geometryForItemAt index: Int) -> ItemGeometry {
|
||||
let view = menuViewController.items[index].view
|
||||
let button = view as? UIButton
|
||||
button?.isSelected = true
|
||||
let geometry = ViewGeometry(view: view)
|
||||
button?.isSelected = false
|
||||
return geometry
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - HorizontalMenuViewControllerDataSource
|
||||
extension MenuContainerViewController: HorizontalMenuViewControllerDataSource {
|
||||
func horizontalMenuViewControllerNumberOfElements(horizontalMenuViewController: HorizontalMenuViewController) -> Int {
|
||||
return items.count
|
||||
}
|
||||
|
||||
func horizontalMenuViewController(horizontalMenuViewController: HorizontalMenuViewController,
|
||||
menuItemFor index: Int) -> MenuItem {
|
||||
let menuView = UIButton()
|
||||
menuView.backgroundColor = UIColor.menuItemBackgroundColor()
|
||||
menuView.layer.cornerRadius = 1
|
||||
menuView.clipsToBounds = true
|
||||
menuView.layer.borderColor = UIColor.menuItemBorderColor().cgColor
|
||||
menuView.layer.borderWidth = 1
|
||||
let item = items[index]
|
||||
let text = item.text
|
||||
|
||||
if let font = UIFont.menuItemFont() {
|
||||
let attributes = [NSFontAttributeName : font,
|
||||
NSForegroundColorAttributeName : UIColor.menuItemTextColor()]
|
||||
let attributedText = NSAttributedString(string: text, attributes: attributes)
|
||||
menuView.setAttributedTitle(attributedText, for: .normal)
|
||||
}
|
||||
|
||||
if let font = UIFont.menuItemFontHighlighted() {
|
||||
let attributes = [NSFontAttributeName : font,
|
||||
NSForegroundColorAttributeName : UIColor.menuItemTextColor().withAlphaComponent(0.5)]
|
||||
let attributedText = NSAttributedString(string: text, attributes: attributes)
|
||||
menuView.setAttributedTitle(attributedText, for: .highlighted)
|
||||
}
|
||||
|
||||
if let font = UIFont.menuItemFontSelected() {
|
||||
let attributes = [NSFontAttributeName : font,
|
||||
NSForegroundColorAttributeName : UIColor.menuItemTextColor()]
|
||||
let attributedText = NSAttributedString(string: text, attributes: attributes)
|
||||
menuView.setAttributedTitle(attributedText, for: .selected)
|
||||
}
|
||||
|
||||
let menuItem = MenuItem(view: menuView, indicatorColor: item.color)
|
||||
return menuItem
|
||||
}
|
||||
|
||||
func horizontalMenuViewController(horizontalMenuViewController: HorizontalMenuViewController,
|
||||
viewControllerFor index: Int) -> UIViewController {
|
||||
let screen: MenuScreenViewController = UIStoryboard.loadMainStoryboardVC()
|
||||
|
||||
let white = CGFloat(index + 1) / CGFloat(horizontalMenuViewController.numberOfElements)
|
||||
screen.view.backgroundColor = UIColor(white: white, alpha: 1.0)
|
||||
let item = items[index]
|
||||
let text = item.text
|
||||
|
||||
screen.textLabel.text = "Screen for\(text)"
|
||||
screen.textLabel.textColor = item.color
|
||||
|
||||
return screen
|
||||
}
|
||||
|
||||
func horizontalMenuViewControllerScrollIndicatorView(horizontalMenuViewController: HorizontalMenuViewController) -> UIView {
|
||||
let view = UIView()
|
||||
view.backgroundColor = UIColor(red: 1.0, green: 0.0, blue: 0.0, alpha: 1.0)
|
||||
return view
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
//
|
||||
// MenuScreenViewController.swift
|
||||
// HorizontalMenuDemo
|
||||
//
|
||||
// Created by David Livadaru on 14/03/2017.
|
||||
// Copyright © 2017 3Pillar Global. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import TPGHorizontalMenu
|
||||
|
||||
class MenuScreenViewController: UIViewController, HorizontalMenuChild {
|
||||
@IBOutlet weak var textLabel: UILabel!
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
print("\(#function) - text: '\(textLabel.text ?? "unknown")'")
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
print("\(#function) - text: '\(textLabel.text ?? "unknown")'")
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
|
||||
print("\(#function) - text: '\(textLabel.text ?? "unknown")'")
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidDisappear(animated)
|
||||
|
||||
print("\(#function) - text: '\(textLabel.text ?? "unknown")'")
|
||||
}
|
||||
|
||||
// MARK: HorizontalMenuChild
|
||||
|
||||
func appearanceProgress(progress: CGFloat) {
|
||||
print("\(#function) (\(progress))- text: '\(textLabel.text ?? "unknown")'")
|
||||
}
|
||||
|
||||
func disappearanceProgress(progress: CGFloat) {
|
||||
print("\(#function) (\(progress))- text: '\(textLabel.text ?? "unknown")'")
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
//
|
||||
// HorizontalMenuDemoUITests.swift
|
||||
// HorizontalMenuDemoUITests
|
||||
//
|
||||
// Created by David Livadaru on 02/03/2017.
|
||||
// Copyright © 2017 3Pillar Global. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
class HorizontalMenuDemoUITests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
|
||||
// In UI tests it is usually best to stop immediately when a failure occurs.
|
||||
continueAfterFailure = false
|
||||
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
|
||||
XCUIApplication().launch()
|
||||
|
||||
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
|
||||
}
|
||||
|
||||
override func tearDown() {
|
||||
// Put teardown code here. This method is called after the invocation of each test method in the class.
|
||||
super.tearDown()
|
||||
}
|
||||
|
||||
func testExample() {
|
||||
// Use recording to get started writing UI tests.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
<?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>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,3 @@
|
|||
import PackageDescription
|
||||
|
||||
let package = Package(name: "TPGHorizontalMenu")
|
114
README.md
114
README.md
|
@ -6,7 +6,7 @@
|
|||
|
||||
[](https://github.com/Carthage/Carthage)
|
||||
[](https://github.com/CocoaPods/CocoaPods)
|
||||
[](https://swift.org)
|
||||
[](https://swift.org)
|
||||
|
||||
|
||||
|
||||
|
@ -30,80 +30,17 @@ It's a UI component similar to UIPageViewController that helps you to create a m
|
|||
|
||||
## Table of contents
|
||||
|
||||
- [Installation](https://github.com/3pillarlabs/ios-horizontalmenu#installation)
|
||||
- [CocoaPods](https://github.com/3pillarlabs/ios-horizontalmenu#3-cocoapods)
|
||||
- [Carthage](https://github.com/3pillarlabs/ios-horizontalmenu#2-carthage)
|
||||
- [Usage](https://github.com/3pillarlabs/ios-horizontalmenu#usage)
|
||||
- [Installation](https://github.com/3pillarlabs/ios-horizontalmenu#installation)
|
||||
- [Git Submodule](https://github.com/3pillarlabs/ios-horizontalmenu#1-git-submodule)
|
||||
- [Carthage](https://github.com/3pillarlabs/ios-horizontalmenu#2-carthage)
|
||||
- [CocoaPods](https://github.com/3pillarlabs/ios-horizontalmenu#3-cocoapods)
|
||||
- [Tips](https://github.com/3pillarlabs/ios-horizontalmenu#tips)
|
||||
- [Contribution](https://github.com/3pillarlabs/ios-horizontalmenu#contribution)
|
||||
- [License](https://github.com/3pillarlabs/ios-horizontalmenu#license)
|
||||
|
||||
## Installation
|
||||
|
||||
Available in iOS 10.0 and later.
|
||||
|
||||
CocoaPods Installation
|
||||
|
||||
- Run Terminal
|
||||
|
||||
- Navigate to project folder
|
||||
|
||||
- Use command:
|
||||
|
||||
```
|
||||
pod init
|
||||
```
|
||||
|
||||
- Add code to podfile
|
||||
|
||||
```
|
||||
platform :ios, '10.0'
|
||||
|
||||
target 'YourProjectName' do
|
||||
use_frameworks!
|
||||
pod 'TPGHorizontalMenu'
|
||||
end
|
||||
```
|
||||
|
||||
- Run command:
|
||||
|
||||
```
|
||||
pod install
|
||||
```
|
||||
|
||||
Remember to open project using workspace
|
||||
|
||||
Carthage Installation
|
||||
|
||||
- Run Terminal
|
||||
|
||||
- Navigate to project folder
|
||||
|
||||
- Use command in terminal:
|
||||
```
|
||||
touch cartfile
|
||||
```
|
||||
|
||||
- Add code to Cartfile:
|
||||
|
||||
```
|
||||
github "3pillarlabs/ios-horizontalmenu"
|
||||
|
||||
```
|
||||
|
||||
- Run carthage by using command:
|
||||
|
||||
```
|
||||
carthage update
|
||||
```
|
||||
- In order to link your app with the framework, you have to add the TPGHorizontalMenu in 'Embedded Binaries' list from 'General' section on application's target from Carthage/Build/iOS in project folder.
|
||||
|
||||

|
||||
|
||||
## Usage
|
||||
|
||||
A sample project is available on [demo brach](https://github.com/3pillarlabs/ios-horizontalmenu/tree/DemoProject).
|
||||
|
||||
How to use the framework:
|
||||
|
||||
- Import the framework
|
||||
|
@ -172,6 +109,43 @@ func horizontalMenuViewController(horizontalMenuViewController: HorizontalMenuVi
|
|||
|
||||
and now you have the menu visible in your application.
|
||||
|
||||
## Installation
|
||||
|
||||
Available in iOS 9.0 and later.
|
||||
|
||||
Choose your preffered dependency manager:
|
||||
|
||||
### 1. [Git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules)
|
||||
|
||||
```
|
||||
git submodule add https://github.com/3pillarlabs/ios-horizontalmenu.git
|
||||
```
|
||||
|
||||
After fetch, choose the commit which is tagged with the version you want to point to. Then you have to [add](https://github.com/3pillarlabs/ios-horizontalmenu#subproject-dependency) and [link](https://github.com/3pillarlabs/ios-horizontalmenu#linkage) the framework.
|
||||
|
||||
### 2. [Carthage](https://github.com/Carthage/Carthage)
|
||||
|
||||
```
|
||||
github "3pillarlabs/ios-horizontalmenu" ~> 1.0
|
||||
```
|
||||
|
||||
### 3. [CocoaPods](https://github.com/CocoaPods/CocoaPods)
|
||||
|
||||
```
|
||||
Comming soon.
|
||||
```
|
||||
|
||||
### Subproject dependency
|
||||
|
||||
If you're using submodules or Swift Package Manager, we encourage you the add the framework as a subproject in your workspace/project
|
||||
|
||||

|
||||
|
||||
### Linkage
|
||||
|
||||
In order to link your app with the framework, you have to add the TPGHorizontalMenu in 'Embedded Binaries' list from 'General' section on application's target.
|
||||
|
||||

|
||||
|
||||
## Tips
|
||||
|
||||
|
@ -400,8 +374,6 @@ If really you need callbacks, you may use CADisplayLink to provide callbacks for
|
|||
|
||||
An important thing to know is that default animations have a duration of 0.3 seconds.
|
||||
|
||||
Also if you feel the need for a small demo please check the demo project branch, add the framework and you are good to go.
|
||||
|
||||
## Contribution
|
||||
|
||||
Did you find a bug in the framework? Create an [issue](https://github.com/3pillarlabs/ios-horizontalmenu/issues).
|
||||
|
@ -416,4 +388,4 @@ Want to help us implement new features or fix bugs? Create a [pull request](http
|
|||
|
||||
[](http://www.3pillarglobal.com/)
|
||||
|
||||
**Horizontal Menu** is developed and maintained by [3Pillar Global](http://www.3pillarglobal.com/).
|
||||
**Horizontal Menu** is developed and maintained by [3Pillar Global](http://www.3pillarglobal.com/).
|
|
@ -14,7 +14,7 @@ import UIKit
|
|||
/// [UIView - animateWithDuration:delay:usingSpringWithDamping:initialSpringVelocity:options:animations:completion:]
|
||||
/// (apple-reference-documentation://hcEaMPVO1d)
|
||||
public class Animation: NSObject {
|
||||
public typealias AnimationClosure = () -> Void
|
||||
public typealias AnimationClosure = (Void) -> Void
|
||||
public typealias CompletionClosure = ((_ finished: Bool) -> Void)
|
||||
|
||||
/// Animation's duration in seconds.
|
||||
|
@ -60,7 +60,7 @@ public class Animation: NSObject {
|
|||
self.animation = {
|
||||
currentAnimation?()
|
||||
animation()
|
||||
} as Animation.AnimationClosure
|
||||
}
|
||||
}
|
||||
|
||||
public func addCompletion(_ completion: @escaping CompletionClosure) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// AppearanceController.swift
|
||||
// AppearenceController.swift
|
||||
// TPGHorizontalMenu
|
||||
//
|
||||
// Created by Horatiu Potra on 09/03/2017.
|
||||
|
@ -9,7 +9,7 @@
|
|||
import UIKit
|
||||
|
||||
/// An object which is responsible with appereance control of menu items.
|
||||
class AppearanceController {
|
||||
class AppearenceController {
|
||||
private enum Layout {
|
||||
case scroll(offset: CGPoint)
|
||||
case none
|
||||
|
@ -94,7 +94,7 @@ class AppearanceController {
|
|||
|
||||
if animated {
|
||||
let delegateAnimation = menuViewController.delegate?.horizontalMenuViewControllerAnimationForEdgeAppearance?(horizontalMenuViewController: menuViewController)
|
||||
let animation = delegateAnimation ?? AppearanceController.defaultAppearanceAnimation
|
||||
let animation = delegateAnimation ?? AppearenceController.defaultAppearanceAnimation
|
||||
|
||||
animation.addAnimation(change)
|
||||
animation.animate()
|
||||
|
@ -126,7 +126,7 @@ class AppearanceController {
|
|||
self.previousTransition = nil
|
||||
}
|
||||
|
||||
if !isValid(transition) {
|
||||
if !menuViewController.isValid(index: transition.toIndex) {
|
||||
reset()
|
||||
let layout = appearanceLayout(for: transition.fromIndex, and: 1.0)
|
||||
perform(layout: layout, animated: true)
|
|
@ -22,8 +22,8 @@ extension CGRect {
|
|||
/// - Parameter inset: the inset values.
|
||||
/// - Returns: A rectangle which has the requested changes.
|
||||
public func insetBy(_ inset: UIEdgeInsets) -> CGRect {
|
||||
let xInset = (inset.left + inset.right) / 2
|
||||
let yInset = (inset.top + inset.bottom) / 2
|
||||
let xInset = (inset.left + inset.right ) / 2
|
||||
let yInset = (inset.top + inset.bottom ) / 2
|
||||
|
||||
return insetBy(dx: xInset, dy: yInset)
|
||||
}
|
||||
|
|
|
@ -67,22 +67,6 @@ class ContainerLifeCycleController {
|
|||
func update(currentIndex index: Int) {
|
||||
state = .changing(toIndex: index)
|
||||
}
|
||||
|
||||
func startAppearanceForCurrentIndex() {
|
||||
startAppearance(for: menuDataSource.currentIndex)
|
||||
}
|
||||
|
||||
func endAppearanceForCurrentIndex() {
|
||||
endAppearance(for: menuDataSource.currentIndex)
|
||||
}
|
||||
|
||||
func startDisappearanceForCurrentIndex() {
|
||||
startDisappearance(for: menuDataSource.currentIndex)
|
||||
}
|
||||
|
||||
func endDisappearanceForCurrentIndex() {
|
||||
endDisappearance(for: menuDataSource.currentIndex)
|
||||
}
|
||||
|
||||
// MARK: Private functionality
|
||||
|
||||
|
|
|
@ -67,10 +67,6 @@ import UIKit
|
|||
@objc optional func horizontalMenuViewControllerAnimationForEdgeAppearance(horizontalMenuViewController: HorizontalMenuViewController) -> Animation
|
||||
}
|
||||
|
||||
/// A view controller which manages the display of a horizontal menu.
|
||||
/// This menu adjusts the scroll content insests of its content. Therefore, layout controller's delegate should
|
||||
/// return MenuGeometry items' insets by adding top spacing (including status bar height) and
|
||||
/// the root parent view controller should set automaticallyAdjustsScrollViewInsets to false.
|
||||
public class HorizontalMenuViewController: UIViewController, MenuDataSource, PaginationControllerDelegate {
|
||||
public private (set) var items: [MenuItem] = []
|
||||
public internal (set) var screens: [Int : UIViewController] = [:]
|
||||
|
@ -92,7 +88,7 @@ public class HorizontalMenuViewController: UIViewController, MenuDataSource, Pag
|
|||
|
||||
public var scrollIndicator: UIView?
|
||||
|
||||
/// The data source for menu. If view is reloaded, the menu will reload the content.
|
||||
/// The data source for menu.
|
||||
public weak var dataSource: HorizontalMenuViewControllerDataSource? {
|
||||
didSet {
|
||||
if isViewLoaded {
|
||||
|
@ -128,7 +124,7 @@ public class HorizontalMenuViewController: UIViewController, MenuDataSource, Pag
|
|||
|
||||
private (set) var layoutController: LayoutController!
|
||||
private (set) var paginationController: PaginationController!
|
||||
private (set) var appearanceController: AppearanceController!
|
||||
private (set) var appearenceController: AppearenceController!
|
||||
private (set) var selectionController: SelectionController!
|
||||
private (set) var containerLifeCycleController: ContainerLifeCycleController!
|
||||
private (set) var containerLoaderController: ContainerLoaderController!
|
||||
|
@ -145,40 +141,26 @@ public class HorizontalMenuViewController: UIViewController, MenuDataSource, Pag
|
|||
super.viewDidLoad()
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
view.backgroundColor = UIColor.red
|
||||
|
||||
initializeSubviews()
|
||||
initializeControllers()
|
||||
}
|
||||
|
||||
public override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
containerLifeCycleController.startAppearanceForCurrentIndex()
|
||||
|
||||
reloadData()
|
||||
containerLifeCycleController.update(currentIndex: 0)
|
||||
}
|
||||
|
||||
public override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
selectionController.selectItem(at: paginationController.currentIndex)
|
||||
containerLifeCycleController.endAppearanceForCurrentIndex()
|
||||
}
|
||||
|
||||
public override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
|
||||
containerLifeCycleController.startDisappearanceForCurrentIndex()
|
||||
}
|
||||
|
||||
public override func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidDisappear(animated)
|
||||
|
||||
containerLifeCycleController.endDisappearanceForCurrentIndex()
|
||||
}
|
||||
|
||||
public override func viewDidLayoutSubviews() {
|
||||
super.viewDidLayoutSubviews()
|
||||
|
||||
layoutController.layoutMenuContainerView()
|
||||
if let scrollIndicator = scrollIndicator, selectionOperation == nil {
|
||||
if let scrollIndicator = scrollIndicator {
|
||||
let transition = ScrollTransition(toIndex: paginationController.currentIndex)
|
||||
layoutController.layout(scrollIndicator: scrollIndicator, transition: transition)
|
||||
}
|
||||
|
@ -197,13 +179,11 @@ public class HorizontalMenuViewController: UIViewController, MenuDataSource, Pag
|
|||
paginationController.scroll(to: 0)
|
||||
containerLoaderController.preloadScreensForCurrentIndex()
|
||||
containerLifeCycleController.reload()
|
||||
containerLifeCycleController.update(currentIndex: 0)
|
||||
|
||||
addScrollIndicator()
|
||||
updateAbilityToChangeIndicatorColor()
|
||||
|
||||
selectionController.resetItemsHandling()
|
||||
view.setNeedsLayout()
|
||||
}
|
||||
|
||||
// MARK: PaginationControllerDelegate
|
||||
|
@ -217,7 +197,7 @@ public class HorizontalMenuViewController: UIViewController, MenuDataSource, Pag
|
|||
}
|
||||
updateScrollIndicatorColor(with: scrollTransition)
|
||||
let animated = !isValid(index: scrollTransition.toIndex)
|
||||
appearanceController.updateItemsScrollView(using: scrollTransition, animated: animated)
|
||||
appearenceController.updateItemsScrollView(using: scrollTransition, animated: animated)
|
||||
|
||||
delegate?.horizontalMenuViewController?(horizontalMenuViewController: self,
|
||||
scrollTransition: scrollTransition)
|
||||
|
@ -234,20 +214,19 @@ public class HorizontalMenuViewController: UIViewController, MenuDataSource, Pag
|
|||
// MARK: Private functionality
|
||||
|
||||
private func initializeSubviews() {
|
||||
_itemsScrollView = UIScrollView()
|
||||
_itemsScrollView.showsHorizontalScrollIndicator = false
|
||||
_itemsScrollView.showsVerticalScrollIndicator = false
|
||||
view.addSubview(_itemsScrollView)
|
||||
|
||||
_itemsContainerView = UIView()
|
||||
_itemsScrollView.addSubview(_itemsContainerView)
|
||||
|
||||
_screenScrollView = UIScrollView()
|
||||
_screenScrollView.showsHorizontalScrollIndicator = false
|
||||
_screenScrollView.showsVerticalScrollIndicator = false
|
||||
_screenScrollView.isPagingEnabled = true
|
||||
view.addSubview(_screenScrollView)
|
||||
|
||||
_itemsScrollView = UIScrollView()
|
||||
_itemsScrollView.showsHorizontalScrollIndicator = false
|
||||
_itemsScrollView.showsVerticalScrollIndicator = false
|
||||
|
||||
view.addSubview(_itemsScrollView)
|
||||
|
||||
_itemsContainerView = UIView()
|
||||
_itemsScrollView.addSubview(_itemsContainerView)
|
||||
}
|
||||
|
||||
private func initializeControllers() {
|
||||
|
@ -255,7 +234,7 @@ public class HorizontalMenuViewController: UIViewController, MenuDataSource, Pag
|
|||
layoutController.delegate = layoutDelegate
|
||||
paginationController = PaginationController(menuDataSource: self)
|
||||
paginationController.delegate = self
|
||||
appearanceController = AppearanceController(menuViewController: self, geometryHolder: layoutController)
|
||||
appearenceController = AppearenceController(menuViewController: self, geometryHolder: layoutController)
|
||||
selectionController = SelectionController(menuDataSource: self)
|
||||
selectionController.delegate = self
|
||||
containerLifeCycleController = ContainerLifeCycleController(menuDataSource: self)
|
||||
|
@ -299,7 +278,8 @@ public class HorizontalMenuViewController: UIViewController, MenuDataSource, Pag
|
|||
|
||||
private func updateScrollIndicatorColor(with transition: ScrollTransition) {
|
||||
guard canUpdateIndicatorColor, numberOfElements > 0, let scrollIndicator = scrollIndicator,
|
||||
isValid(index: transition.toIndex), isValid(index: transition.fromIndex),
|
||||
transition.toIndex >= 0 && transition.toIndex < numberOfElements,
|
||||
transition.fromIndex >= 0 && transition.fromIndex < numberOfElements,
|
||||
let firstColor = items[transition.fromIndex].indicatorColor,
|
||||
let secondColor = items[transition.toIndex].indicatorColor else { return }
|
||||
|
||||
|
|
|
@ -11,21 +11,16 @@ import UIKit
|
|||
@objc public protocol LayoutControllerDelegate: class {
|
||||
/// Asks the delegate for geometry object which to be used.
|
||||
///
|
||||
/// - Parameter layoutController: the object which requests the geometry.
|
||||
/// - Parameter layoutController: the object which requests the geometry,
|
||||
/// - Returns: the geometry object.
|
||||
@objc optional func layoutControllerMenuGeometry(layoutController: LayoutController) -> MenuGeometry
|
||||
/// Asks the delegate for geometry object which to be used for item at provided index.
|
||||
///
|
||||
/// - Parameters:
|
||||
/// - layoutController: the object which requests the geometry.
|
||||
/// - layoutController: the object which requests the geometry,
|
||||
/// - index: the index of item.
|
||||
/// - Returns: the geometry object.
|
||||
@objc optional func layoutController(layoutController: LayoutController, geometryForItemAt index: Int) -> ItemGeometry
|
||||
/// Asks the delegate if it should adjust the offset for screens' scroll view. By default is performed.
|
||||
///
|
||||
/// - Parameter layoutController: the object which requests the geometry.
|
||||
/// - Returns: true or false.
|
||||
@objc optional func layoutControllerAdjustsScreensScrollOffset(layoutController: LayoutController) -> Bool
|
||||
}
|
||||
|
||||
/// An object which is responsible with the layout of the menu.
|
||||
|
@ -46,10 +41,6 @@ public class LayoutController: NSObject, GeometryHolder {
|
|||
|
||||
public private (set) var menuGeometry = MenuGeometry()
|
||||
public private (set) var itemsGeometry: [ItemGeometry] = []
|
||||
|
||||
private var adjustsScreenScrollOffset: Bool {
|
||||
return delegate?.layoutControllerAdjustsScreensScrollOffset?(layoutController: self) ?? true
|
||||
}
|
||||
|
||||
init(menuDataSource: MenuDataSource) {
|
||||
self.menuDataSource = menuDataSource
|
||||
|
@ -61,7 +52,6 @@ public class LayoutController: NSObject, GeometryHolder {
|
|||
if let menuGeometry = delegate?.layoutControllerMenuGeometry?(layoutController: self) {
|
||||
self.menuGeometry = menuGeometry
|
||||
}
|
||||
reloadItemsGeometry()
|
||||
layoutScrollViews()
|
||||
layoutItems()
|
||||
layoutScreens()
|
||||
|
@ -112,34 +102,28 @@ public class LayoutController: NSObject, GeometryHolder {
|
|||
|
||||
private func layoutScrollViews() {
|
||||
menuDataSource.itemsScrollView.contentSize = computeItemsContentSize()
|
||||
|
||||
let menuBounds = menuDataSource.menuContainerView.bounds
|
||||
|
||||
var itemsFrame = menuBounds
|
||||
menuDataSource.screenScrollView.contentSize = computeScreensContentSize()
|
||||
|
||||
var itemsFrame = menuDataSource.itemsScrollView.frame
|
||||
itemsFrame.size.width = menuDataSource.menuContainerView.bounds.width
|
||||
itemsFrame.size.height = menuDataSource.itemsScrollView.contentSize.height
|
||||
menuDataSource.itemsScrollView.frame = itemsFrame
|
||||
|
||||
menuDataSource.screenScrollView.contentSize = computeScreensContentSize()
|
||||
|
||||
var itemsContainerFrame = CGRect.zero
|
||||
|
||||
var itemsContainerFrame = itemsFrame
|
||||
itemsContainerFrame.origin.x = menuGeometry.itemsInset.left
|
||||
itemsContainerFrame.origin.y = menuGeometry.itemsInset.top
|
||||
itemsContainerFrame.size = computeItemsSize()
|
||||
menuDataSource.itemsContainerView.frame = itemsContainerFrame
|
||||
|
||||
|
||||
var screensFrame = menuDataSource.screenScrollView.frame
|
||||
if adjustsScreenScrollOffset {
|
||||
screensFrame.origin.y = itemsFrame.maxY
|
||||
} else {
|
||||
screensFrame.origin.y = menuBounds.minY
|
||||
}
|
||||
screensFrame.origin.y = itemsFrame.height
|
||||
screensFrame.size.width = itemsFrame.size.width
|
||||
screensFrame.size.height = menuDataSource.screenScrollView.contentSize.height
|
||||
menuDataSource.screenScrollView.frame = screensFrame
|
||||
}
|
||||
|
||||
private func layoutItems() {
|
||||
reloadItemsGeometry()
|
||||
for (index, item) in menuDataSource.items.enumerated() {
|
||||
layout(item: item, at: index)
|
||||
}
|
||||
|
@ -160,7 +144,7 @@ public class LayoutController: NSObject, GeometryHolder {
|
|||
case .top:
|
||||
indicatorFrame.origin.y = 0.0
|
||||
case .bottom:
|
||||
indicatorFrame.origin.y = menuDataSource.itemsScrollView.contentSize.height - indicatorFrame.height
|
||||
indicatorFrame.origin.y = menuDataSource.itemsScrollView.bounds.height - indicatorFrame.height
|
||||
}
|
||||
|
||||
switch layoutTransition {
|
||||
|
@ -225,13 +209,9 @@ public class LayoutController: NSObject, GeometryHolder {
|
|||
|
||||
private func computeScreensContentSize() -> CGSize {
|
||||
var size = CGSize()
|
||||
|
||||
|
||||
size.width = CGFloat(menuDataSource.numberOfElements) * menuDataSource.screenScrollView.bounds.width
|
||||
size.height = menuDataSource.menuContainerView.bounds.height
|
||||
|
||||
if adjustsScreenScrollOffset {
|
||||
size.height -= menuDataSource.itemsScrollView.frame.maxY
|
||||
}
|
||||
size.height = menuDataSource.menuContainerView.bounds.height - menuDataSource.itemsScrollView.bounds.height
|
||||
|
||||
return size
|
||||
}
|
||||
|
|
|
@ -28,9 +28,6 @@ public protocol MenuDataSource: class {
|
|||
/// Boolean to configure if the intermediate screens on menu item selection should be loaded
|
||||
var preloadIntermediateScreensOnSelection: Bool { get }
|
||||
|
||||
/// The current index of pagination.
|
||||
var currentIndex: Int { get }
|
||||
|
||||
/// The number of elements is the same for items and screen.
|
||||
/// However the items.count might be 0 because they are optional.
|
||||
var numberOfElements: Int { get }
|
||||
|
|
|
@ -65,11 +65,10 @@ class MenuItemSelectionOperation: Operation {
|
|||
let controller = strongSelf.menuController
|
||||
controller.paginationController.scroll(to: strongSelf.index)
|
||||
|
||||
let transition = ScrollTransition(toIndex: strongSelf.index, progress: 1.0)
|
||||
controller.appearanceController.updateItemsScrollView(using: transition)
|
||||
|
||||
if let scrollIndicator = controller.scrollIndicator {
|
||||
let transition = ScrollTransition(toIndex: strongSelf.index, progress: 1.0)
|
||||
controller.layoutController.layout(scrollIndicator: scrollIndicator, transition: transition)
|
||||
controller.appearenceController.updateItemsScrollView(using: transition)
|
||||
scrollIndicator.backgroundColor = controller.items[strongSelf.index].indicatorColor
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = "TPGHorizontalMenu"
|
||||
s.version = "1.1.4"
|
||||
s.summary = "Horizontal menu navigation."
|
||||
s.description = "Framework done to improve user experience when navigation through screens."
|
||||
s.homepage = "https://github.com/3pillarlabs/ios-horizontalmenu"
|
||||
s.license = "MIT (example)"
|
||||
s.license = { :type => "MIT", :file => "LICENSE" }
|
||||
s.author = "3Pillar Global"
|
||||
s.platform = :ios, "10.0"
|
||||
s.source = { :git => "https://github.com/3pillarlabs/ios-horizontalmenu.git", :tag => "#{s.version}" }
|
||||
s.source_files = "Sources", "Sources/**/*.{h,m, swift}"
|
||||
end
|
|
@ -1 +0,0 @@
|
|||
4.0.2.swift.version
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
/* Begin PBXBuildFile section */
|
||||
54D3E43A1E7156D70073227E /* GeometryHolder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54D3E4391E7156D70073227E /* GeometryHolder.swift */; };
|
||||
54F29C8C1E71827B00BDCBA8 /* AppearanceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54F29C8B1E71827B00BDCBA8 /* AppearanceController.swift */; };
|
||||
54F29C8C1E71827B00BDCBA8 /* AppearenceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54F29C8B1E71827B00BDCBA8 /* AppearenceController.swift */; };
|
||||
54F29C931E719F9600BDCBA8 /* UIScrollView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 54F29C921E719F9600BDCBA8 /* UIScrollView+Extension.swift */; };
|
||||
FF03CCA01E7035A500E056DD /* HorizontalMenuViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF03CC9F1E7035A500E056DD /* HorizontalMenuViewController.swift */; };
|
||||
FF03CCA21E7040A000E056DD /* ViewGeometry.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF03CCA11E7040A000E056DD /* ViewGeometry.swift */; };
|
||||
|
@ -66,7 +66,7 @@
|
|||
|
||||
/* Begin PBXFileReference section */
|
||||
54D3E4391E7156D70073227E /* GeometryHolder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeometryHolder.swift; sourceTree = "<group>"; };
|
||||
54F29C8B1E71827B00BDCBA8 /* AppearanceController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppearanceController.swift; sourceTree = "<group>"; };
|
||||
54F29C8B1E71827B00BDCBA8 /* AppearenceController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppearenceController.swift; sourceTree = "<group>"; };
|
||||
54F29C921E719F9600BDCBA8 /* UIScrollView+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIScrollView+Extension.swift"; sourceTree = "<group>"; };
|
||||
FF03CC9F1E7035A500E056DD /* HorizontalMenuViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HorizontalMenuViewController.swift; sourceTree = "<group>"; };
|
||||
FF03CCA11E7040A000E056DD /* ViewGeometry.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewGeometry.swift; sourceTree = "<group>"; };
|
||||
|
@ -233,7 +233,7 @@
|
|||
FFBFFC411E84068C00305693 /* Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
54F29C8B1E71827B00BDCBA8 /* AppearanceController.swift */,
|
||||
54F29C8B1E71827B00BDCBA8 /* AppearenceController.swift */,
|
||||
FFBA3F991E79417500B130D1 /* ContainerLifeCycleController.swift */,
|
||||
FFD39E241E7BEDF6003C52D6 /* ContainerLoaderController.swift */,
|
||||
FFB6EFDA1E6ED469005087BA /* LayoutController.swift */,
|
||||
|
@ -339,17 +339,16 @@
|
|||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0820;
|
||||
LastUpgradeCheck = 0930;
|
||||
LastUpgradeCheck = 0820;
|
||||
ORGANIZATIONNAME = "3Pillar Global";
|
||||
TargetAttributes = {
|
||||
FFBF6C921E681D7D008B7F73 = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
LastSwiftMigration = 0910;
|
||||
LastSwiftMigration = 0820;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
FFBF6C9B1E681D7D008B7F73 = {
|
||||
CreatedOnToolsVersion = 8.2.1;
|
||||
LastSwiftMigration = 0910;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
};
|
||||
|
@ -420,7 +419,7 @@
|
|||
FF85CD4C1E7819B000845D4C /* SelectGestureRecognizer.swift in Sources */,
|
||||
FFB6EFEB1E6EFDD4005087BA /* ProgressPoint.swift in Sources */,
|
||||
FFBA3F9E1E7943B200B130D1 /* ViewControllerState.swift in Sources */,
|
||||
54F29C8C1E71827B00BDCBA8 /* AppearanceController.swift in Sources */,
|
||||
54F29C8C1E71827B00BDCBA8 /* AppearenceController.swift in Sources */,
|
||||
FF03CCA01E7035A500E056DD /* HorizontalMenuViewController.swift in Sources */,
|
||||
FFB6EFD21E6EB8ED005087BA /* SelectionController.swift in Sources */,
|
||||
FFBA3FA01E79447100B130D1 /* ViewDidLoadState.swift in Sources */,
|
||||
|
@ -467,23 +466,15 @@
|
|||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
|
@ -507,7 +498,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
|
@ -528,23 +519,15 @@
|
|||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
|
@ -562,7 +545,7 @@
|
|||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
|
@ -578,24 +561,19 @@
|
|||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = TPGHorizontalMenu/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "-PG.TPGHorizontalMenu";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -604,23 +582,18 @@
|
|||
buildSettings = {
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_IDENTITY = "";
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||
DYLIB_CURRENT_VERSION = 1;
|
||||
DYLIB_INSTALL_NAME_BASE = "@rpath";
|
||||
INFOPLIST_FILE = TPGHorizontalMenu/Info.plist;
|
||||
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "-PG.TPGHorizontalMenu";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
@ -632,8 +605,7 @@
|
|||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "-PG.TPGHorizontalMenuTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
|
@ -645,8 +617,7 @@
|
|||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "-PG.TPGHorizontalMenuTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
|
||||
SWIFT_VERSION = 4.0;
|
||||
SWIFT_VERSION = 3.0;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<?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>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0930"
|
||||
LastUpgradeVersion = "0820"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
|
@ -26,7 +26,6 @@
|
|||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
codeCoverageEnabled = "YES"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
<TestableReference
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.1.4</string>
|
||||
<string>0.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.6 MiB |
Loading…
Reference in New Issue