-
Notifications
You must be signed in to change notification settings - Fork 295
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1331 from braintree/payment-insights-feature
Merge Shopper Insights Feature Into Main
- Loading branch information
Showing
42 changed files
with
1,569 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
Braintree.xcodeproj/xcshareddata/xcschemes/BraintreeShopperInsights.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "1500" | ||
version = "1.7"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "8046982F2B27C5340090878E" | ||
BuildableName = "BraintreeShopperInsights.framework" | ||
BlueprintName = "BraintreeShopperInsights" | ||
ReferencedContainer = "container:Braintree.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
shouldAutocreateTestPlan = "YES"> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "8046982F2B27C5340090878E" | ||
BuildableName = "BraintreeShopperInsights.framework" | ||
BlueprintName = "BraintreeShopperInsights" | ||
ReferencedContainer = "container:Braintree.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
55 changes: 55 additions & 0 deletions
55
Demo/Application/Features/Helpers/TextFieldWithLabel.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import UIKit | ||
|
||
class TextFieldWithLabel: UIView { | ||
|
||
// MARK: - Views | ||
|
||
lazy var label: UILabel = { | ||
let label = UILabel() | ||
label.translatesAutoresizingMaskIntoConstraints = false | ||
label.lineBreakMode = .byWordWrapping | ||
label.numberOfLines = 0 | ||
return label | ||
}() | ||
|
||
lazy var textField: UITextField = { | ||
let textField = UITextField() | ||
textField.translatesAutoresizingMaskIntoConstraints = false | ||
textField.borderStyle = .roundedRect | ||
textField.clearButtonMode = .never | ||
textField.autocapitalizationType = .none | ||
textField.autocorrectionType = .no | ||
return textField | ||
}() | ||
|
||
// MARK: - Init | ||
|
||
override init(frame: CGRect) { | ||
super.init(frame: frame) | ||
configureStackView() | ||
} | ||
|
||
required init?(coder: NSCoder) { | ||
fatalError("init(coder:) has not been implemented") | ||
} | ||
|
||
// MARK: - Layout | ||
|
||
func configureStackView() { | ||
let stackView = UIStackView(arrangedSubviews: [label, textField]) | ||
stackView.axis = .vertical | ||
stackView.spacing = 5 | ||
stackView.distribution = .fillEqually | ||
stackView.translatesAutoresizingMaskIntoConstraints = false | ||
|
||
addSubview(stackView) | ||
|
||
NSLayoutConstraint.activate([ | ||
stackView.topAnchor.constraint(equalTo: safeAreaLayoutGuide.topAnchor), | ||
stackView.bottomAnchor.constraint(equalTo: safeAreaLayoutGuide.bottomAnchor), | ||
stackView.leadingAnchor.constraint(equalTo: safeAreaLayoutGuide.leadingAnchor), | ||
stackView.trailingAnchor.constraint(equalTo: safeAreaLayoutGuide.trailingAnchor), | ||
]) | ||
} | ||
} | ||
|
Oops, something went wrong.