Skip to content

Commit 11c59be

Browse files
committed
Add test buttons for .leading and .trailing orientations.
Add the package to the demo for easier maintenance.
1 parent fbb5883 commit 11c59be

3 files changed

Lines changed: 32 additions & 14 deletions

File tree

Demo/SwiftTooltipDemo/SwiftTooltipDemo.xcodeproj/project.pbxproj

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
A41E187428B5995200BD21DD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A41E187228B5995200BD21DD /* Main.storyboard */; };
1414
A41E187628B5995300BD21DD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A41E187528B5995300BD21DD /* Assets.xcassets */; };
1515
A41E187928B5995300BD21DD /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A41E187728B5995300BD21DD /* LaunchScreen.storyboard */; };
16-
A424815528B7E22200E1C32B /* SwiftTooltipKit in Frameworks */ = {isa = PBXBuildFile; productRef = A424815428B7E22200E1C32B /* SwiftTooltipKit */; };
16+
A4235DA328C1710F00F61EB4 /* SwiftTooltipKit in Frameworks */ = {isa = PBXBuildFile; productRef = A4235DA228C1710F00F61EB4 /* SwiftTooltipKit */; };
1717
/* End PBXBuildFile section */
1818

1919
/* Begin PBXFileReference section */
@@ -25,15 +25,15 @@
2525
A41E187528B5995300BD21DD /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
2626
A41E187828B5995300BD21DD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
2727
A41E187A28B5995300BD21DD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
28-
A424815628B7E29D00E1C32B /* SwiftTooltipKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = SwiftTooltipKit; path = ../..; sourceTree = "<group>"; };
28+
A4235DA428C1713200F61EB4 /* SwiftTooltipKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = SwiftTooltipKit; path = ../..; sourceTree = "<group>"; };
2929
/* End PBXFileReference section */
3030

3131
/* Begin PBXFrameworksBuildPhase section */
3232
A41E186628B5995200BD21DD /* Frameworks */ = {
3333
isa = PBXFrameworksBuildPhase;
3434
buildActionMask = 2147483647;
3535
files = (
36-
A424815528B7E22200E1C32B /* SwiftTooltipKit in Frameworks */,
36+
A4235DA328C1710F00F61EB4 /* SwiftTooltipKit in Frameworks */,
3737
);
3838
runOnlyForDeploymentPostprocessing = 0;
3939
};
@@ -44,7 +44,7 @@
4444
isa = PBXGroup;
4545
children = (
4646
A41E186B28B5995200BD21DD /* SwiftTooltipDemo */,
47-
A424815628B7E29D00E1C32B /* SwiftTooltipKit */,
47+
A4235DA428C1713200F61EB4 /* SwiftTooltipKit */,
4848
A41E186A28B5995200BD21DD /* Products */,
4949
);
5050
sourceTree = "<group>";
@@ -88,7 +88,7 @@
8888
);
8989
name = SwiftTooltipDemo;
9090
packageProductDependencies = (
91-
A424815428B7E22200E1C32B /* SwiftTooltipKit */,
91+
A4235DA228C1710F00F61EB4 /* SwiftTooltipKit */,
9292
);
9393
productName = SwiftTooltipDemo;
9494
productReference = A41E186928B5995200BD21DD /* SwiftTooltipDemo.app */;
@@ -119,7 +119,7 @@
119119
);
120120
mainGroup = A41E186028B5995200BD21DD;
121121
packageReferences = (
122-
A424815328B7E22200E1C32B /* XCRemoteSwiftPackageReference "SwiftTooltipKit" */,
122+
A4235DA128C1710F00F61EB4 /* XCRemoteSwiftPackageReference "SwiftTooltipKit" */,
123123
);
124124
productRefGroup = A41E186A28B5995200BD21DD /* Products */;
125125
projectDirPath = "";
@@ -368,20 +368,20 @@
368368
/* End XCConfigurationList section */
369369

370370
/* Begin XCRemoteSwiftPackageReference section */
371-
A424815328B7E22200E1C32B /* XCRemoteSwiftPackageReference "SwiftTooltipKit" */ = {
371+
A4235DA128C1710F00F61EB4 /* XCRemoteSwiftPackageReference "SwiftTooltipKit" */ = {
372372
isa = XCRemoteSwiftPackageReference;
373-
repositoryURL = "https://github.com/hendesi/SwiftTooltipKit";
373+
repositoryURL = "https://github.com/randarnold/SwiftTooltipKit.git";
374374
requirement = {
375-
kind = upToNextMajorVersion;
376-
minimumVersion = 0.1.2;
375+
branch = develop;
376+
kind = branch;
377377
};
378378
};
379379
/* End XCRemoteSwiftPackageReference section */
380380

381381
/* Begin XCSwiftPackageProductDependency section */
382-
A424815428B7E22200E1C32B /* SwiftTooltipKit */ = {
382+
A4235DA228C1710F00F61EB4 /* SwiftTooltipKit */ = {
383383
isa = XCSwiftPackageProductDependency;
384-
package = A424815328B7E22200E1C32B /* XCRemoteSwiftPackageReference "SwiftTooltipKit" */;
384+
package = A4235DA128C1710F00F61EB4 /* XCRemoteSwiftPackageReference "SwiftTooltipKit" */;
385385
productName = SwiftTooltipKit;
386386
};
387387
/* End XCSwiftPackageProductDependency section */

Demo/SwiftTooltipDemo/SwiftTooltipDemo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved

Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Demo/SwiftTooltipDemo/SwiftTooltipDemo/ViewController.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class ViewController: UIViewController {
3636
return stackview
3737
}()
3838

39-
let buttonColors: [UIColor] = [.purple, .blue, .cyan, .green, .orange]
39+
let buttonColors: [UIColor] = [.purple, .blue, .cyan, .green, .orange, .magenta, .purple]
4040

4141
var smallTooltipConfig: Tooltip.ToolTipConfiguration = {
4242
var smalltoolTipConfig = Tooltip.ToolTipConfiguration()
@@ -59,7 +59,7 @@ class ViewController: UIViewController {
5959
}
6060

6161
private func populateView() {
62-
for index in 0..<5 {
62+
for index in 0..<buttonColors.count {
6363
let button = UIButton()
6464
button.setTitle("Button \(index)", for: .normal)
6565
button.backgroundColor = buttonColors[index]
@@ -96,6 +96,10 @@ class ViewController: UIViewController {
9696
sender.tooltip("Original .left Orientation is updated automatically because of layout constraints", orientation: .left)
9797
case 4:
9898
sender.tooltip("Define the width of a tooltip dynamically", orientation: .left, configuration: smallTooltipConfig)
99+
case 5:
100+
sender.tooltip("A tooltip with leading orientation", orientation: .leading, configuration: smallTooltipConfig)
101+
case 6:
102+
sender.tooltip("A tooltip with trailing orientation", orientation: .trailing, configuration: smallTooltipConfig)
99103
default:
100104
break
101105
}

0 commit comments

Comments
 (0)