Initial commit.
|
@ -0,0 +1,735 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 48;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
EC367BAF205ABC37008FF479 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BAE205ABC37008FF479 /* AppDelegate.swift */; };
|
||||
EC367BB6205ABC37008FF479 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EC367BB5205ABC37008FF479 /* Assets.xcassets */; };
|
||||
EC367BB9205ABC37008FF479 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EC367BB7205ABC37008FF479 /* LaunchScreen.storyboard */; };
|
||||
EC367BC4205ABC37008FF479 /* Bitcoin_PrivateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BC3205ABC37008FF479 /* Bitcoin_PrivateTests.swift */; };
|
||||
EC367BCF205ABC37008FF479 /* Bitcoin_PrivateUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BCE205ABC37008FF479 /* Bitcoin_PrivateUITests.swift */; };
|
||||
EC367BF2205ABD7F008FF479 /* WalletViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367BDD205ABD7F008FF479 /* WalletViewController.xib */; };
|
||||
EC367BF3205ABD7F008FF479 /* VerificationViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367BDF205ABD7F008FF479 /* VerificationViewController.xib */; };
|
||||
EC367BF4205ABD7F008FF479 /* WalletTitleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BE0205ABD7F008FF479 /* WalletTitleViewController.swift */; };
|
||||
EC367BF5205ABD7F008FF479 /* MnemonicViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367BE1205ABD7F008FF479 /* MnemonicViewController.xib */; };
|
||||
EC367BF6205ABD7F008FF479 /* MnemonicViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BE2205ABD7F008FF479 /* MnemonicViewController.swift */; };
|
||||
EC367BF7205ABD7F008FF479 /* VerificationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BE3205ABD7F008FF479 /* VerificationViewController.swift */; };
|
||||
EC367BF8205ABD7F008FF479 /* WalletTitleViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367BE4205ABD7F008FF479 /* WalletTitleViewController.xib */; };
|
||||
EC367BF9205ABD7F008FF479 /* PinViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BE5205ABD7F008FF479 /* PinViewController.swift */; };
|
||||
EC367BFA205ABD7F008FF479 /* PinViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367BE6205ABD7F008FF479 /* PinViewController.xib */; };
|
||||
EC367BFB205ABD7F008FF479 /* SendViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367BE7205ABD7F008FF479 /* SendViewController.xib */; };
|
||||
EC367BFC205ABD7F008FF479 /* ReceiveViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BE8205ABD7F008FF479 /* ReceiveViewController.swift */; };
|
||||
EC367BFD205ABD7F008FF479 /* ScanViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367BE9205ABD7F008FF479 /* ScanViewController.xib */; };
|
||||
EC367BFE205ABD7F008FF479 /* WalletViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BEA205ABD7F008FF479 /* WalletViewController.swift */; };
|
||||
EC367BFF205ABD7F008FF479 /* LaunchViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367BEB205ABD7F008FF479 /* LaunchViewController.xib */; };
|
||||
EC367C00205ABD7F008FF479 /* SendViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BEC205ABD7F008FF479 /* SendViewController.swift */; };
|
||||
EC367C01205ABD7F008FF479 /* SendAmountViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BED205ABD7F008FF479 /* SendAmountViewController.swift */; };
|
||||
EC367C02205ABD7F008FF479 /* SendAmountViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367BEE205ABD7F008FF479 /* SendAmountViewController.xib */; };
|
||||
EC367C03205ABD7F008FF479 /* ScanViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BEF205ABD7F008FF479 /* ScanViewController.swift */; };
|
||||
EC367C04205ABD7F008FF479 /* ReceiveViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367BF0205ABD7F008FF479 /* ReceiveViewController.xib */; };
|
||||
EC367C05205ABD7F008FF479 /* LaunchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367BF1205ABD7F008FF479 /* LaunchViewController.swift */; };
|
||||
EC367C0B205ABF48008FF479 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C07205ABF48008FF479 /* Constants.swift */; };
|
||||
EC367C0D205ABF48008FF479 /* AppNavigationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C09205ABF48008FF479 /* AppNavigationController.swift */; };
|
||||
EC367C0E205ABF48008FF479 /* NibLoader.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C0A205ABF48008FF479 /* NibLoader.swift */; };
|
||||
EC367C1B205ABF52008FF479 /* WordSuggestionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C11205ABF52008FF479 /* WordSuggestionCell.swift */; };
|
||||
EC367C1C205ABF52008FF479 /* WordSuggestionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367C12205ABF52008FF479 /* WordSuggestionCell.xib */; };
|
||||
EC367C1D205ABF52008FF479 /* TransactionHistoryCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367C13205ABF52008FF479 /* TransactionHistoryCell.xib */; };
|
||||
EC367C1E205ABF52008FF479 /* TransactionHistoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C14205ABF52008FF479 /* TransactionHistoryCell.swift */; };
|
||||
EC367C1F205ABF52008FF479 /* WalletCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367C15205ABF52008FF479 /* WalletCell.xib */; };
|
||||
EC367C20205ABF52008FF479 /* WalletCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C16205ABF52008FF479 /* WalletCell.swift */; };
|
||||
EC367C21205ABF52008FF479 /* PillView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C17205ABF52008FF479 /* PillView.swift */; };
|
||||
EC367C22205ABF52008FF479 /* AppButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C18205ABF52008FF479 /* AppButton.swift */; };
|
||||
EC367C23205ABF52008FF479 /* PinView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C19205ABF52008FF479 /* PinView.swift */; };
|
||||
EC367C24205ABF52008FF479 /* PinView.xib in Resources */ = {isa = PBXBuildFile; fileRef = EC367C1A205ABF52008FF479 /* PinView.xib */; };
|
||||
EC367C28205ABFD4008FF479 /* UIColor+Gradient.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C26205ABFD4008FF479 /* UIColor+Gradient.swift */; };
|
||||
EC367C29205ABFD4008FF479 /* UIView+Shake.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC367C27205ABFD4008FF479 /* UIView+Shake.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXContainerItemProxy section */
|
||||
EC367BC0205ABC37008FF479 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = EC367BA3205ABC37008FF479 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = EC367BAA205ABC37008FF479;
|
||||
remoteInfo = "Bitcoin Private";
|
||||
};
|
||||
EC367BCB205ABC37008FF479 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = EC367BA3205ABC37008FF479 /* Project object */;
|
||||
proxyType = 1;
|
||||
remoteGlobalIDString = EC367BAA205ABC37008FF479;
|
||||
remoteInfo = "Bitcoin Private";
|
||||
};
|
||||
/* End PBXContainerItemProxy section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
EC367BAB205ABC37008FF479 /* Bitcoin Private.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Bitcoin Private.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EC367BAE205ABC37008FF479 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
EC367BB5205ABC37008FF479 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
EC367BB8205ABC37008FF479 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
EC367BBA205ABC37008FF479 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
EC367BBF205ABC37008FF479 /* Bitcoin PrivateTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Bitcoin PrivateTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EC367BC3205ABC37008FF479 /* Bitcoin_PrivateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bitcoin_PrivateTests.swift; sourceTree = "<group>"; };
|
||||
EC367BC5205ABC37008FF479 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
EC367BCA205ABC37008FF479 /* Bitcoin PrivateUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "Bitcoin PrivateUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
EC367BCE205ABC37008FF479 /* Bitcoin_PrivateUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bitcoin_PrivateUITests.swift; sourceTree = "<group>"; };
|
||||
EC367BD0205ABC37008FF479 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
EC367BDD205ABD7F008FF479 /* WalletViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WalletViewController.xib; sourceTree = "<group>"; };
|
||||
EC367BDF205ABD7F008FF479 /* VerificationViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = VerificationViewController.xib; sourceTree = "<group>"; };
|
||||
EC367BE0205ABD7F008FF479 /* WalletTitleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletTitleViewController.swift; sourceTree = "<group>"; };
|
||||
EC367BE1205ABD7F008FF479 /* MnemonicViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MnemonicViewController.xib; sourceTree = "<group>"; };
|
||||
EC367BE2205ABD7F008FF479 /* MnemonicViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MnemonicViewController.swift; sourceTree = "<group>"; };
|
||||
EC367BE3205ABD7F008FF479 /* VerificationViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VerificationViewController.swift; sourceTree = "<group>"; };
|
||||
EC367BE4205ABD7F008FF479 /* WalletTitleViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WalletTitleViewController.xib; sourceTree = "<group>"; };
|
||||
EC367BE5205ABD7F008FF479 /* PinViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PinViewController.swift; sourceTree = "<group>"; };
|
||||
EC367BE6205ABD7F008FF479 /* PinViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PinViewController.xib; sourceTree = "<group>"; };
|
||||
EC367BE7205ABD7F008FF479 /* SendViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SendViewController.xib; sourceTree = "<group>"; };
|
||||
EC367BE8205ABD7F008FF479 /* ReceiveViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ReceiveViewController.swift; sourceTree = "<group>"; };
|
||||
EC367BE9205ABD7F008FF479 /* ScanViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ScanViewController.xib; sourceTree = "<group>"; };
|
||||
EC367BEA205ABD7F008FF479 /* WalletViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletViewController.swift; sourceTree = "<group>"; };
|
||||
EC367BEB205ABD7F008FF479 /* LaunchViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = LaunchViewController.xib; sourceTree = "<group>"; };
|
||||
EC367BEC205ABD7F008FF479 /* SendViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendViewController.swift; sourceTree = "<group>"; };
|
||||
EC367BED205ABD7F008FF479 /* SendAmountViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SendAmountViewController.swift; sourceTree = "<group>"; };
|
||||
EC367BEE205ABD7F008FF479 /* SendAmountViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = SendAmountViewController.xib; sourceTree = "<group>"; };
|
||||
EC367BEF205ABD7F008FF479 /* ScanViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScanViewController.swift; sourceTree = "<group>"; };
|
||||
EC367BF0205ABD7F008FF479 /* ReceiveViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ReceiveViewController.xib; sourceTree = "<group>"; };
|
||||
EC367BF1205ABD7F008FF479 /* LaunchViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LaunchViewController.swift; sourceTree = "<group>"; };
|
||||
EC367C07205ABF48008FF479 /* Constants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
|
||||
EC367C09205ABF48008FF479 /* AppNavigationController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppNavigationController.swift; sourceTree = "<group>"; };
|
||||
EC367C0A205ABF48008FF479 /* NibLoader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NibLoader.swift; sourceTree = "<group>"; };
|
||||
EC367C11205ABF52008FF479 /* WordSuggestionCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WordSuggestionCell.swift; sourceTree = "<group>"; };
|
||||
EC367C12205ABF52008FF479 /* WordSuggestionCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WordSuggestionCell.xib; sourceTree = "<group>"; };
|
||||
EC367C13205ABF52008FF479 /* TransactionHistoryCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TransactionHistoryCell.xib; sourceTree = "<group>"; };
|
||||
EC367C14205ABF52008FF479 /* TransactionHistoryCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TransactionHistoryCell.swift; sourceTree = "<group>"; };
|
||||
EC367C15205ABF52008FF479 /* WalletCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WalletCell.xib; sourceTree = "<group>"; };
|
||||
EC367C16205ABF52008FF479 /* WalletCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = WalletCell.swift; sourceTree = "<group>"; };
|
||||
EC367C17205ABF52008FF479 /* PillView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PillView.swift; sourceTree = "<group>"; };
|
||||
EC367C18205ABF52008FF479 /* AppButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppButton.swift; sourceTree = "<group>"; };
|
||||
EC367C19205ABF52008FF479 /* PinView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PinView.swift; sourceTree = "<group>"; };
|
||||
EC367C1A205ABF52008FF479 /* PinView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PinView.xib; sourceTree = "<group>"; };
|
||||
EC367C26205ABFD4008FF479 /* UIColor+Gradient.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIColor+Gradient.swift"; sourceTree = "<group>"; };
|
||||
EC367C27205ABFD4008FF479 /* UIView+Shake.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Shake.swift"; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
EC367BA8205ABC37008FF479 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EC367BBC205ABC37008FF479 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EC367BC7205ABC37008FF479 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
EC367BA2205ABC37008FF479 = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367BAD205ABC37008FF479 /* Bitcoin Private */,
|
||||
EC367BC2205ABC37008FF479 /* Bitcoin PrivateTests */,
|
||||
EC367BCD205ABC37008FF479 /* Bitcoin PrivateUITests */,
|
||||
EC367BAC205ABC37008FF479 /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EC367BAC205ABC37008FF479 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367BAB205ABC37008FF479 /* Bitcoin Private.app */,
|
||||
EC367BBF205ABC37008FF479 /* Bitcoin PrivateTests.xctest */,
|
||||
EC367BCA205ABC37008FF479 /* Bitcoin PrivateUITests.xctest */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EC367BAD205ABC37008FF479 /* Bitcoin Private */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367BAE205ABC37008FF479 /* AppDelegate.swift */,
|
||||
EC367C25205ABFD4008FF479 /* Extensions */,
|
||||
EC367C0F205ABF52008FF479 /* Views */,
|
||||
EC367C06205ABF48008FF479 /* Utils */,
|
||||
EC367BDC205ABD7F008FF479 /* View Controllers */,
|
||||
EC367BB5205ABC37008FF479 /* Assets.xcassets */,
|
||||
EC367BB7205ABC37008FF479 /* LaunchScreen.storyboard */,
|
||||
EC367BBA205ABC37008FF479 /* Info.plist */,
|
||||
);
|
||||
path = "Bitcoin Private";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EC367BC2205ABC37008FF479 /* Bitcoin PrivateTests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367BC3205ABC37008FF479 /* Bitcoin_PrivateTests.swift */,
|
||||
EC367BC5205ABC37008FF479 /* Info.plist */,
|
||||
);
|
||||
path = "Bitcoin PrivateTests";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EC367BCD205ABC37008FF479 /* Bitcoin PrivateUITests */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367BCE205ABC37008FF479 /* Bitcoin_PrivateUITests.swift */,
|
||||
EC367BD0205ABC37008FF479 /* Info.plist */,
|
||||
);
|
||||
path = "Bitcoin PrivateUITests";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EC367BDC205ABD7F008FF479 /* View Controllers */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367BDE205ABD7F008FF479 /* Wallet Creation and Restoration */,
|
||||
EC367BF1205ABD7F008FF479 /* LaunchViewController.swift */,
|
||||
EC367BEB205ABD7F008FF479 /* LaunchViewController.xib */,
|
||||
EC367BEF205ABD7F008FF479 /* ScanViewController.swift */,
|
||||
EC367BE9205ABD7F008FF479 /* ScanViewController.xib */,
|
||||
EC367BEC205ABD7F008FF479 /* SendViewController.swift */,
|
||||
EC367BE7205ABD7F008FF479 /* SendViewController.xib */,
|
||||
EC367BED205ABD7F008FF479 /* SendAmountViewController.swift */,
|
||||
EC367BEE205ABD7F008FF479 /* SendAmountViewController.xib */,
|
||||
EC367BE8205ABD7F008FF479 /* ReceiveViewController.swift */,
|
||||
EC367BF0205ABD7F008FF479 /* ReceiveViewController.xib */,
|
||||
EC367BEA205ABD7F008FF479 /* WalletViewController.swift */,
|
||||
EC367BDD205ABD7F008FF479 /* WalletViewController.xib */,
|
||||
);
|
||||
path = "View Controllers";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EC367BDE205ABD7F008FF479 /* Wallet Creation and Restoration */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367BE2205ABD7F008FF479 /* MnemonicViewController.swift */,
|
||||
EC367BE1205ABD7F008FF479 /* MnemonicViewController.xib */,
|
||||
EC367BE5205ABD7F008FF479 /* PinViewController.swift */,
|
||||
EC367BE6205ABD7F008FF479 /* PinViewController.xib */,
|
||||
EC367BE3205ABD7F008FF479 /* VerificationViewController.swift */,
|
||||
EC367BDF205ABD7F008FF479 /* VerificationViewController.xib */,
|
||||
EC367BE0205ABD7F008FF479 /* WalletTitleViewController.swift */,
|
||||
EC367BE4205ABD7F008FF479 /* WalletTitleViewController.xib */,
|
||||
);
|
||||
path = "Wallet Creation and Restoration";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EC367C06205ABF48008FF479 /* Utils */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367C07205ABF48008FF479 /* Constants.swift */,
|
||||
EC367C09205ABF48008FF479 /* AppNavigationController.swift */,
|
||||
EC367C0A205ABF48008FF479 /* NibLoader.swift */,
|
||||
);
|
||||
path = Utils;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EC367C0F205ABF52008FF479 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367C10205ABF52008FF479 /* Cells */,
|
||||
EC367C17205ABF52008FF479 /* PillView.swift */,
|
||||
EC367C18205ABF52008FF479 /* AppButton.swift */,
|
||||
EC367C19205ABF52008FF479 /* PinView.swift */,
|
||||
EC367C1A205ABF52008FF479 /* PinView.xib */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EC367C10205ABF52008FF479 /* Cells */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367C11205ABF52008FF479 /* WordSuggestionCell.swift */,
|
||||
EC367C12205ABF52008FF479 /* WordSuggestionCell.xib */,
|
||||
EC367C14205ABF52008FF479 /* TransactionHistoryCell.swift */,
|
||||
EC367C13205ABF52008FF479 /* TransactionHistoryCell.xib */,
|
||||
EC367C16205ABF52008FF479 /* WalletCell.swift */,
|
||||
EC367C15205ABF52008FF479 /* WalletCell.xib */,
|
||||
);
|
||||
path = Cells;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
EC367C25205ABFD4008FF479 /* Extensions */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
EC367C26205ABFD4008FF479 /* UIColor+Gradient.swift */,
|
||||
EC367C27205ABFD4008FF479 /* UIView+Shake.swift */,
|
||||
);
|
||||
path = Extensions;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
EC367BAA205ABC37008FF479 /* Bitcoin Private */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = EC367BD3205ABC38008FF479 /* Build configuration list for PBXNativeTarget "Bitcoin Private" */;
|
||||
buildPhases = (
|
||||
EC367BA7205ABC37008FF479 /* Sources */,
|
||||
EC367BA8205ABC37008FF479 /* Frameworks */,
|
||||
EC367BA9205ABC37008FF479 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = "Bitcoin Private";
|
||||
productName = "Bitcoin Private";
|
||||
productReference = EC367BAB205ABC37008FF479 /* Bitcoin Private.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
EC367BBE205ABC37008FF479 /* Bitcoin PrivateTests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = EC367BD6205ABC38008FF479 /* Build configuration list for PBXNativeTarget "Bitcoin PrivateTests" */;
|
||||
buildPhases = (
|
||||
EC367BBB205ABC37008FF479 /* Sources */,
|
||||
EC367BBC205ABC37008FF479 /* Frameworks */,
|
||||
EC367BBD205ABC37008FF479 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
EC367BC1205ABC37008FF479 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Bitcoin PrivateTests";
|
||||
productName = "Bitcoin PrivateTests";
|
||||
productReference = EC367BBF205ABC37008FF479 /* Bitcoin PrivateTests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.unit-test";
|
||||
};
|
||||
EC367BC9205ABC37008FF479 /* Bitcoin PrivateUITests */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = EC367BD9205ABC38008FF479 /* Build configuration list for PBXNativeTarget "Bitcoin PrivateUITests" */;
|
||||
buildPhases = (
|
||||
EC367BC6205ABC37008FF479 /* Sources */,
|
||||
EC367BC7205ABC37008FF479 /* Frameworks */,
|
||||
EC367BC8205ABC37008FF479 /* Resources */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
EC367BCC205ABC37008FF479 /* PBXTargetDependency */,
|
||||
);
|
||||
name = "Bitcoin PrivateUITests";
|
||||
productName = "Bitcoin PrivateUITests";
|
||||
productReference = EC367BCA205ABC37008FF479 /* Bitcoin PrivateUITests.xctest */;
|
||||
productType = "com.apple.product-type.bundle.ui-testing";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
EC367BA3205ABC37008FF479 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastSwiftUpdateCheck = 0920;
|
||||
LastUpgradeCheck = 0920;
|
||||
ORGANIZATIONNAME = "Satraj Bambra";
|
||||
TargetAttributes = {
|
||||
EC367BAA205ABC37008FF479 = {
|
||||
CreatedOnToolsVersion = 9.2;
|
||||
ProvisioningStyle = Automatic;
|
||||
};
|
||||
EC367BBE205ABC37008FF479 = {
|
||||
CreatedOnToolsVersion = 9.2;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = EC367BAA205ABC37008FF479;
|
||||
};
|
||||
EC367BC9205ABC37008FF479 = {
|
||||
CreatedOnToolsVersion = 9.2;
|
||||
ProvisioningStyle = Automatic;
|
||||
TestTargetID = EC367BAA205ABC37008FF479;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = EC367BA6205ABC37008FF479 /* Build configuration list for PBXProject "Bitcoin Private" */;
|
||||
compatibilityVersion = "Xcode 8.0";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = EC367BA2205ABC37008FF479;
|
||||
productRefGroup = EC367BAC205ABC37008FF479 /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
EC367BAA205ABC37008FF479 /* Bitcoin Private */,
|
||||
EC367BBE205ABC37008FF479 /* Bitcoin PrivateTests */,
|
||||
EC367BC9205ABC37008FF479 /* Bitcoin PrivateUITests */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
EC367BA9205ABC37008FF479 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EC367C04205ABD7F008FF479 /* ReceiveViewController.xib in Resources */,
|
||||
EC367BFD205ABD7F008FF479 /* ScanViewController.xib in Resources */,
|
||||
EC367BFB205ABD7F008FF479 /* SendViewController.xib in Resources */,
|
||||
EC367BF5205ABD7F008FF479 /* MnemonicViewController.xib in Resources */,
|
||||
EC367BB9205ABC37008FF479 /* LaunchScreen.storyboard in Resources */,
|
||||
EC367BF3205ABD7F008FF479 /* VerificationViewController.xib in Resources */,
|
||||
EC367C1C205ABF52008FF479 /* WordSuggestionCell.xib in Resources */,
|
||||
EC367BB6205ABC37008FF479 /* Assets.xcassets in Resources */,
|
||||
EC367BF8205ABD7F008FF479 /* WalletTitleViewController.xib in Resources */,
|
||||
EC367C1D205ABF52008FF479 /* TransactionHistoryCell.xib in Resources */,
|
||||
EC367BFF205ABD7F008FF479 /* LaunchViewController.xib in Resources */,
|
||||
EC367C02205ABD7F008FF479 /* SendAmountViewController.xib in Resources */,
|
||||
EC367BF2205ABD7F008FF479 /* WalletViewController.xib in Resources */,
|
||||
EC367C1F205ABF52008FF479 /* WalletCell.xib in Resources */,
|
||||
EC367C24205ABF52008FF479 /* PinView.xib in Resources */,
|
||||
EC367BFA205ABD7F008FF479 /* PinViewController.xib in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EC367BBD205ABC37008FF479 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EC367BC8205ABC37008FF479 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
EC367BA7205ABC37008FF479 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EC367BF6205ABD7F008FF479 /* MnemonicViewController.swift in Sources */,
|
||||
EC367C21205ABF52008FF479 /* PillView.swift in Sources */,
|
||||
EC367BF4205ABD7F008FF479 /* WalletTitleViewController.swift in Sources */,
|
||||
EC367C00205ABD7F008FF479 /* SendViewController.swift in Sources */,
|
||||
EC367C03205ABD7F008FF479 /* ScanViewController.swift in Sources */,
|
||||
EC367BF9205ABD7F008FF479 /* PinViewController.swift in Sources */,
|
||||
EC367C1E205ABF52008FF479 /* TransactionHistoryCell.swift in Sources */,
|
||||
EC367C29205ABFD4008FF479 /* UIView+Shake.swift in Sources */,
|
||||
EC367C20205ABF52008FF479 /* WalletCell.swift in Sources */,
|
||||
EC367C23205ABF52008FF479 /* PinView.swift in Sources */,
|
||||
EC367BF7205ABD7F008FF479 /* VerificationViewController.swift in Sources */,
|
||||
EC367BFC205ABD7F008FF479 /* ReceiveViewController.swift in Sources */,
|
||||
EC367C0B205ABF48008FF479 /* Constants.swift in Sources */,
|
||||
EC367C05205ABD7F008FF479 /* LaunchViewController.swift in Sources */,
|
||||
EC367C22205ABF52008FF479 /* AppButton.swift in Sources */,
|
||||
EC367C0D205ABF48008FF479 /* AppNavigationController.swift in Sources */,
|
||||
EC367C1B205ABF52008FF479 /* WordSuggestionCell.swift in Sources */,
|
||||
EC367C0E205ABF48008FF479 /* NibLoader.swift in Sources */,
|
||||
EC367C28205ABFD4008FF479 /* UIColor+Gradient.swift in Sources */,
|
||||
EC367C01205ABD7F008FF479 /* SendAmountViewController.swift in Sources */,
|
||||
EC367BFE205ABD7F008FF479 /* WalletViewController.swift in Sources */,
|
||||
EC367BAF205ABC37008FF479 /* AppDelegate.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EC367BBB205ABC37008FF479 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EC367BC4205ABC37008FF479 /* Bitcoin_PrivateTests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
EC367BC6205ABC37008FF479 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
EC367BCF205ABC37008FF479 /* Bitcoin_PrivateUITests.swift in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXTargetDependency section */
|
||||
EC367BC1205ABC37008FF479 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = EC367BAA205ABC37008FF479 /* Bitcoin Private */;
|
||||
targetProxy = EC367BC0205ABC37008FF479 /* PBXContainerItemProxy */;
|
||||
};
|
||||
EC367BCC205ABC37008FF479 /* PBXTargetDependency */ = {
|
||||
isa = PBXTargetDependency;
|
||||
target = EC367BAA205ABC37008FF479 /* Bitcoin Private */;
|
||||
targetProxy = EC367BCB205ABC37008FF479 /* PBXContainerItemProxy */;
|
||||
};
|
||||
/* End PBXTargetDependency section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
EC367BB7205ABC37008FF479 /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
EC367BB8205ABC37008FF479 /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
EC367BD1205ABC38008FF479 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
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_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_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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu11;
|
||||
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 = 11.2;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
EC367BD2205ABC38008FF479 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
|
||||
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_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_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_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
CODE_SIGN_IDENTITY = "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 = gnu11;
|
||||
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 = 11.2;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
EC367BD4205ABC38008FF479 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = 2C24FP5V5L;
|
||||
INFOPLIST_FILE = "Bitcoin Private/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.btcp.Bitcoin-Private";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
EC367BD5205ABC38008FF479 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = 2C24FP5V5L;
|
||||
INFOPLIST_FILE = "Bitcoin Private/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.btcp.Bitcoin-Private";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = 1;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
EC367BD7205ABC38008FF479 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = 2C24FP5V5L;
|
||||
INFOPLIST_FILE = "Bitcoin PrivateTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.btcp.Bitcoin-PrivateTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Bitcoin Private.app/Bitcoin Private";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
EC367BD8205ABC38008FF479 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
BUNDLE_LOADER = "$(TEST_HOST)";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = 2C24FP5V5L;
|
||||
INFOPLIST_FILE = "Bitcoin PrivateTests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.btcp.Bitcoin-PrivateTests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Bitcoin Private.app/Bitcoin Private";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
EC367BDA205ABC38008FF479 /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = 2C24FP5V5L;
|
||||
INFOPLIST_FILE = "Bitcoin PrivateUITests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.btcp.Bitcoin-PrivateUITests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_TARGET_NAME = "Bitcoin Private";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
EC367BDB205ABC38008FF479 /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
DEVELOPMENT_TEAM = 2C24FP5V5L;
|
||||
INFOPLIST_FILE = "Bitcoin PrivateUITests/Info.plist";
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.btcp.Bitcoin-PrivateUITests";
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
TEST_TARGET_NAME = "Bitcoin Private";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
EC367BA6205ABC37008FF479 /* Build configuration list for PBXProject "Bitcoin Private" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
EC367BD1205ABC38008FF479 /* Debug */,
|
||||
EC367BD2205ABC38008FF479 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
EC367BD3205ABC38008FF479 /* Build configuration list for PBXNativeTarget "Bitcoin Private" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
EC367BD4205ABC38008FF479 /* Debug */,
|
||||
EC367BD5205ABC38008FF479 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
EC367BD6205ABC38008FF479 /* Build configuration list for PBXNativeTarget "Bitcoin PrivateTests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
EC367BD7205ABC38008FF479 /* Debug */,
|
||||
EC367BD8205ABC38008FF479 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
EC367BD9205ABC38008FF479 /* Build configuration list for PBXNativeTarget "Bitcoin PrivateUITests" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
EC367BDA205ABC38008FF479 /* Debug */,
|
||||
EC367BDB205ABC38008FF479 /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = EC367BA3205ABC37008FF479 /* Project object */;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:Bitcoin Private.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -0,0 +1,14 @@
|
|||
<?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>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>Bitcoin Private.xcscheme</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,51 @@
|
|||
//
|
||||
// AppDelegate.swift
|
||||
// Bitcoin Private
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-15.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
|
||||
var window: UIWindow?
|
||||
|
||||
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
|
||||
let launchViewController = LaunchViewController()
|
||||
let launchNavController = AppNavigationController.init(rootViewController: launchViewController)
|
||||
|
||||
window = window ?? UIWindow(frame: CGRect(origin: CGPoint.zero, size: UIScreen.main.bounds.size))
|
||||
window?.rootViewController = launchNavController
|
||||
window?.makeKeyAndVisible()
|
||||
|
||||
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,98 @@
|
|||
{
|
||||
"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"
|
||||
},
|
||||
{
|
||||
"idiom" : "ios-marketing",
|
||||
"size" : "1024x1024",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon--backspace.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon--backspace@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon--backspace@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
},
|
||||
"properties" : {
|
||||
"template-rendering-intent" : "template"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 397 B |
After Width: | Height: | Size: 830 B |
After Width: | Height: | Size: 1.1 KiB |
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "group4.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "group4@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "group4@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 308 B |
After Width: | Height: | Size: 606 B |
After Width: | Height: | Size: 1013 B |
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "close.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "close@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "close@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 196 B |
After Width: | Height: | Size: 317 B |
After Width: | Height: | Size: 466 B |
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "fill2.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "fill2@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "fill2@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 260 B |
After Width: | Height: | Size: 373 B |
After Width: | Height: | Size: 512 B |
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 64 KiB |
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "icon_small@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
After Width: | Height: | Size: 7.0 KiB |
|
@ -0,0 +1,42 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<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">
|
||||
<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>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="zNV-DO-4Lt">
|
||||
<rect key="frame" x="112.5" y="80" width="150" height="150"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="150" id="P88-oS-W9m"/>
|
||||
<constraint firstAttribute="width" constant="150" id="aNT-Qv-92q"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.9882352941176471" green="0.9882352941176471" blue="0.9882352941176471" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="zNV-DO-4Lt" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="aYT-D0-QRq"/>
|
||||
<constraint firstItem="zNV-DO-4Lt" firstAttribute="top" secondItem="6Tk-OE-BBY" secondAttribute="top" constant="60" id="n8V-oo-qmX"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="6Tk-OE-BBY"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -0,0 +1,82 @@
|
|||
//
|
||||
// UIColor+Gradient.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
import UIKit
|
||||
|
||||
extension UIColor {
|
||||
convenience init(_ hex: UInt) {
|
||||
self.init(
|
||||
red: CGFloat((hex & 0xFF0000) >> 16) / 255.0,
|
||||
green: CGFloat((hex & 0x00FF00) >> 8) / 255.0,
|
||||
blue: CGFloat(hex & 0x0000FF) / 255.0,
|
||||
alpha: CGFloat(1.0)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
typealias GradientType = (x: CGPoint, y: CGPoint)
|
||||
|
||||
enum GradientPoint {
|
||||
case leftRight
|
||||
case rightLeft
|
||||
case topBottom
|
||||
case bottomTop
|
||||
case topLeftBottomRight
|
||||
case bottomRightTopLeft
|
||||
case topRightBottomLeft
|
||||
case bottomLeftTopRight
|
||||
|
||||
func draw() -> GradientType {
|
||||
switch self {
|
||||
case .leftRight:
|
||||
return (x: CGPoint(x: 0, y: 0.5), y: CGPoint(x: 1, y: 0.5))
|
||||
case .rightLeft:
|
||||
return (x: CGPoint(x: 1, y: 0.5), y: CGPoint(x: 0, y: 0.5))
|
||||
case .topBottom:
|
||||
return (x: CGPoint(x: 0.5, y: 0), y: CGPoint(x: 0.5, y: 1))
|
||||
case .bottomTop:
|
||||
return (x: CGPoint(x: 0.5, y: 1), y: CGPoint(x: 0.5, y: 0))
|
||||
case .topLeftBottomRight:
|
||||
return (x: CGPoint(x: 0, y: 0), y: CGPoint(x: 1, y: 1))
|
||||
case .bottomRightTopLeft:
|
||||
return (x: CGPoint(x: 1, y: 1), y: CGPoint(x: 0, y: 0))
|
||||
case .topRightBottomLeft:
|
||||
return (x: CGPoint(x: 1, y: 0), y: CGPoint(x: 0, y: 1))
|
||||
case .bottomLeftTopRight:
|
||||
return (x: CGPoint(x: 0, y: 1), y: CGPoint(x: 1, y: 0))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class GradientLayer : CAGradientLayer {
|
||||
var gradient: GradientType? {
|
||||
didSet {
|
||||
startPoint = gradient?.x ?? CGPoint.zero
|
||||
endPoint = gradient?.y ?? CGPoint.zero
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class GradientView: UIView {
|
||||
override public class var layerClass: Swift.AnyClass {
|
||||
get {
|
||||
return GradientLayer.self
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protocol GradientViewProvider {
|
||||
associatedtype GradientViewType
|
||||
}
|
||||
|
||||
extension GradientViewProvider where Self: UIView {
|
||||
var gradientLayer: GradientViewType { return layer as! GradientViewType }
|
||||
}
|
||||
|
||||
extension UIView: GradientViewProvider {
|
||||
typealias GradientViewType = GradientLayer
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
//
|
||||
// UIView+Shake.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-13.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
public extension UIView {
|
||||
func shake(count : Float = 4.0,for duration : TimeInterval = 0.3,withTranslation translation : Float = 10) {
|
||||
let animation : CABasicAnimation = CABasicAnimation(keyPath: "transform.translation.x")
|
||||
animation.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionLinear)
|
||||
animation.repeatCount = count
|
||||
animation.duration = duration/TimeInterval(animation.repeatCount)
|
||||
animation.autoreverses = true
|
||||
animation.byValue = translation
|
||||
layer.add(animation, forKey: "shake")
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
<?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>$(DEVELOPMENT_LANGUAGE)</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>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Scanning QR codes</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// AppNavigationController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-10.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
protocol AccountCreationDelegate: class {
|
||||
func createAccount(mnemonic: String)
|
||||
}
|
||||
|
||||
class AppNavigationController: UINavigationController {
|
||||
weak var accountCreationDelegate: AccountCreationDelegate?
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
navigationBar.isTranslucent = false
|
||||
navigationBar.tintColor = Colors.primaryDark
|
||||
navigationBar.barTintColor = Colors.white
|
||||
navigationBar.titleTextAttributes = [
|
||||
NSAttributedStringKey.foregroundColor : Colors.primaryDark
|
||||
]
|
||||
|
||||
navigationBar.backgroundColor = Colors.white
|
||||
|
||||
}
|
||||
|
||||
func image(fromLayer layer: CALayer) -> UIImage {
|
||||
UIGraphicsBeginImageContext(layer.frame.size)
|
||||
layer.render(in: UIGraphicsGetCurrentContext()!)
|
||||
let outputImage = UIGraphicsGetImageFromCurrentImageContext()
|
||||
UIGraphicsEndImageContext()
|
||||
return outputImage!
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
//
|
||||
// Constants.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
struct Colors {
|
||||
static let primaryDark = UIColor(red: 41.0/255.0, green: 45.0/255.0, blue: 95.0/255.0, alpha: Alphas.opaque)
|
||||
static let primaryDarkTransparent = UIColor(red: 41.0/255.0, green: 45.0/255.0, blue: 95.0/255.0, alpha: Alphas.transparent)
|
||||
static let secondaryDark = UIColor(red: 126.0/255.0, green: 158.0/255.0, blue: 209.0/255.0, alpha: Alphas.opaque)
|
||||
static let secondaryDarkTransparent = UIColor(red: 126.0/255.0, green: 158.0/255.0, blue: 209.0/255.0, alpha: Alphas.transparent)
|
||||
static let lightBackground = UIColor(red: 252.0/255.0, green: 252.0/255.0, blue: 252.0/255.0, alpha: Alphas.opaque)
|
||||
static let darkGray = UIColor(red: 74.0/255.0, green: 74.0/255.0, blue: 74.0/255.0, alpha: Alphas.opaque)
|
||||
static let darkGrayTransparent = UIColor(red: 74.0/255.0, green: 74.0/255.0, blue: 74.0/255.0, alpha: Alphas.opaqueTransparent)
|
||||
static let lightGray = UIColor(red: 216.0/255.0, green: 216.0/255.0, blue: 216.0/255.0, alpha: Alphas.opaque)
|
||||
static let shadowGray = UIColor.lightGray
|
||||
static let black = UIColor.black
|
||||
static let blackTransparent = UIColor(red: 0.0/255.0, green: 0.0/255.0, blue: 0.0/255.0, alpha: Alphas.semiTransparent)
|
||||
static let white = UIColor.white
|
||||
static let whiteTransparent = UIColor(red: 255.0/255.0, green: 255.0/255.0, blue: 255.0/255.0, alpha: Alphas.transparent)
|
||||
}
|
||||
|
||||
public struct Alphas {
|
||||
static let opaque = CGFloat(1)
|
||||
static let opaqueTransparent = CGFloat(0.7)
|
||||
static let semiTransparent = CGFloat(0.5)
|
||||
static let transparent = CGFloat(0.2)
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// NibLoader.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
struct NibLoader<T> {
|
||||
let nibName: String
|
||||
|
||||
func loadView() -> T {
|
||||
return loadView(owner: nil)
|
||||
}
|
||||
|
||||
func loadView(owner: AnyObject?) -> T {
|
||||
let bundle = Bundle.main
|
||||
let views = bundle.loadNibNamed(nibName, owner: owner, options: nil)
|
||||
|
||||
guard let view = views?.first! as? T else {
|
||||
fatalError("Incorrect view type provided")
|
||||
}
|
||||
|
||||
return view
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
//
|
||||
// LaunchViewController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class LaunchViewController: UIViewController {
|
||||
|
||||
@IBOutlet var activityIndicator: UIActivityIndicatorView!
|
||||
@IBOutlet var createWalletButton: UIButton!
|
||||
@IBOutlet var importWalletButton: UIButton!
|
||||
@IBOutlet var logoImageView: UIImageView!
|
||||
|
||||
@IBAction func createNewWallet() {
|
||||
let mnemonicViewController = MnemonicViewController()
|
||||
let navigationController = AppNavigationController(rootViewController: mnemonicViewController)
|
||||
navigationController.accountCreationDelegate = self
|
||||
|
||||
present(navigationController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@IBAction func importWallet() {
|
||||
let verificationViewController = VerificationViewController(type: .recovery, mnemonic: "")
|
||||
let navigationController = AppNavigationController(rootViewController: verificationViewController)
|
||||
navigationController.accountCreationDelegate = self
|
||||
|
||||
present(navigationController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
init() {
|
||||
super.init(nibName: String(describing: LaunchViewController.self), bundle: nil)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
override func viewDidDisappear(_ animated: Bool) {
|
||||
super.viewDidDisappear(animated)
|
||||
|
||||
showButtons()
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
UIApplication.shared.statusBarStyle = .default
|
||||
|
||||
navigationController?.isNavigationBarHidden = true
|
||||
|
||||
logoImageView.image = UIImage(named: "icon")
|
||||
|
||||
createWalletButton.backgroundColor = Colors.primaryDark
|
||||
createWalletButton.setTitleColor(Colors.white, for: .normal)
|
||||
importWalletButton.backgroundColor = Colors.secondaryDark
|
||||
importWalletButton.setTitleColor(Colors.white, for: .normal)
|
||||
view.backgroundColor = Colors.lightBackground
|
||||
//view.gradientLayer.colors = [Colors.primaryDark.cgColor, Colors.secondaryDark.cgColor]
|
||||
//view.gradientLayer.gradient = GradientPoint.topBottom.draw()
|
||||
}
|
||||
|
||||
func hideButtons() {
|
||||
activityIndicator.startAnimating()
|
||||
createWalletButton.isHidden = true
|
||||
importWalletButton.isHidden = true
|
||||
}
|
||||
|
||||
func showButtons() {
|
||||
activityIndicator.stopAnimating()
|
||||
createWalletButton.isHidden = false
|
||||
importWalletButton.isHidden = false
|
||||
}
|
||||
|
||||
func displayWallet() {
|
||||
let walletViewController = WalletViewController()
|
||||
|
||||
navigationController?.pushViewController(walletViewController, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
extension LaunchViewController: AccountCreationDelegate {
|
||||
func createAccount(mnemonic: String) {
|
||||
hideButtons()
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.5) {
|
||||
self.displayWallet()
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="LaunchViewController" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="activityIndicator" destination="KRB-PD-VuD" id="S7h-RN-J92"/>
|
||||
<outlet property="createWalletButton" destination="Iu9-BF-NQZ" id="VpI-ed-amT"/>
|
||||
<outlet property="importWalletButton" destination="Ed6-UL-GyE" id="w33-s2-50d"/>
|
||||
<outlet property="logoImageView" destination="rLc-FU-2VD" id="9gQ-SS-lI2"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT" customClass="GradientView" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ed6-UL-GyE">
|
||||
<rect key="frame" x="16" y="582" width="343" height="65"/>
|
||||
<color key="backgroundColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="65" id="ARM-Gs-U4J"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
<state key="normal" title="Import wallet">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="importWallet" destination="-1" eventType="touchUpInside" id="87m-kI-yuJ"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Iu9-BF-NQZ">
|
||||
<rect key="frame" x="16" y="507" width="343" height="65"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="65" id="Dif-YE-ESq"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
<state key="normal" title="Create a new wallet">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="createNewWallet" destination="-1" eventType="touchUpInside" id="ZCv-qu-MSC"/>
|
||||
</connections>
|
||||
</button>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="rLc-FU-2VD">
|
||||
<rect key="frame" x="112.5" y="80" width="150" height="150"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="150" id="kEV-gm-MB6"/>
|
||||
<constraint firstAttribute="width" constant="150" id="kGx-fl-c1X"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="KRB-PD-VuD">
|
||||
<rect key="frame" x="177" y="323" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="cJl-4c-1zP"/>
|
||||
<constraint firstAttribute="height" constant="20" id="hNk-Ez-aEa"/>
|
||||
</constraints>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.92143100499999997" green="0.92145264149999995" blue="0.92144101860000005" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Ed6-UL-GyE" firstAttribute="top" secondItem="Iu9-BF-NQZ" secondAttribute="bottom" constant="10" id="2KP-LW-9H6"/>
|
||||
<constraint firstItem="Ed6-UL-GyE" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="16" id="4nA-vs-a0F"/>
|
||||
<constraint firstItem="Iu9-BF-NQZ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="16" id="6tN-Pb-Rr4"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Ed6-UL-GyE" secondAttribute="trailing" constant="16" id="8jw-s9-wQp"/>
|
||||
<constraint firstItem="rLc-FU-2VD" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="60" id="90T-7y-Z7k"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="Iu9-BF-NQZ" secondAttribute="trailing" constant="16" id="Aml-YW-3e0"/>
|
||||
<constraint firstItem="KRB-PD-VuD" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="DYc-y5-cYX"/>
|
||||
<constraint firstItem="KRB-PD-VuD" firstAttribute="centerY" secondItem="i5M-Pr-FkT" secondAttribute="centerY" id="htJ-et-xG6"/>
|
||||
<constraint firstItem="rLc-FU-2VD" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="nov-Vi-r85"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="Ed6-UL-GyE" secondAttribute="bottom" constant="20" id="vkP-dl-CBV"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||
<point key="canvasLocation" x="-25.5" y="30.5"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,100 @@
|
|||
//
|
||||
// ReceiveViewController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-10.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ReceiveViewController: UIViewController {
|
||||
|
||||
@IBOutlet var activityIndicator: UIActivityIndicatorView!
|
||||
@IBOutlet var addressLabel: UILabel!
|
||||
@IBOutlet var addressTitleLabel: UILabel!
|
||||
@IBOutlet var addressHolderView: UIView!
|
||||
@IBOutlet var imageViewHolder: UIView!
|
||||
@IBOutlet var imageView: UIImageView!
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
var address: String = ""
|
||||
|
||||
@IBAction func copyAddress() {
|
||||
if let addressText = addressLabel.text, !addressText.isEmpty {
|
||||
UIPasteboard.general.string = addressLabel.text
|
||||
|
||||
let alert = UIAlertController(title: "Your wallet address has been successfully copied.", message: nil, preferredStyle: UIAlertControllerStyle.alert)
|
||||
alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.default, handler: nil))
|
||||
self.present(alert, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
init(address: String) {
|
||||
super.init(nibName: String(describing: ReceiveViewController.self), bundle: nil)
|
||||
|
||||
self.address = address
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
override func viewDidAppear(_ animated: Bool) {
|
||||
super.viewDidAppear(animated)
|
||||
|
||||
displayGeneratedAddress(value: address)
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
navigationItem.title = "My Wallet"
|
||||
|
||||
let image = UIImage(named:"close")
|
||||
let leftBarButtonItem = UIBarButtonItem(image: image, style: .plain, target: self, action: #selector(self.dismissView))
|
||||
navigationItem.leftBarButtonItem = leftBarButtonItem
|
||||
|
||||
imageViewHolder.layer.shadowColor = Colors.shadowGray.cgColor
|
||||
imageViewHolder.layer.shadowOpacity = Float(Alphas.transparent)
|
||||
imageViewHolder.layer.shadowOffset = CGSize(width: 0.0, height: 3.0)
|
||||
imageViewHolder.layer.shadowRadius = 4.0
|
||||
|
||||
addressLabel.textColor = Colors.darkGray
|
||||
addressTitleLabel.textColor = Colors.darkGrayTransparent
|
||||
addressHolderView.backgroundColor = Colors.lightBackground
|
||||
view.backgroundColor = Colors.lightBackground
|
||||
|
||||
addressLabel.text = address
|
||||
}
|
||||
|
||||
@objc func dismissView() {
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
func displayGeneratedAddress(value: String) {
|
||||
let data = value.data(using: String.Encoding.isoLatin1, allowLossyConversion: false)
|
||||
|
||||
let filter = CIFilter(name: "CIQRCodeGenerator")
|
||||
filter?.setValue(data, forKey: "inputMessage")
|
||||
filter?.setValue("H", forKey: "inputCorrectionLevel")
|
||||
|
||||
let colorFilter = CIFilter(name: "CIFalseColor")
|
||||
colorFilter?.setValue(filter?.outputImage, forKey: "inputImage")
|
||||
colorFilter?.setValue(CIColor.init(cgColor: Colors.white.cgColor), forKey: "inputColor1")
|
||||
colorFilter?.setValue(CIColor.init(cgColor: Colors.primaryDark.cgColor), forKey: "inputColor0")
|
||||
|
||||
let qrcodeImage = colorFilter?.outputImage
|
||||
let scaleX = imageView.frame.size.width / (qrcodeImage?.extent.size.width)!
|
||||
let scaleY = imageView.frame.size.height / (qrcodeImage?.extent.size.height)!
|
||||
let transformedImage = qrcodeImage?.transformed(by: CGAffineTransform(scaleX: scaleX, y: scaleY))
|
||||
|
||||
activityIndicator.stopAnimating()
|
||||
|
||||
imageView.image = UIImage(ciImage: transformedImage!)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,149 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ReceiveViewController" customModule="BlockEQ" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="activityIndicator" destination="bjz-oS-tom" id="McN-o5-NqE"/>
|
||||
<outlet property="addressHolderView" destination="5ar-oz-2Ei" id="uBJ-X9-zRx"/>
|
||||
<outlet property="addressLabel" destination="sUN-Od-Usi" id="p7d-o1-MT4"/>
|
||||
<outlet property="addressTitleLabel" destination="MHU-W2-3oX" id="nfG-H3-IeP"/>
|
||||
<outlet property="imageView" destination="Mnj-jT-lJl" id="1yM-Rx-ODq"/>
|
||||
<outlet property="imageViewHolder" destination="TUt-2r-cI6" id="eIM-bd-qAp"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8BT-SG-t5h">
|
||||
<rect key="frame" x="0.0" y="370" width="375" height="297"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tjK-XN-Gil">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="1"/>
|
||||
<color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="0DD-Pf-vl2"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="YOUR WALLET ADDRESS" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MHU-W2-3oX">
|
||||
<rect key="frame" x="14" y="21" width="347" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="liC-YT-ckm"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5ar-oz-2Ei">
|
||||
<rect key="frame" x="16" y="61" width="343" height="50"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="JZf-Gh-vdh" customClass="AppButton" customModule="BlockEQ" customModuleProvider="target">
|
||||
<rect key="frame" x="293" y="0.0" width="50" height="50"/>
|
||||
<color key="backgroundColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="Bvl-12-LCW"/>
|
||||
<constraint firstAttribute="width" constant="50" id="DOl-VB-ngw"/>
|
||||
</constraints>
|
||||
<state key="normal" image="copy"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="copyAddress" destination="-1" eventType="touchUpInside" id="p8g-On-qx9"/>
|
||||
</connections>
|
||||
</button>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sUN-Od-Usi">
|
||||
<rect key="frame" x="18" y="0.0" width="261" height="50"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="JZf-Gh-vdh" secondAttribute="trailing" id="CbG-av-IlR"/>
|
||||
<constraint firstItem="JZf-Gh-vdh" firstAttribute="top" secondItem="5ar-oz-2Ei" secondAttribute="top" id="JLT-Rs-iOf"/>
|
||||
<constraint firstItem="sUN-Od-Usi" firstAttribute="top" secondItem="5ar-oz-2Ei" secondAttribute="top" id="TuG-WS-iTy"/>
|
||||
<constraint firstItem="sUN-Od-Usi" firstAttribute="leading" secondItem="5ar-oz-2Ei" secondAttribute="leading" constant="18" id="Y6U-PB-MTX"/>
|
||||
<constraint firstAttribute="bottom" secondItem="sUN-Od-Usi" secondAttribute="bottom" id="fc4-iB-jzN"/>
|
||||
<constraint firstAttribute="bottom" secondItem="JZf-Gh-vdh" secondAttribute="bottom" id="gzM-do-dCP"/>
|
||||
<constraint firstItem="JZf-Gh-vdh" firstAttribute="leading" secondItem="sUN-Od-Usi" secondAttribute="trailing" constant="14" id="ok4-nE-0J1"/>
|
||||
<constraint firstAttribute="height" constant="50" id="wYY-yq-HAr"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="30"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="5ar-oz-2Ei" secondAttribute="trailing" constant="16" id="Ceq-pw-Pgf"/>
|
||||
<constraint firstItem="5ar-oz-2Ei" firstAttribute="leading" secondItem="8BT-SG-t5h" secondAttribute="leading" constant="16" id="Hsb-2n-z5Y"/>
|
||||
<constraint firstItem="MHU-W2-3oX" firstAttribute="top" secondItem="tjK-XN-Gil" secondAttribute="bottom" constant="20" id="MlL-uV-JJo"/>
|
||||
<constraint firstItem="5ar-oz-2Ei" firstAttribute="top" secondItem="MHU-W2-3oX" secondAttribute="bottom" constant="20" id="epY-uA-SBq"/>
|
||||
<constraint firstItem="MHU-W2-3oX" firstAttribute="leading" secondItem="8BT-SG-t5h" secondAttribute="leading" constant="14" id="iHl-QL-kCc"/>
|
||||
<constraint firstAttribute="trailing" secondItem="tjK-XN-Gil" secondAttribute="trailing" id="ioi-i1-bet"/>
|
||||
<constraint firstItem="tjK-XN-Gil" firstAttribute="leading" secondItem="8BT-SG-t5h" secondAttribute="leading" id="k2g-7r-GZM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="MHU-W2-3oX" secondAttribute="trailing" constant="14" id="ndR-IH-aTE"/>
|
||||
<constraint firstItem="tjK-XN-Gil" firstAttribute="top" secondItem="8BT-SG-t5h" secondAttribute="top" id="sx2-9K-wEA"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="TUt-2r-cI6">
|
||||
<rect key="frame" x="72" y="80" width="230" height="230"/>
|
||||
<subviews>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Mnj-jT-lJl">
|
||||
<rect key="frame" x="20" y="20" width="190" height="190"/>
|
||||
</imageView>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="bjz-oS-tom">
|
||||
<rect key="frame" x="105" y="105" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="Snx-9Y-hfO"/>
|
||||
<constraint firstAttribute="width" constant="20" id="UeP-ek-Rnk"/>
|
||||
</constraints>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="bjz-oS-tom" firstAttribute="centerX" secondItem="TUt-2r-cI6" secondAttribute="centerX" id="02X-jG-zg5"/>
|
||||
<constraint firstAttribute="height" constant="230" id="3Lg-eS-qqW"/>
|
||||
<constraint firstAttribute="width" constant="230" id="IP4-co-mkQ"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Mnj-jT-lJl" secondAttribute="bottom" constant="20" id="J4t-jj-We8"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Mnj-jT-lJl" secondAttribute="trailing" constant="20" id="ipL-uX-HkG"/>
|
||||
<constraint firstItem="Mnj-jT-lJl" firstAttribute="top" secondItem="TUt-2r-cI6" secondAttribute="top" constant="20" id="npp-ZF-kA8"/>
|
||||
<constraint firstItem="Mnj-jT-lJl" firstAttribute="leading" secondItem="TUt-2r-cI6" secondAttribute="leading" constant="20" id="p5g-KE-4Xg"/>
|
||||
<constraint firstItem="bjz-oS-tom" firstAttribute="centerY" secondItem="TUt-2r-cI6" secondAttribute="centerY" id="w5V-rY-Kav"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="TUt-2r-cI6" firstAttribute="centerX" secondItem="i5M-Pr-FkT" secondAttribute="centerX" id="3UT-NE-dhd"/>
|
||||
<constraint firstItem="8BT-SG-t5h" firstAttribute="bottom" secondItem="i5M-Pr-FkT" secondAttribute="bottom" id="GXW-C4-1RC"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="8BT-SG-t5h" secondAttribute="trailing" id="aKk-4M-Ft6"/>
|
||||
<constraint firstItem="TUt-2r-cI6" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" priority="999" constant="60" id="bWL-oa-RJU"/>
|
||||
<constraint firstItem="8BT-SG-t5h" firstAttribute="top" secondItem="TUt-2r-cI6" secondAttribute="bottom" priority="999" constant="60" id="hIQ-8G-800"/>
|
||||
<constraint firstItem="8BT-SG-t5h" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="vED-YQ-ops"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||
<point key="canvasLocation" x="33.5" y="54.5"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="copy" width="14" height="16"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -0,0 +1,129 @@
|
|||
//
|
||||
// ScanViewController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-11.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import AVFoundation
|
||||
import UIKit
|
||||
|
||||
protocol ScanViewControllerDelegate: class {
|
||||
func setQR(value: String)
|
||||
}
|
||||
|
||||
class ScanViewController: UIViewController {
|
||||
var captureSession = AVCaptureSession()
|
||||
var videoPreviewLayer: AVCaptureVideoPreviewLayer?
|
||||
var qrCodeFrameView: UIView?
|
||||
|
||||
weak var delegate: ScanViewControllerDelegate?
|
||||
|
||||
private let supportedCodeTypes = [AVMetadataObject.ObjectType.upce,
|
||||
AVMetadataObject.ObjectType.code39,
|
||||
AVMetadataObject.ObjectType.code39Mod43,
|
||||
AVMetadataObject.ObjectType.code93,
|
||||
AVMetadataObject.ObjectType.code128,
|
||||
AVMetadataObject.ObjectType.ean8,
|
||||
AVMetadataObject.ObjectType.ean13,
|
||||
AVMetadataObject.ObjectType.aztec,
|
||||
AVMetadataObject.ObjectType.pdf417,
|
||||
AVMetadataObject.ObjectType.itf14,
|
||||
AVMetadataObject.ObjectType.dataMatrix,
|
||||
AVMetadataObject.ObjectType.interleaved2of5,
|
||||
AVMetadataObject.ObjectType.qr]
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
init() {
|
||||
super.init(nibName: String(describing: ScanViewController.self), bundle: nil)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
setupCamera()
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
navigationItem.title = "Scanning..."
|
||||
|
||||
let image = UIImage(named:"close")
|
||||
let leftBarButtonItem = UIBarButtonItem(image: image, style: .plain, target: self, action: #selector(self.dismissView))
|
||||
navigationItem.leftBarButtonItem = leftBarButtonItem
|
||||
|
||||
view.backgroundColor = Colors.primaryDark
|
||||
}
|
||||
|
||||
@objc func dismissView() {
|
||||
captureSession.stopRunning()
|
||||
videoPreviewLayer?.removeFromSuperlayer()
|
||||
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
func setupCamera() {
|
||||
let deviceDiscoverySession = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInDualCamera, .builtInWideAngleCamera], mediaType: AVMediaType.video, position: .back)
|
||||
|
||||
guard let captureDevice = deviceDiscoverySession.devices.first else {
|
||||
print("No Camera Found.")
|
||||
return
|
||||
}
|
||||
|
||||
do {
|
||||
let input = try AVCaptureDeviceInput(device: captureDevice)
|
||||
captureSession.addInput(input)
|
||||
|
||||
let captureMetadataOutput = AVCaptureMetadataOutput()
|
||||
captureSession.addOutput(captureMetadataOutput)
|
||||
captureMetadataOutput.setMetadataObjectsDelegate(self, queue: DispatchQueue.main)
|
||||
captureMetadataOutput.metadataObjectTypes = supportedCodeTypes
|
||||
} catch {
|
||||
print(error)
|
||||
return
|
||||
}
|
||||
|
||||
videoPreviewLayer = AVCaptureVideoPreviewLayer(session: captureSession)
|
||||
videoPreviewLayer?.videoGravity = AVLayerVideoGravity.resizeAspectFill
|
||||
videoPreviewLayer?.frame = view.layer.bounds
|
||||
view.layer.addSublayer(videoPreviewLayer!)
|
||||
|
||||
captureSession.startRunning()
|
||||
|
||||
qrCodeFrameView = UIView()
|
||||
|
||||
if let qrCodeFrameView = qrCodeFrameView {
|
||||
qrCodeFrameView.layer.borderColor = Colors.primaryDark.cgColor
|
||||
qrCodeFrameView.layer.borderWidth = 3.0
|
||||
view.addSubview(qrCodeFrameView)
|
||||
view.bringSubview(toFront: qrCodeFrameView)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
extension ScanViewController: AVCaptureMetadataOutputObjectsDelegate {
|
||||
func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) {
|
||||
if metadataObjects.count == 0 {
|
||||
qrCodeFrameView?.frame = CGRect.zero
|
||||
return
|
||||
}
|
||||
|
||||
let metadataObj = metadataObjects[0] as! AVMetadataMachineReadableCodeObject
|
||||
|
||||
if supportedCodeTypes.contains(metadataObj.type) {
|
||||
let barCodeObject = videoPreviewLayer?.transformedMetadataObject(for: metadataObj)
|
||||
qrCodeFrameView?.frame = barCodeObject!.bounds
|
||||
|
||||
if let qrValue = metadataObj.stringValue {
|
||||
delegate?.setQR(value: qrValue)
|
||||
|
||||
navigationItem.title = "Valid QR Code Found"
|
||||
perform(#selector(self.dismissView), with: nil, afterDelay: 0.8)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13142" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12042"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ScanViewController" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,120 @@
|
|||
//
|
||||
// SendAmountViewController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-10.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class SendAmountViewController: UIViewController {
|
||||
|
||||
@IBOutlet var activityIndicator: UIActivityIndicatorView!
|
||||
@IBOutlet var amountLabel: UILabel!
|
||||
@IBOutlet var currencyLabel: UILabel!
|
||||
@IBOutlet var indicatorView: UIView!
|
||||
@IBOutlet var indicatorTitle: UILabel!
|
||||
@IBOutlet var keyboardHolderView: UIView!
|
||||
@IBOutlet var keyboardPad1: UIButton!
|
||||
@IBOutlet var keyboardPad2: UIButton!
|
||||
@IBOutlet var keyboardPad3: UIButton!
|
||||
@IBOutlet var keyboardPad4: UIButton!
|
||||
@IBOutlet var keyboardPad5: UIButton!
|
||||
@IBOutlet var keyboardPad6: UIButton!
|
||||
@IBOutlet var keyboardPad7: UIButton!
|
||||
@IBOutlet var keyboardPad8: UIButton!
|
||||
@IBOutlet var keyboardPad9: UIButton!
|
||||
@IBOutlet var keyboardPadDot: UIButton!
|
||||
@IBOutlet var keyboardPad0: UIButton!
|
||||
@IBOutlet var keyboardPadBackspace: UIButton!
|
||||
@IBOutlet var sendAddressLabel: UILabel!
|
||||
|
||||
var keyboardPads: [UIButton]!
|
||||
var receiver: String = ""
|
||||
var sendingAmount: String = ""
|
||||
|
||||
@IBAction func sendPayment() {
|
||||
guard let amount = amountLabel.text, !amount.isEmpty, amount != "0" else {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func keyboardTapped(sender: UIButton) {
|
||||
let keyboardPad = keyboardPads[sender.tag]
|
||||
if keyboardPad == keyboardPadBackspace {
|
||||
if sendingAmount.count > 1 {
|
||||
sendingAmount.remove(at: sendingAmount.index(before: sendingAmount.endIndex))
|
||||
} else {
|
||||
sendingAmount = ""
|
||||
}
|
||||
} else if keyboardPad == keyboardPadDot {
|
||||
if sendingAmount.count == 0 {
|
||||
sendingAmount += "0."
|
||||
} else if sendingAmount.range(of:".") == nil {
|
||||
sendingAmount += "."
|
||||
}
|
||||
} else {
|
||||
if sendingAmount.count == 0 && sender.tag == 0 {
|
||||
sendingAmount = ""
|
||||
} else {
|
||||
sendingAmount += String(sender.tag)
|
||||
}
|
||||
}
|
||||
|
||||
amountLabel.text = sendingAmount.count > 0 ? sendingAmount : "0"
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
init(reciever: String) {
|
||||
super.init(nibName: String(describing: SendAmountViewController.self), bundle: nil)
|
||||
|
||||
self.receiver = reciever
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
navigationItem.title = "My Wallet"
|
||||
|
||||
let image = UIImage(named:"close")
|
||||
let rightBarButtonItem = UIBarButtonItem(image: image, style: .plain, target: self, action: #selector(self.dismissView))
|
||||
navigationItem.rightBarButtonItem = rightBarButtonItem
|
||||
|
||||
indicatorView.isHidden = true
|
||||
|
||||
activityIndicator.tintColor = Colors.darkGray
|
||||
indicatorTitle.textColor = Colors.darkGray
|
||||
sendAddressLabel.textColor = Colors.darkGray
|
||||
amountLabel.textColor = Colors.primaryDark
|
||||
currencyLabel.textColor = Colors.darkGrayTransparent
|
||||
keyboardHolderView.backgroundColor = Colors.lightBackground
|
||||
view.backgroundColor = Colors.primaryDark
|
||||
|
||||
sendAddressLabel.text = "To: \(receiver)"
|
||||
|
||||
keyboardPads = [keyboardPad0, keyboardPad1, keyboardPad2, keyboardPad3, keyboardPad4, keyboardPad5, keyboardPad6, keyboardPad7, keyboardPad8, keyboardPad9, keyboardPadDot, keyboardPadBackspace]
|
||||
|
||||
for (index, keyboardPad) in keyboardPads.enumerated() {
|
||||
keyboardPad.tintColor = Colors.primaryDark
|
||||
keyboardPad.setTitleColor(Colors.primaryDark, for: .normal)
|
||||
keyboardPad.backgroundColor = Colors.lightBackground
|
||||
keyboardPad.tag = index
|
||||
}
|
||||
}
|
||||
|
||||
@objc func dismissView() {
|
||||
view.endEditing(true)
|
||||
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,361 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SendAmountViewController" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="activityIndicator" destination="JOk-TW-ivb" id="S0Y-gi-43o"/>
|
||||
<outlet property="amountLabel" destination="idT-6f-LxP" id="Vvu-pm-Z7i"/>
|
||||
<outlet property="currencyLabel" destination="RQc-ir-UP8" id="x0X-t5-hYd"/>
|
||||
<outlet property="indicatorTitle" destination="6Dv-X5-4AL" id="Rvf-9k-dYK"/>
|
||||
<outlet property="indicatorView" destination="20p-6g-6PR" id="dRF-7j-q3G"/>
|
||||
<outlet property="keyboardHolderView" destination="BJS-CT-fsj" id="PMD-sb-6M0"/>
|
||||
<outlet property="keyboardPad0" destination="b5t-XX-9C1" id="A7n-Rr-qZK"/>
|
||||
<outlet property="keyboardPad1" destination="SjD-E6-kbK" id="szs-Xa-64f"/>
|
||||
<outlet property="keyboardPad2" destination="Ayb-t5-fJn" id="e22-gE-DEK"/>
|
||||
<outlet property="keyboardPad3" destination="pfa-EX-bIM" id="4Kf-0u-Lzt"/>
|
||||
<outlet property="keyboardPad4" destination="ncK-6g-dKM" id="HAT-Mx-TzP"/>
|
||||
<outlet property="keyboardPad5" destination="vqk-rt-XuN" id="Cpy-w4-KiI"/>
|
||||
<outlet property="keyboardPad6" destination="rca-2I-WcN" id="BPB-ZZ-xwa"/>
|
||||
<outlet property="keyboardPad7" destination="N0d-aC-tAR" id="Jb5-RI-1mX"/>
|
||||
<outlet property="keyboardPad8" destination="rb6-Ei-lp5" id="r3u-ei-N98"/>
|
||||
<outlet property="keyboardPad9" destination="ulY-K0-3tY" id="dki-U1-B9S"/>
|
||||
<outlet property="keyboardPadBackspace" destination="Fmh-KX-UJh" id="sku-4V-CF0"/>
|
||||
<outlet property="keyboardPadDot" destination="Mbs-jF-S6q" id="za1-cD-XyY"/>
|
||||
<outlet property="sendAddressLabel" destination="E8P-Ic-nQM" id="3Uc-oM-tt2"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="oO2-oC-t30">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="65"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ST9-Nb-tI1">
|
||||
<rect key="frame" x="0.0" y="64" width="375" height="1"/>
|
||||
<color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="nzp-ZR-hza"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="E8P-Ic-nQM">
|
||||
<rect key="frame" x="16" y="0.0" width="343" height="64"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="ST9-Nb-tI1" secondAttribute="bottom" id="5cE-pF-ZE3"/>
|
||||
<constraint firstItem="E8P-Ic-nQM" firstAttribute="top" secondItem="oO2-oC-t30" secondAttribute="top" id="CJC-ys-fDM"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ST9-Nb-tI1" secondAttribute="trailing" id="JpR-Cv-nXp"/>
|
||||
<constraint firstItem="ST9-Nb-tI1" firstAttribute="top" secondItem="E8P-Ic-nQM" secondAttribute="bottom" id="N2X-3J-L8y"/>
|
||||
<constraint firstItem="ST9-Nb-tI1" firstAttribute="leading" secondItem="oO2-oC-t30" secondAttribute="leading" id="guO-as-aNF"/>
|
||||
<constraint firstAttribute="trailing" secondItem="E8P-Ic-nQM" secondAttribute="trailing" constant="16" id="kuK-VD-FPq"/>
|
||||
<constraint firstAttribute="height" constant="65" id="qqE-s1-74j"/>
|
||||
<constraint firstItem="E8P-Ic-nQM" firstAttribute="leading" secondItem="oO2-oC-t30" secondAttribute="leading" constant="16" id="uu6-sO-4Fg"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ltM-8T-Caw">
|
||||
<rect key="frame" x="0.0" y="65" width="375" height="119"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ILa-ss-X6g">
|
||||
<rect key="frame" x="0.0" y="118" width="375" height="1"/>
|
||||
<color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="slo-dx-0yq"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="idT-6f-LxP">
|
||||
<rect key="frame" x="16" y="24" width="343" height="37"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="37" id="gKA-2a-7zO"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="36"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BTCP" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RQc-ir-UP8">
|
||||
<rect key="frame" x="16" y="78" width="343" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="HnR-Kl-cE3"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="ILa-ss-X6g" firstAttribute="leading" secondItem="ltM-8T-Caw" secondAttribute="leading" id="2k6-QN-ZCd"/>
|
||||
<constraint firstAttribute="trailing" secondItem="idT-6f-LxP" secondAttribute="trailing" constant="16" id="JWm-6A-qI4"/>
|
||||
<constraint firstItem="RQc-ir-UP8" firstAttribute="leading" secondItem="ltM-8T-Caw" secondAttribute="leading" constant="16" id="RHf-Rz-87p"/>
|
||||
<constraint firstItem="RQc-ir-UP8" firstAttribute="top" secondItem="idT-6f-LxP" secondAttribute="bottom" constant="17" id="bGA-IC-Ywn"/>
|
||||
<constraint firstItem="idT-6f-LxP" firstAttribute="leading" secondItem="ltM-8T-Caw" secondAttribute="leading" constant="16" id="cIC-e3-2Ip"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ILa-ss-X6g" secondAttribute="trailing" id="cvU-Ai-7TV"/>
|
||||
<constraint firstAttribute="trailing" secondItem="RQc-ir-UP8" secondAttribute="trailing" constant="16" id="gYG-rh-wpP"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ILa-ss-X6g" secondAttribute="bottom" id="qi8-9T-3TE"/>
|
||||
<constraint firstAttribute="height" constant="119" id="ye3-9G-K2w"/>
|
||||
<constraint firstItem="idT-6f-LxP" firstAttribute="top" secondItem="ltM-8T-Caw" secondAttribute="top" constant="24" id="zHZ-M0-6z1"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BJS-CT-fsj">
|
||||
<rect key="frame" x="0.0" y="184" width="375" height="433"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="fu5-0k-wWM">
|
||||
<rect key="frame" x="20" y="10" width="335" height="413"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="SjD-E6-kbK">
|
||||
<rect key="frame" x="0.0" y="0.0" width="111.5" height="103.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
|
||||
<state key="normal" title="1"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="6IP-HG-wMK"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="pfa-EX-bIM">
|
||||
<rect key="frame" x="223" y="0.0" width="111.5" height="103.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
|
||||
<state key="normal" title="3"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="61w-w1-bfi"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="N0d-aC-tAR">
|
||||
<rect key="frame" x="0.0" y="207" width="111.5" height="103"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
|
||||
<state key="normal" title="7"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="NJ6-me-6RD"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b5t-XX-9C1">
|
||||
<rect key="frame" x="111.5" y="310.5" width="112" height="103.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
|
||||
<state key="normal" title="0"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="pkH-Vg-l91"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ulY-K0-3tY">
|
||||
<rect key="frame" x="223.5" y="207" width="111.5" height="103.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
|
||||
<state key="normal" title="9"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="LEF-p3-x9b"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vqk-rt-XuN">
|
||||
<rect key="frame" x="111.5" y="103.5" width="112" height="103.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
|
||||
<state key="normal" title="5"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="agU-KE-aMh"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ayb-t5-fJn">
|
||||
<rect key="frame" x="111.5" y="0.0" width="112" height="103.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
|
||||
<state key="normal" title="2"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="UyQ-SW-NuT"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ncK-6g-dKM">
|
||||
<rect key="frame" x="0.0" y="103.5" width="111.5" height="103.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
|
||||
<state key="normal" title="4"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="Txg-25-K2s"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rb6-Ei-lp5">
|
||||
<rect key="frame" x="111.5" y="207" width="112" height="103.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
|
||||
<state key="normal" title="8"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="lMF-jI-zHB"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="rca-2I-WcN">
|
||||
<rect key="frame" x="223.5" y="103.5" width="111.5" height="103.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="24"/>
|
||||
<state key="normal" title="6"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="V6T-gm-5HG"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mbs-jF-S6q">
|
||||
<rect key="frame" x="0.0" y="310" width="111.5" height="103"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="black" pointSize="24"/>
|
||||
<state key="normal" title="."/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="kcY-zb-Aq2"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Fmh-KX-UJh">
|
||||
<rect key="frame" x="223.5" y="310.5" width="111.5" height="103.5"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<state key="normal" image="backspace"/>
|
||||
<connections>
|
||||
<action selector="keyboardTappedWithSender:" destination="-1" eventType="touchUpInside" id="eCK-LR-fDO"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Fmh-KX-UJh" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="0kP-Sz-vQN"/>
|
||||
<constraint firstItem="b5t-XX-9C1" firstAttribute="top" secondItem="rb6-Ei-lp5" secondAttribute="bottom" id="1To-Tk-eKX"/>
|
||||
<constraint firstItem="N0d-aC-tAR" firstAttribute="top" secondItem="ncK-6g-dKM" secondAttribute="bottom" id="4Jl-yt-Ywg"/>
|
||||
<constraint firstItem="Fmh-KX-UJh" firstAttribute="leading" secondItem="b5t-XX-9C1" secondAttribute="trailing" id="7rI-mj-4yz"/>
|
||||
<constraint firstItem="rca-2I-WcN" firstAttribute="trailing" secondItem="fu5-0k-wWM" secondAttribute="trailing" id="8Uh-JF-m51"/>
|
||||
<constraint firstItem="Fmh-KX-UJh" firstAttribute="top" secondItem="ulY-K0-3tY" secondAttribute="bottom" id="932-gW-oYW"/>
|
||||
<constraint firstItem="Ayb-t5-fJn" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="Azq-Yc-rJC"/>
|
||||
<constraint firstItem="N0d-aC-tAR" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="BcE-uY-fKy"/>
|
||||
<constraint firstItem="ncK-6g-dKM" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="D4W-HH-Xiw"/>
|
||||
<constraint firstItem="b5t-XX-9C1" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="DIa-J9-jnf"/>
|
||||
<constraint firstItem="pfa-EX-bIM" firstAttribute="trailing" secondItem="fu5-0k-wWM" secondAttribute="trailing" id="EVd-EC-qMZ"/>
|
||||
<constraint firstItem="Mbs-jF-S6q" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="HKj-eT-uVe"/>
|
||||
<constraint firstItem="pfa-EX-bIM" firstAttribute="top" secondItem="fu5-0k-wWM" secondAttribute="top" id="HWY-Jg-pGk"/>
|
||||
<constraint firstItem="vqk-rt-XuN" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="IF7-uo-fYA"/>
|
||||
<constraint firstItem="N0d-aC-tAR" firstAttribute="leading" secondItem="fu5-0k-wWM" secondAttribute="leading" id="LqP-uL-DHk"/>
|
||||
<constraint firstItem="rb6-Ei-lp5" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="NRR-r0-e6c"/>
|
||||
<constraint firstItem="vqk-rt-XuN" firstAttribute="top" secondItem="Ayb-t5-fJn" secondAttribute="bottom" id="PC1-kU-ymL"/>
|
||||
<constraint firstItem="vqk-rt-XuN" firstAttribute="leading" secondItem="ncK-6g-dKM" secondAttribute="trailing" id="Pio-EZ-QQl"/>
|
||||
<constraint firstItem="ulY-K0-3tY" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="QdF-d2-W0Z"/>
|
||||
<constraint firstItem="SjD-E6-kbK" firstAttribute="top" secondItem="fu5-0k-wWM" secondAttribute="top" id="QiZ-ft-5k5"/>
|
||||
<constraint firstItem="ncK-6g-dKM" firstAttribute="top" secondItem="SjD-E6-kbK" secondAttribute="bottom" id="VJC-da-OTj"/>
|
||||
<constraint firstItem="Ayb-t5-fJn" firstAttribute="top" secondItem="fu5-0k-wWM" secondAttribute="top" id="Vcv-Ru-mjq"/>
|
||||
<constraint firstItem="b5t-XX-9C1" firstAttribute="leading" secondItem="Mbs-jF-S6q" secondAttribute="trailing" id="WIY-Dk-zCU"/>
|
||||
<constraint firstItem="Ayb-t5-fJn" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="X56-Nh-sxG"/>
|
||||
<constraint firstItem="Mbs-jF-S6q" firstAttribute="top" secondItem="N0d-aC-tAR" secondAttribute="bottom" id="XKD-Ac-1U8"/>
|
||||
<constraint firstItem="rb6-Ei-lp5" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="Y0A-5X-khl"/>
|
||||
<constraint firstItem="Mbs-jF-S6q" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="aTY-My-zgT"/>
|
||||
<constraint firstItem="ulY-K0-3tY" firstAttribute="trailing" secondItem="fu5-0k-wWM" secondAttribute="trailing" id="aYP-HL-afm"/>
|
||||
<constraint firstItem="pfa-EX-bIM" firstAttribute="leading" secondItem="Ayb-t5-fJn" secondAttribute="trailing" id="bw8-RY-msq"/>
|
||||
<constraint firstItem="rca-2I-WcN" firstAttribute="leading" secondItem="vqk-rt-XuN" secondAttribute="trailing" id="cNC-a9-pbd"/>
|
||||
<constraint firstItem="pfa-EX-bIM" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="chW-Qi-BG5"/>
|
||||
<constraint firstItem="pfa-EX-bIM" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="dVx-X9-ie3"/>
|
||||
<constraint firstItem="rb6-Ei-lp5" firstAttribute="top" secondItem="vqk-rt-XuN" secondAttribute="bottom" id="did-hb-w2N"/>
|
||||
<constraint firstItem="Mbs-jF-S6q" firstAttribute="leading" secondItem="fu5-0k-wWM" secondAttribute="leading" id="faV-c1-xCO"/>
|
||||
<constraint firstItem="rb6-Ei-lp5" firstAttribute="leading" secondItem="N0d-aC-tAR" secondAttribute="trailing" id="fyd-eq-S0Y"/>
|
||||
<constraint firstItem="Fmh-KX-UJh" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="h6R-6D-KS7"/>
|
||||
<constraint firstItem="N0d-aC-tAR" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="iDC-lS-JTq"/>
|
||||
<constraint firstItem="rca-2I-WcN" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="iZJ-OV-EAb"/>
|
||||
<constraint firstItem="ulY-K0-3tY" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="isM-Op-rSR"/>
|
||||
<constraint firstItem="ncK-6g-dKM" firstAttribute="leading" secondItem="fu5-0k-wWM" secondAttribute="leading" id="kLT-N3-Kiy"/>
|
||||
<constraint firstItem="ulY-K0-3tY" firstAttribute="top" secondItem="rca-2I-WcN" secondAttribute="bottom" id="lll-SU-UD9"/>
|
||||
<constraint firstItem="vqk-rt-XuN" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="mhW-nI-T8n"/>
|
||||
<constraint firstItem="ncK-6g-dKM" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="nta-EE-MLy"/>
|
||||
<constraint firstItem="rca-2I-WcN" firstAttribute="top" secondItem="pfa-EX-bIM" secondAttribute="bottom" id="nw1-cG-EYv"/>
|
||||
<constraint firstItem="Ayb-t5-fJn" firstAttribute="leading" secondItem="SjD-E6-kbK" secondAttribute="trailing" id="pcn-c4-zbO"/>
|
||||
<constraint firstItem="b5t-XX-9C1" firstAttribute="width" secondItem="SjD-E6-kbK" secondAttribute="width" id="qa7-PB-nrj"/>
|
||||
<constraint firstItem="SjD-E6-kbK" firstAttribute="leading" secondItem="fu5-0k-wWM" secondAttribute="leading" id="qmp-2t-pcB"/>
|
||||
<constraint firstItem="ulY-K0-3tY" firstAttribute="leading" secondItem="rb6-Ei-lp5" secondAttribute="trailing" id="tcf-UH-KBM"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Mbs-jF-S6q" secondAttribute="bottom" id="tqe-eB-BSg"/>
|
||||
<constraint firstItem="Mbs-jF-S6q" firstAttribute="top" secondItem="N0d-aC-tAR" secondAttribute="bottom" id="txP-ji-egf"/>
|
||||
<constraint firstItem="rca-2I-WcN" firstAttribute="height" secondItem="SjD-E6-kbK" secondAttribute="height" id="vIk-Aa-Kmc"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="fu5-0k-wWM" secondAttribute="trailing" constant="20" id="8cS-Tn-nRa"/>
|
||||
<constraint firstAttribute="bottom" secondItem="fu5-0k-wWM" secondAttribute="bottom" constant="10" id="XDP-z2-1Zz"/>
|
||||
<constraint firstItem="fu5-0k-wWM" firstAttribute="top" secondItem="BJS-CT-fsj" secondAttribute="top" constant="10" id="cYn-8H-sTA"/>
|
||||
<constraint firstItem="fu5-0k-wWM" firstAttribute="leading" secondItem="BJS-CT-fsj" secondAttribute="leading" constant="20" id="vhD-Fd-p8K"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="eVG-Ff-eiy" customClass="AppButton" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="617" width="375" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="nRQ-rH-wWL"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
<state key="normal" title="Send"/>
|
||||
<connections>
|
||||
<action selector="sendPayment" destination="-1" eventType="touchUpInside" id="Pay-du-S4L"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="20p-6g-6PR">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<subviews>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="JOk-TW-ivb">
|
||||
<rect key="frame" x="177" y="323" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="CSn-ai-k2v"/>
|
||||
<constraint firstAttribute="height" constant="20" id="ReC-Xc-M6l"/>
|
||||
</constraints>
|
||||
<color key="color" white="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</activityIndicatorView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Sending payment..." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="6Dv-X5-4AL">
|
||||
<rect key="frame" x="16" y="287" width="343" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="21" id="Jhx-oD-pel"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="17"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="0.94999999999999996" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="JOk-TW-ivb" firstAttribute="centerX" secondItem="20p-6g-6PR" secondAttribute="centerX" id="08T-8A-xMb"/>
|
||||
<constraint firstItem="6Dv-X5-4AL" firstAttribute="leading" secondItem="20p-6g-6PR" secondAttribute="leading" constant="16" id="DWo-Wl-ZBW"/>
|
||||
<constraint firstItem="JOk-TW-ivb" firstAttribute="centerY" secondItem="20p-6g-6PR" secondAttribute="centerY" id="LhL-ug-GLV"/>
|
||||
<constraint firstAttribute="trailing" secondItem="6Dv-X5-4AL" secondAttribute="trailing" constant="16" id="msr-2y-sUn"/>
|
||||
<constraint firstItem="JOk-TW-ivb" firstAttribute="top" secondItem="6Dv-X5-4AL" secondAttribute="bottom" constant="15" id="zvS-FB-KaP"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="eVG-Ff-eiy" firstAttribute="bottom" secondItem="Ov4-Rg-t9P" secondAttribute="bottom" id="1SY-BO-HLX"/>
|
||||
<constraint firstItem="BJS-CT-fsj" firstAttribute="trailing" secondItem="Ov4-Rg-t9P" secondAttribute="trailing" id="2T0-XJ-kse"/>
|
||||
<constraint firstItem="eVG-Ff-eiy" firstAttribute="leading" secondItem="Ov4-Rg-t9P" secondAttribute="leading" id="DFY-Qf-jzP"/>
|
||||
<constraint firstAttribute="trailing" secondItem="oO2-oC-t30" secondAttribute="trailing" id="FUg-Bg-AAP"/>
|
||||
<constraint firstItem="ltM-8T-Caw" firstAttribute="top" secondItem="oO2-oC-t30" secondAttribute="bottom" id="GdV-PK-FgH"/>
|
||||
<constraint firstItem="oO2-oC-t30" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="IHe-Nn-BKg"/>
|
||||
<constraint firstItem="20p-6g-6PR" firstAttribute="leading" secondItem="Ov4-Rg-t9P" secondAttribute="leading" id="Quq-B1-zb8"/>
|
||||
<constraint firstItem="eVG-Ff-eiy" firstAttribute="trailing" secondItem="Ov4-Rg-t9P" secondAttribute="trailing" id="WH4-oj-2Xz"/>
|
||||
<constraint firstItem="BJS-CT-fsj" firstAttribute="top" secondItem="ltM-8T-Caw" secondAttribute="bottom" id="Yy5-5n-8HY"/>
|
||||
<constraint firstItem="eVG-Ff-eiy" firstAttribute="top" secondItem="BJS-CT-fsj" secondAttribute="bottom" id="bNd-2E-kBq"/>
|
||||
<constraint firstItem="oO2-oC-t30" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="bPx-sf-98c"/>
|
||||
<constraint firstItem="ltM-8T-Caw" firstAttribute="trailing" secondItem="i5M-Pr-FkT" secondAttribute="trailing" id="jw9-Tp-3wK"/>
|
||||
<constraint firstItem="ltM-8T-Caw" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="k2H-zr-M5T"/>
|
||||
<constraint firstItem="20p-6g-6PR" firstAttribute="bottom" secondItem="i5M-Pr-FkT" secondAttribute="bottom" id="kLb-hX-3L4"/>
|
||||
<constraint firstItem="BJS-CT-fsj" firstAttribute="leading" secondItem="Ov4-Rg-t9P" secondAttribute="leading" id="m71-yG-UsP"/>
|
||||
<constraint firstItem="20p-6g-6PR" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="q2y-Fg-Qui"/>
|
||||
<constraint firstItem="20p-6g-6PR" firstAttribute="trailing" secondItem="Ov4-Rg-t9P" secondAttribute="trailing" id="wdM-RP-SlB"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="Ov4-Rg-t9P"/>
|
||||
<point key="canvasLocation" x="-171.5" y="0.5"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="backspace" width="22" height="16"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -0,0 +1,125 @@
|
|||
//
|
||||
// SendViewController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-10.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class SendViewController: UIViewController {
|
||||
|
||||
@IBOutlet var addressHolderView: UIView!
|
||||
@IBOutlet var balanceLabel: UILabel!
|
||||
@IBOutlet var bottomLayoutConstraint: NSLayoutConstraint!
|
||||
@IBOutlet var holdingView: UIView!
|
||||
@IBOutlet var sendTitleLabel: UILabel!
|
||||
@IBOutlet var sendAddressTextField: UITextField!
|
||||
|
||||
var safeAreaPadding: CGFloat = 20.0
|
||||
|
||||
@IBAction func addAmount() {
|
||||
guard let receiver = sendAddressTextField.text, !receiver.isEmpty else {
|
||||
return
|
||||
}
|
||||
|
||||
let sendAmountViewController = SendAmountViewController(reciever: receiver)
|
||||
|
||||
navigationController?.pushViewController(sendAmountViewController, animated: true)
|
||||
}
|
||||
|
||||
@IBAction func scanQRCode() {
|
||||
let scanViewController = ScanViewController()
|
||||
scanViewController.delegate = self
|
||||
let navigationController = AppNavigationController(rootViewController: scanViewController)
|
||||
|
||||
present(navigationController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
init() {
|
||||
super.init(nibName: String(describing: SendViewController.self), bundle: nil)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
addKeyboardNotifications()
|
||||
}
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
viewDidDisappear(animated)
|
||||
|
||||
removeKeyboardNotifications()
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
navigationItem.title = "My Wallet"
|
||||
navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
|
||||
|
||||
let image = UIImage(named:"close")
|
||||
let leftBarButtonItem = UIBarButtonItem(image: image, style: .plain, target: self, action: #selector(self.dismissView))
|
||||
navigationItem.leftBarButtonItem = leftBarButtonItem
|
||||
|
||||
balanceLabel.textColor = Colors.black
|
||||
sendTitleLabel.textColor = Colors.darkGrayTransparent
|
||||
sendAddressTextField.textColor = Colors.darkGray
|
||||
addressHolderView.backgroundColor = Colors.lightBackground
|
||||
holdingView.backgroundColor = Colors.lightBackground
|
||||
view.backgroundColor = Colors.primaryDark
|
||||
}
|
||||
|
||||
func addKeyboardNotifications() {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(self.keyboardWillShow), name: NSNotification.Name.UIKeyboardWillShow, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(self.keyboardWillHide), name: NSNotification.Name.UIKeyboardWillHide, object: nil)
|
||||
}
|
||||
|
||||
@objc func keyboardWillShow(notification: NSNotification) {
|
||||
if let keyboardSize = (notification.userInfo?[UIKeyboardFrameBeginUserInfoKey] as? NSValue)?.cgRectValue {
|
||||
let statusBarHeight = UIApplication.shared.statusBarFrame.height - safeAreaPadding
|
||||
bottomLayoutConstraint.constant = keyboardSize.size.height + statusBarHeight
|
||||
|
||||
if let duration = notification.userInfo?[UIKeyboardAnimationDurationUserInfoKey] as? Double {
|
||||
UIView.animate(withDuration: duration, animations: {
|
||||
self.view.layoutIfNeeded()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@objc func keyboardWillHide(notification: NSNotification) {
|
||||
bottomLayoutConstraint.constant = 0
|
||||
|
||||
if let duration = notification.userInfo?[UIKeyboardAnimationDurationUserInfoKey] as? Double {
|
||||
UIView.animate(withDuration: duration, animations: {
|
||||
self.view.layoutIfNeeded()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func removeKeyboardNotifications() {
|
||||
NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIKeyboardWillShow, object: nil)
|
||||
NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIKeyboardWillHide, object: nil)
|
||||
}
|
||||
|
||||
@objc func dismissView() {
|
||||
view.endEditing(true)
|
||||
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
}
|
||||
|
||||
extension SendViewController: ScanViewControllerDelegate {
|
||||
func setQR(value: String) {
|
||||
sendAddressTextField.text = value
|
||||
}
|
||||
}
|
|
@ -0,0 +1,188 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="SendViewController" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="addressHolderView" destination="eCD-uq-zHs" id="bm6-NZ-OsF"/>
|
||||
<outlet property="balanceLabel" destination="R8J-3v-fcs" id="8fZ-di-qmc"/>
|
||||
<outlet property="bottomLayoutConstraint" destination="MUa-U8-o0R" id="ruo-ha-Sbl"/>
|
||||
<outlet property="holdingView" destination="m6a-BS-Nig" id="RcM-u9-YEw"/>
|
||||
<outlet property="sendAddressTextField" destination="bki-vd-wOc" id="JP4-gO-Yk9"/>
|
||||
<outlet property="sendTitleLabel" destination="UXc-aa-UA7" id="qmM-Mg-c0o"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="m6a-BS-Nig">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="617"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wvK-P4-LFG">
|
||||
<rect key="frame" x="0.0" y="55" width="375" height="145"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="SEND TO" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="UXc-aa-UA7">
|
||||
<rect key="frame" x="16" y="20" width="343" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="ACq-YY-2fi"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="eCD-uq-zHs">
|
||||
<rect key="frame" x="16" y="61" width="343" height="50"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="HJn-rN-ByA" customClass="AppButton" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<rect key="frame" x="293" y="0.0" width="50" height="50"/>
|
||||
<color key="backgroundColor" red="0.99999600649999998" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="50" id="2Gn-fu-VKC"/>
|
||||
<constraint firstAttribute="height" constant="50" id="XhA-9U-L1c"/>
|
||||
</constraints>
|
||||
<state key="normal" image="camera"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="25"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="scanQRCode" destination="-1" eventType="touchUpInside" id="EgV-9q-5kO"/>
|
||||
</connections>
|
||||
</button>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" text="b1RXUJgnuxtzHyJ5UTWerh4pNBWcVikESZe" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="bki-vd-wOc">
|
||||
<rect key="frame" x="18" y="0.0" width="261" height="50"/>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" autocorrectionType="no"/>
|
||||
</textField>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.96862745100000003" green="0.96862745100000003" blue="0.96862745100000003" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="2LL-QX-Iy9"/>
|
||||
<constraint firstItem="HJn-rN-ByA" firstAttribute="leading" secondItem="bki-vd-wOc" secondAttribute="trailing" constant="14" id="3eW-jX-mlo"/>
|
||||
<constraint firstItem="HJn-rN-ByA" firstAttribute="top" secondItem="eCD-uq-zHs" secondAttribute="top" id="5En-kT-hdy"/>
|
||||
<constraint firstAttribute="bottom" secondItem="HJn-rN-ByA" secondAttribute="bottom" id="5xN-b6-f3F"/>
|
||||
<constraint firstAttribute="trailing" secondItem="HJn-rN-ByA" secondAttribute="trailing" id="Z2k-b7-D1X"/>
|
||||
<constraint firstItem="bki-vd-wOc" firstAttribute="leading" secondItem="eCD-uq-zHs" secondAttribute="leading" constant="18" id="hlp-EW-ZGe"/>
|
||||
<constraint firstItem="bki-vd-wOc" firstAttribute="top" secondItem="eCD-uq-zHs" secondAttribute="top" id="jYN-wl-NLP"/>
|
||||
<constraint firstAttribute="bottom" secondItem="bki-vd-wOc" secondAttribute="bottom" id="mln-X5-xLa"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="30"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="e0v-Na-RtI">
|
||||
<rect key="frame" x="0.0" y="144" width="375" height="1"/>
|
||||
<color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="Ska-Rd-bi0"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="e0v-Na-RtI" secondAttribute="bottom" id="V3M-YG-YZC"/>
|
||||
<constraint firstItem="UXc-aa-UA7" firstAttribute="leading" secondItem="wvK-P4-LFG" secondAttribute="leading" constant="16" id="XHY-UL-13R"/>
|
||||
<constraint firstItem="eCD-uq-zHs" firstAttribute="leading" secondItem="wvK-P4-LFG" secondAttribute="leading" constant="16" id="YJf-GB-Mb9"/>
|
||||
<constraint firstItem="e0v-Na-RtI" firstAttribute="leading" secondItem="wvK-P4-LFG" secondAttribute="leading" id="c74-qQ-m5L"/>
|
||||
<constraint firstItem="eCD-uq-zHs" firstAttribute="top" secondItem="UXc-aa-UA7" secondAttribute="bottom" constant="25" id="f6y-ka-At4"/>
|
||||
<constraint firstItem="UXc-aa-UA7" firstAttribute="top" secondItem="wvK-P4-LFG" secondAttribute="top" constant="20" id="fNR-zx-oXe"/>
|
||||
<constraint firstAttribute="height" constant="145" id="gc3-6E-4i2"/>
|
||||
<constraint firstAttribute="trailing" secondItem="eCD-uq-zHs" secondAttribute="trailing" constant="16" id="mxF-td-Dcb"/>
|
||||
<constraint firstAttribute="trailing" secondItem="e0v-Na-RtI" secondAttribute="trailing" id="rvh-Hi-XHN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="UXc-aa-UA7" secondAttribute="trailing" constant="16" id="wPv-yR-R1o"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8NY-yp-oPz">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="55"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="30.2345 BTCP" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="R8J-3v-fcs">
|
||||
<rect key="frame" x="16" y="0.0" width="343" height="55"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="16"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aPl-pn-Bos">
|
||||
<rect key="frame" x="0.0" y="54" width="375" height="1"/>
|
||||
<color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="X3C-Fh-ALU"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="1" id="YXD-1a-Gda"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="R8J-3v-fcs" firstAttribute="leading" secondItem="8NY-yp-oPz" secondAttribute="leading" constant="16" id="LIU-df-aBE"/>
|
||||
<constraint firstAttribute="trailing" secondItem="R8J-3v-fcs" secondAttribute="trailing" constant="16" id="Onu-5B-Lqd"/>
|
||||
<constraint firstAttribute="bottom" secondItem="aPl-pn-Bos" secondAttribute="bottom" id="Puy-Rm-6ar"/>
|
||||
<constraint firstAttribute="bottom" secondItem="R8J-3v-fcs" secondAttribute="bottom" id="RCV-LZ-42u"/>
|
||||
<constraint firstItem="R8J-3v-fcs" firstAttribute="top" secondItem="8NY-yp-oPz" secondAttribute="top" id="eGR-c4-8ce"/>
|
||||
<constraint firstAttribute="trailing" secondItem="aPl-pn-Bos" secondAttribute="trailing" id="f1t-nX-KES"/>
|
||||
<constraint firstAttribute="height" constant="55" id="ijV-5Z-CT2"/>
|
||||
<constraint firstItem="aPl-pn-Bos" firstAttribute="leading" secondItem="8NY-yp-oPz" secondAttribute="leading" id="lIL-8k-Vhu"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="8NY-yp-oPz" firstAttribute="top" secondItem="m6a-BS-Nig" secondAttribute="top" id="8B6-m3-5UT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="wvK-P4-LFG" secondAttribute="trailing" id="Gpj-Qu-jNu"/>
|
||||
<constraint firstItem="wvK-P4-LFG" firstAttribute="leading" secondItem="m6a-BS-Nig" secondAttribute="leading" id="KZ2-Xj-Lgt"/>
|
||||
<constraint firstAttribute="trailing" secondItem="8NY-yp-oPz" secondAttribute="trailing" id="W8N-Ka-dmO"/>
|
||||
<constraint firstItem="8NY-yp-oPz" firstAttribute="leading" secondItem="m6a-BS-Nig" secondAttribute="leading" id="bg7-yj-tUq"/>
|
||||
<constraint firstItem="wvK-P4-LFG" firstAttribute="top" secondItem="8NY-yp-oPz" secondAttribute="bottom" id="kRS-Ha-mb5"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9ig-HT-MND" customClass="AppButton" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="617" width="375" height="50"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="0Dl-MW-H80"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
<state key="normal" title="Next">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="addAmount" destination="-1" eventType="touchUpInside" id="smC-ix-sSy"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="m6a-BS-Nig" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="67a-dJ-9BN"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="9ig-HT-MND" secondAttribute="trailing" id="74g-6v-qms"/>
|
||||
<constraint firstItem="m6a-BS-Nig" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="FLQ-Gr-S4h"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="9ig-HT-MND" secondAttribute="bottom" id="MUa-U8-o0R"/>
|
||||
<constraint firstItem="m6a-BS-Nig" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="TVc-Ln-3JO"/>
|
||||
<constraint firstItem="9ig-HT-MND" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="jfL-do-IsD"/>
|
||||
<constraint firstItem="9ig-HT-MND" firstAttribute="top" secondItem="m6a-BS-Nig" secondAttribute="bottom" id="vEh-7o-Nnb"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||
<point key="canvasLocation" x="33.5" y="53.5"/>
|
||||
</view>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="camera" width="20" height="18"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -0,0 +1,94 @@
|
|||
//
|
||||
// MnemonicViewController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class MnemonicViewController: UIViewController {
|
||||
|
||||
@IBOutlet var holderView: UIView!
|
||||
@IBOutlet var titleLabel: UILabel!
|
||||
@IBOutlet var mnemonicHolderView: UIView!
|
||||
@IBOutlet var activityIndicator: UIActivityIndicatorView!
|
||||
|
||||
var mnemonic = ""
|
||||
|
||||
@IBAction func confirmPhrase() {
|
||||
let verificationViewController = VerificationViewController(type: .questions, mnemonic: mnemonic)
|
||||
|
||||
navigationController?.pushViewController(verificationViewController, animated: true)
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
init() {
|
||||
super.init(nibName: String(describing: MnemonicViewController.self), bundle: nil)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
generateMnemonic()
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
navigationItem.title = "Secret Phrase"
|
||||
|
||||
navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
|
||||
|
||||
let image = UIImage(named:"close")
|
||||
let leftBarButtonItem = UIBarButtonItem(image: image, style: .plain, target: self, action: #selector(self.dismissView))
|
||||
navigationItem.leftBarButtonItem = leftBarButtonItem
|
||||
|
||||
holderView.backgroundColor = Colors.lightBackground
|
||||
titleLabel.textColor = Colors.darkGray
|
||||
view.backgroundColor = Colors.primaryDark
|
||||
}
|
||||
|
||||
@objc func dismissView() {
|
||||
view.endEditing(true)
|
||||
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
func generateMnemonic() {
|
||||
activityIndicator.stopAnimating()
|
||||
|
||||
mnemonic = "bench hurt jump file august wise shallow faculty impulse spring exact slush thunder author capable act festival slice deposit sauce coconut afford frown better"
|
||||
|
||||
let words = mnemonic.components(separatedBy: " ")
|
||||
|
||||
var originX: CGFloat = 0.0
|
||||
var originY: CGFloat = 0.0
|
||||
|
||||
for (index, word) in words.enumerated() {
|
||||
let pillView = PillView(index: String(index + 1), title: word, origin: .zero)
|
||||
|
||||
if index == 0 {
|
||||
mnemonicHolderView.addSubview(pillView)
|
||||
|
||||
originX += pillView.frame.size.width
|
||||
} else {
|
||||
if originX + pillView.frame.size.width > mnemonicHolderView.frame.size.width - pillView.horizontalSpacing {
|
||||
originY += pillView.verticalSpacing
|
||||
originX = 0.0
|
||||
} else {
|
||||
originX += pillView.horizontalSpacing
|
||||
}
|
||||
|
||||
pillView.frame.origin = CGPoint(x: originX, y: originY)
|
||||
|
||||
mnemonicHolderView.addSubview(pillView)
|
||||
|
||||
originX += pillView.frame.size.width
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_0" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="MnemonicViewController" customModule="BlockEQ" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="activityIndicator" destination="beH-3n-Zlu" id="OZQ-he-uzf"/>
|
||||
<outlet property="holderView" destination="3Jg-1T-pTn" id="1Um-5F-tGS"/>
|
||||
<outlet property="mnemonicHolderView" destination="C6e-qd-eOl" id="nz5-ef-9IQ"/>
|
||||
<outlet property="titleLabel" destination="osg-Wz-f6c" id="aja-4f-3fi"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3Jg-1T-pTn">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="513"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="C6e-qd-eOl">
|
||||
<rect key="frame" x="16" y="85" width="288" height="413"/>
|
||||
<subviews>
|
||||
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="beH-3n-Zlu">
|
||||
<rect key="frame" x="134" y="20" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="9Rs-mb-aGk"/>
|
||||
<constraint firstAttribute="height" constant="20" id="mSs-jG-oNp"/>
|
||||
</constraints>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="beH-3n-Zlu" firstAttribute="centerX" secondItem="C6e-qd-eOl" secondAttribute="centerX" id="JX9-sQ-Dg4"/>
|
||||
<constraint firstItem="beH-3n-Zlu" firstAttribute="top" secondItem="C6e-qd-eOl" secondAttribute="top" constant="20" id="WYB-fb-uze"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Please write down and safely store this phrase. It's the ONLY WAY to retrieve your wallet." textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="osg-Wz-f6c">
|
||||
<rect key="frame" x="16" y="30" width="288" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="6WP-Zy-66e"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="C6e-qd-eOl" secondAttribute="bottom" constant="15" id="3Jo-Oy-xU5"/>
|
||||
<constraint firstItem="C6e-qd-eOl" firstAttribute="top" secondItem="osg-Wz-f6c" secondAttribute="bottom" constant="15" id="44L-ps-jkF"/>
|
||||
<constraint firstAttribute="trailing" secondItem="C6e-qd-eOl" secondAttribute="trailing" constant="16" id="FGz-43-ceE"/>
|
||||
<constraint firstItem="C6e-qd-eOl" firstAttribute="leading" secondItem="3Jg-1T-pTn" secondAttribute="leading" constant="16" id="Ofa-fU-Eby"/>
|
||||
<constraint firstItem="osg-Wz-f6c" firstAttribute="top" secondItem="3Jg-1T-pTn" secondAttribute="top" constant="30" id="StX-UF-ueb"/>
|
||||
<constraint firstItem="osg-Wz-f6c" firstAttribute="leading" secondItem="3Jg-1T-pTn" secondAttribute="leading" constant="16" id="hp3-zb-58Z"/>
|
||||
<constraint firstAttribute="trailing" secondItem="osg-Wz-f6c" secondAttribute="trailing" constant="16" id="imB-Jr-5Se"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="PsE-ef-7Q4" customClass="AppButton" customModule="BlockEQ" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="513" width="320" height="55"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="55" id="Ca0-sc-TJA"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
<state key="normal" title="I have written it down">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="confirmPhrase" destination="-1" eventType="touchUpInside" id="EhY-ez-9gd"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="PsE-ef-7Q4" firstAttribute="top" secondItem="3Jg-1T-pTn" secondAttribute="bottom" id="1Lf-UU-eMK"/>
|
||||
<constraint firstItem="PsE-ef-7Q4" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="38j-3h-Nii"/>
|
||||
<constraint firstItem="3Jg-1T-pTn" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="5IZ-u1-1pV"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="PsE-ef-7Q4" secondAttribute="trailing" id="8Js-1d-n8O"/>
|
||||
<constraint firstItem="3Jg-1T-pTn" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="-20" id="Khc-yH-aSO"/>
|
||||
<constraint firstItem="3Jg-1T-pTn" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="lb0-s9-wqb"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="PsE-ef-7Q4" secondAttribute="bottom" id="v57-GY-YOJ"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||
<point key="canvasLocation" x="33" y="54"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,141 @@
|
|||
//
|
||||
// PinViewController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
import Foundation
|
||||
|
||||
class PinViewController: UIViewController {
|
||||
|
||||
@IBOutlet var textField: UITextField!
|
||||
@IBOutlet var nextButton: AppButton!
|
||||
@IBOutlet var buttonHolderView: UIView!
|
||||
@IBOutlet var pinViewHolder: UIView!
|
||||
@IBOutlet var pinView1: PinView!
|
||||
@IBOutlet var pinView2: PinView!
|
||||
@IBOutlet var pinView3: PinView!
|
||||
@IBOutlet var pinView4: PinView!
|
||||
|
||||
var pinViews: [PinView]!
|
||||
var previousPin: String!
|
||||
var mnemonic = ""
|
||||
|
||||
@IBAction func textFieldDidChange() {
|
||||
guard let digits = textField.text, digits.count < 5 else {
|
||||
if let text = textField.text {
|
||||
let index4 = text.index(text.startIndex, offsetBy: 4)
|
||||
|
||||
textField.text = String(text[..<index4])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
for (index, pinView) in pinViews.enumerated() {
|
||||
if (index < digits.count) {
|
||||
pinView.setFilled()
|
||||
} else {
|
||||
pinView.setEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
if digits.count == 4 {
|
||||
nextButton.setEnabled()
|
||||
} else {
|
||||
nextButton.setDisabled()
|
||||
}
|
||||
}
|
||||
|
||||
@IBAction func selectNext() {
|
||||
guard let pin = textField.text else {
|
||||
return
|
||||
}
|
||||
|
||||
if let pinToConfirm = previousPin {
|
||||
if pin == pinToConfirm {
|
||||
savePin()
|
||||
} else {
|
||||
displayPinMismatchError()
|
||||
}
|
||||
} else {
|
||||
confirmPin(pin: pin)
|
||||
}
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
init(pin: String?, mnemonic: String) {
|
||||
super.init(nibName: String(describing: PinViewController.self), bundle: nil)
|
||||
|
||||
self.previousPin = pin
|
||||
self.mnemonic = mnemonic
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
textField.becomeFirstResponder()
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
if let _ = previousPin {
|
||||
navigationItem.title = "Confirm Pin"
|
||||
navigationItem.setHidesBackButton(false, animated: false)
|
||||
|
||||
nextButton.setTitle("Confirm", for: .normal)
|
||||
} else {
|
||||
navigationItem.title = "Create Pin"
|
||||
navigationItem.setHidesBackButton(true, animated: false)
|
||||
|
||||
nextButton.setTitle("Next", for: .normal)
|
||||
}
|
||||
|
||||
navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: nil, action: nil)
|
||||
|
||||
pinViewHolder.backgroundColor = Colors.lightBackground
|
||||
view.backgroundColor = Colors.lightBackground
|
||||
|
||||
nextButton.setDisabled()
|
||||
|
||||
textField.inputAccessoryView = buttonHolderView
|
||||
|
||||
pinViews = [pinView1, pinView2, pinView3, pinView4]
|
||||
|
||||
for pinView in pinViews {
|
||||
pinView.setEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
func displayPinMismatchError() {
|
||||
let alert = UIAlertController(title: "Pin error", message: "Sorry your pin did not match. Please try again.", preferredStyle: UIAlertControllerStyle.alert)
|
||||
alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.default, handler: nil))
|
||||
self.present(alert, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
func confirmPin(pin: String) {
|
||||
let pinViewController = PinViewController(pin: pin, mnemonic: mnemonic)
|
||||
|
||||
navigationController?.pushViewController(pinViewController, animated: true)
|
||||
}
|
||||
|
||||
func savePin() {
|
||||
let appNavController = navigationController as! AppNavigationController
|
||||
|
||||
appNavController.accountCreationDelegate?.createAccount(mnemonic: mnemonic)
|
||||
|
||||
view.endEditing(true)
|
||||
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PinViewController" customModule="BlockEQ" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="buttonHolderView" destination="LLn-7s-cPf" id="Mei-dB-hkt"/>
|
||||
<outlet property="nextButton" destination="0Oo-io-3Gj" id="kYq-Bo-NY2"/>
|
||||
<outlet property="pinView1" destination="zYp-gE-uWy" id="UFO-yA-IXg"/>
|
||||
<outlet property="pinView2" destination="dzt-LG-dPx" id="Zn3-vo-MLU"/>
|
||||
<outlet property="pinView3" destination="pc4-JF-xCR" id="h1z-ey-Hhe"/>
|
||||
<outlet property="pinView4" destination="v34-ap-m1f" id="Ssy-mE-S0N"/>
|
||||
<outlet property="pinViewHolder" destination="RfV-TG-cay" id="Tjf-WE-1Ez"/>
|
||||
<outlet property="textField" destination="DM4-MA-87l" id="Yhr-dY-ETW"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wqb-C1-HGh">
|
||||
<rect key="frame" x="16" y="70" width="343" height="70"/>
|
||||
<subviews>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="DM4-MA-87l">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="70"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<color key="textColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<textInputTraits key="textInputTraits" keyboardType="numberPad"/>
|
||||
<connections>
|
||||
<action selector="textFieldDidChange" destination="-1" eventType="editingChanged" id="9wl-Mw-TXc"/>
|
||||
</connections>
|
||||
</textField>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RfV-TG-cay">
|
||||
<rect key="frame" x="0.0" y="0.0" width="343" height="70"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zYp-gE-uWy" customClass="PinView" customModule="BlockEQ" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="72.5" height="70"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dzt-LG-dPx" customClass="PinView" customModule="BlockEQ" customModuleProvider="target">
|
||||
<rect key="frame" x="90.5" y="0.0" width="72" height="70"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pc4-JF-xCR" customClass="PinView" customModule="BlockEQ" customModuleProvider="target">
|
||||
<rect key="frame" x="180.5" y="0.0" width="72.5" height="70"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="v34-ap-m1f" customClass="PinView" customModule="BlockEQ" customModuleProvider="target">
|
||||
<rect key="frame" x="271" y="0.0" width="72" height="70"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="zYp-gE-uWy" firstAttribute="leading" secondItem="RfV-TG-cay" secondAttribute="leading" id="0Xs-FP-Oz0"/>
|
||||
<constraint firstAttribute="trailing" secondItem="v34-ap-m1f" secondAttribute="trailing" id="0qH-cL-PGa"/>
|
||||
<constraint firstItem="zYp-gE-uWy" firstAttribute="top" secondItem="RfV-TG-cay" secondAttribute="top" id="5K9-Aa-BWd"/>
|
||||
<constraint firstAttribute="bottom" secondItem="dzt-LG-dPx" secondAttribute="bottom" id="B4F-DT-T9R"/>
|
||||
<constraint firstAttribute="bottom" secondItem="pc4-JF-xCR" secondAttribute="bottom" id="CCk-LD-I9t"/>
|
||||
<constraint firstItem="dzt-LG-dPx" firstAttribute="leading" secondItem="zYp-gE-uWy" secondAttribute="trailing" constant="18" id="Euh-2h-06W"/>
|
||||
<constraint firstItem="pc4-JF-xCR" firstAttribute="leading" secondItem="dzt-LG-dPx" secondAttribute="trailing" constant="18" id="Frl-tu-V7d"/>
|
||||
<constraint firstItem="dzt-LG-dPx" firstAttribute="width" secondItem="zYp-gE-uWy" secondAttribute="width" id="ITh-n0-exd"/>
|
||||
<constraint firstAttribute="bottom" secondItem="zYp-gE-uWy" secondAttribute="bottom" id="VDf-tj-4qU"/>
|
||||
<constraint firstItem="pc4-JF-xCR" firstAttribute="width" secondItem="zYp-gE-uWy" secondAttribute="width" id="VwT-86-nXL"/>
|
||||
<constraint firstItem="pc4-JF-xCR" firstAttribute="top" secondItem="RfV-TG-cay" secondAttribute="top" id="Yfi-4O-Hoa"/>
|
||||
<constraint firstItem="dzt-LG-dPx" firstAttribute="top" secondItem="RfV-TG-cay" secondAttribute="top" id="ZLl-rL-aLg"/>
|
||||
<constraint firstItem="v34-ap-m1f" firstAttribute="width" secondItem="zYp-gE-uWy" secondAttribute="width" id="bWT-9V-EPw"/>
|
||||
<constraint firstAttribute="bottom" secondItem="v34-ap-m1f" secondAttribute="bottom" id="g6y-xC-2R9"/>
|
||||
<constraint firstItem="v34-ap-m1f" firstAttribute="top" secondItem="RfV-TG-cay" secondAttribute="top" id="kec-il-wYW"/>
|
||||
<constraint firstItem="v34-ap-m1f" firstAttribute="leading" secondItem="pc4-JF-xCR" secondAttribute="trailing" constant="18" id="oAp-U7-WBx"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="RfV-TG-cay" secondAttribute="bottom" id="60D-gV-m22"/>
|
||||
<constraint firstAttribute="trailing" secondItem="RfV-TG-cay" secondAttribute="trailing" id="NuQ-jv-0vr"/>
|
||||
<constraint firstItem="RfV-TG-cay" firstAttribute="top" secondItem="wqb-C1-HGh" secondAttribute="top" id="Ytb-ed-v1F"/>
|
||||
<constraint firstAttribute="height" constant="70" id="eAF-NX-eag"/>
|
||||
<constraint firstAttribute="bottom" secondItem="DM4-MA-87l" secondAttribute="bottom" id="htn-bm-4is"/>
|
||||
<constraint firstItem="RfV-TG-cay" firstAttribute="leading" secondItem="wqb-C1-HGh" secondAttribute="leading" id="n39-63-C3n"/>
|
||||
<constraint firstItem="DM4-MA-87l" firstAttribute="top" secondItem="wqb-C1-HGh" secondAttribute="top" id="nOA-pK-RhK"/>
|
||||
<constraint firstAttribute="trailing" secondItem="DM4-MA-87l" secondAttribute="trailing" id="tLS-EG-dbd"/>
|
||||
<constraint firstItem="DM4-MA-87l" firstAttribute="leading" secondItem="wqb-C1-HGh" secondAttribute="leading" id="yth-yL-qqD"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="wqb-C1-HGh" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" constant="16" id="585-nR-EiP"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="wqb-C1-HGh" secondAttribute="trailing" constant="16" id="OuN-zs-eGe"/>
|
||||
<constraint firstItem="wqb-C1-HGh" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" constant="50" id="U9c-fS-WIY"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||
<point key="canvasLocation" x="33.5" y="53.5"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="LLn-7s-cPf">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0Oo-io-3Gj" customClass="AppButton" customModule="BlockEQ" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="otW-Mo-XhB"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
<state key="normal" title="Next">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="selectNext" destination="-1" eventType="touchUpInside" id="ilS-hL-f0b"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="0Oo-io-3Gj" firstAttribute="leading" secondItem="g0h-0G-4z4" secondAttribute="leading" id="Dff-ne-On2"/>
|
||||
<constraint firstItem="0Oo-io-3Gj" firstAttribute="top" secondItem="LLn-7s-cPf" secondAttribute="top" id="L9K-Zp-yBa"/>
|
||||
<constraint firstItem="g0h-0G-4z4" firstAttribute="trailing" secondItem="0Oo-io-3Gj" secondAttribute="trailing" id="aEU-Ab-q7B"/>
|
||||
<constraint firstAttribute="bottom" secondItem="0Oo-io-3Gj" secondAttribute="bottom" id="kG8-LU-HGa"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<viewLayoutGuide key="safeArea" id="g0h-0G-4z4"/>
|
||||
<point key="canvasLocation" x="34" y="508"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,270 @@
|
|||
//
|
||||
// RecoveryViewController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-11.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class VerificationViewController: UIViewController {
|
||||
|
||||
@IBOutlet var collectionView: UICollectionView!
|
||||
@IBOutlet var textView: UITextView!
|
||||
@IBOutlet var textViewHeightConstraint: NSLayoutConstraint!
|
||||
@IBOutlet var progressView: UIView!
|
||||
@IBOutlet var progressViewWidthConstraint: NSLayoutConstraint!
|
||||
@IBOutlet var quicktypeView: UIView!
|
||||
@IBOutlet var questionHolderView: UIView!
|
||||
@IBOutlet var questionTitleLabel: UILabel!
|
||||
@IBOutlet var questionSubtitleLabel: UILabel!
|
||||
@IBOutlet var questionViewHeightConstraint: NSLayoutConstraint!
|
||||
|
||||
public enum VerificationType {
|
||||
case recovery
|
||||
case confirmation
|
||||
case questions
|
||||
}
|
||||
|
||||
let defaultQuestionViewHeight: CGFloat = 88.0
|
||||
let defaultTextViewHeight: CGFloat = 150.0
|
||||
let questionTextViewHeight: CGFloat = 48.0
|
||||
let totalQuestionCount = 4
|
||||
var questionsAnswered = 0
|
||||
var progressWidth: CGFloat {
|
||||
return UIScreen.main.bounds.size.width / CGFloat(totalQuestionCount)
|
||||
}
|
||||
|
||||
var type: VerificationType = .recovery
|
||||
var suggestions: [String] = []
|
||||
var questionWords: [String] = []
|
||||
var currentWord: String = ""
|
||||
var mnemonic: String = ""
|
||||
|
||||
let wordList = ["bench", "hurt", "jump", "file", "august", "wise", "shallow", "faculty", "impulse", "spring", "exact", "slush", "thunder", "author", "capable", "act", "festival", "slice", "deposit", "sauce", "coconut", "afford", "frown", "better"]
|
||||
|
||||
@IBAction func nextButtonSelected() {
|
||||
switch type {
|
||||
case .questions:
|
||||
validateAnswer()
|
||||
default:
|
||||
// TODO: uncomment to add verification back
|
||||
/*
|
||||
guard var mnemonicString = textView.text, !mnemonicString.isEmpty else {
|
||||
return
|
||||
}
|
||||
|
||||
let lastCharater = mnemonicString.last
|
||||
if lastCharater == " " {
|
||||
mnemonicString = String(mnemonicString.dropLast())
|
||||
}
|
||||
setPin(mnemonic: mnemonicString)
|
||||
*/
|
||||
|
||||
//TODO remove this when verification above is added.
|
||||
setPin(mnemonic: mnemonic)
|
||||
}
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
init(type: VerificationType, mnemonic: String) {
|
||||
super.init(nibName: String(describing: VerificationViewController.self), bundle: nil)
|
||||
|
||||
self.type = type
|
||||
self.mnemonic = mnemonic
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
textView.becomeFirstResponder()
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
let collectionViewNib = UINib(nibName: WordSuggestionCell.cellIdentifier, bundle: nil)
|
||||
collectionView.register(collectionViewNib, forCellWithReuseIdentifier: WordSuggestionCell.cellIdentifier)
|
||||
|
||||
switch type {
|
||||
case .confirmation:
|
||||
navigationItem.title = "Re-enter Your Phrase"
|
||||
|
||||
questionViewHeightConstraint.constant = 0.0
|
||||
textViewHeightConstraint.constant = defaultTextViewHeight
|
||||
case .questions:
|
||||
questionViewHeightConstraint.constant = defaultQuestionViewHeight
|
||||
textViewHeightConstraint.constant = questionTextViewHeight
|
||||
|
||||
setQuestion(animated: false)
|
||||
default:
|
||||
navigationItem.title = "Enter Recovery Phrase"
|
||||
|
||||
questionViewHeightConstraint.constant = 0.0
|
||||
textViewHeightConstraint.constant = defaultTextViewHeight
|
||||
|
||||
let image = UIImage(named:"close")
|
||||
let leftBarButtonItem = UIBarButtonItem(image: image, style: .plain, target: self, action: #selector(self.dismissView))
|
||||
navigationItem.leftBarButtonItem = leftBarButtonItem
|
||||
}
|
||||
|
||||
textView.textContainerInset = UIEdgeInsets(top: 16.0, left: 16.0, bottom: 16.0, right: 16.0);
|
||||
textView.inputAccessoryView = quicktypeView
|
||||
|
||||
progressView.backgroundColor = Colors.secondaryDark
|
||||
textView.textColor = Colors.darkGray
|
||||
questionHolderView.backgroundColor = Colors.lightBackground
|
||||
questionTitleLabel.textColor = Colors.darkGray
|
||||
questionSubtitleLabel.textColor = Colors.darkGray
|
||||
view.backgroundColor = Colors.lightBackground
|
||||
}
|
||||
|
||||
@objc func dismissView() {
|
||||
view.endEditing(true)
|
||||
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
|
||||
func getWords(string: String) -> [String] {
|
||||
let components = string.components(separatedBy: .whitespacesAndNewlines)
|
||||
|
||||
return components.filter { !$0.isEmpty }
|
||||
}
|
||||
|
||||
func clearSuggestions(reload: Bool) {
|
||||
suggestions.removeAll()
|
||||
|
||||
if reload {
|
||||
collectionView.reloadData()
|
||||
}
|
||||
}
|
||||
|
||||
func getAutocompleteSuggestions(userText: String) -> [String] {
|
||||
var possibleMatches: [String] = []
|
||||
for item in wordList {
|
||||
let myString:NSString! = item as NSString
|
||||
let substringRange :NSRange! = myString.range(of: userText)
|
||||
|
||||
if (substringRange.location == 0) {
|
||||
possibleMatches.append(item)
|
||||
}
|
||||
}
|
||||
return possibleMatches.enumerated().flatMap{ $0.offset < 3 ? $0.element : nil }
|
||||
}
|
||||
|
||||
func validateAnswer() {
|
||||
if textView.text == currentWord {
|
||||
if questionsAnswered == 4 {
|
||||
setPin(mnemonic: mnemonic)
|
||||
} else {
|
||||
textView.text = ""
|
||||
setQuestion(animated: true)
|
||||
}
|
||||
} else {
|
||||
textView.textColor = UIColor.red
|
||||
textView.shake()
|
||||
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.8) {
|
||||
self.textView.text = ""
|
||||
self.textView.textColor = Colors.darkGray
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func setQuestion(animated: Bool) {
|
||||
if questionWords.count == 0 {
|
||||
questionWords = mnemonic.components(separatedBy: " ")
|
||||
}
|
||||
|
||||
let randomIndex = Int(arc4random_uniform(UInt32(questionWords.count)))
|
||||
currentWord = questionWords[randomIndex]
|
||||
|
||||
if let indexOfWord = mnemonic.components(separatedBy: " ").index(of: currentWord) {
|
||||
questionTitleLabel.text = "What was the word \(String(describing: indexOfWord + 1))?"
|
||||
questionWords.remove(at: randomIndex)
|
||||
questionsAnswered += 1
|
||||
|
||||
setProgress(animated: animated)
|
||||
}
|
||||
}
|
||||
|
||||
func setProgress(animated: Bool) {
|
||||
progressViewWidthConstraint.constant += progressWidth
|
||||
|
||||
navigationItem.title = "Question \(questionsAnswered) of \(totalQuestionCount)"
|
||||
|
||||
if animated {
|
||||
UIView.animate(withDuration: 0.3) {
|
||||
self.view.layoutIfNeeded()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func setPin(mnemonic: String) {
|
||||
let pinViewController = PinViewController(pin: nil, mnemonic: mnemonic)
|
||||
|
||||
navigationController?.pushViewController(pinViewController, animated: true)
|
||||
}
|
||||
}
|
||||
|
||||
extension VerificationViewController: UITextViewDelegate {
|
||||
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
|
||||
clearSuggestions(reload: false)
|
||||
|
||||
let subString = (textView.text! as NSString).replacingCharacters(in: range, with: text)
|
||||
|
||||
if let lastWord = getWords(string: String(subString)).last {
|
||||
suggestions.append(contentsOf: getAutocompleteSuggestions(userText: lastWord))
|
||||
}
|
||||
|
||||
collectionView.reloadData()
|
||||
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
extension VerificationViewController: UICollectionViewDataSource {
|
||||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return suggestions.count
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: WordSuggestionCell.cellIdentifier, for: indexPath) as! WordSuggestionCell
|
||||
cell.titleLabel.text = suggestions[indexPath.row]
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
extension VerificationViewController: UICollectionViewDelegate {
|
||||
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||
let suggestion = suggestions[indexPath.row]
|
||||
var words = getWords(string: textView.text)
|
||||
if words.count > 0 {
|
||||
words.removeLast()
|
||||
}
|
||||
words.append(suggestion)
|
||||
|
||||
textView.text = words.joined(separator: " ")
|
||||
|
||||
if type != .questions {
|
||||
textView.text.append(" ")
|
||||
}
|
||||
|
||||
clearSuggestions(reload: true)
|
||||
}
|
||||
}
|
||||
|
||||
extension VerificationViewController: UICollectionViewDelegateFlowLayout {
|
||||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
||||
return CGSize(width: UIScreen.main.bounds.size.width / 3, height: collectionView.frame.size.height)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VerificationViewController" customModule="BlockEQ" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="collectionView" destination="uar-6Q-8gN" id="kUn-rl-saH"/>
|
||||
<outlet property="progressView" destination="Uzi-m7-v4Y" id="YRr-GK-FXZ"/>
|
||||
<outlet property="progressViewWidthConstraint" destination="iCg-9p-Tvw" id="qJJ-bb-QQy"/>
|
||||
<outlet property="questionHolderView" destination="hA1-Ss-YK5" id="KJD-5N-v15"/>
|
||||
<outlet property="questionSubtitleLabel" destination="unw-ad-44A" id="rrD-dy-kNb"/>
|
||||
<outlet property="questionTitleLabel" destination="2fS-Ns-Kt5" id="WIH-L6-fFh"/>
|
||||
<outlet property="questionViewHeightConstraint" destination="x1t-FZ-1LN" id="aHO-xw-Sdr"/>
|
||||
<outlet property="quicktypeView" destination="6gk-Er-zug" id="mus-Bk-3Rt"/>
|
||||
<outlet property="textView" destination="1RZ-No-B37" id="a2c-b1-SVh"/>
|
||||
<outlet property="textViewHeightConstraint" destination="X2s-CM-6Vh" id="QXG-H1-zXA"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<textView multipleTouchEnabled="YES" contentMode="scaleToFill" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="1RZ-No-B37">
|
||||
<rect key="frame" x="0.0" y="88" width="375" height="150"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="150" id="X2s-CM-6Vh"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<textInputTraits key="textInputTraits" autocorrectionType="no"/>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<outlet property="delegate" destination="-1" id="xVb-Ea-F9I"/>
|
||||
</connections>
|
||||
</textView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Smi-Lv-1zE">
|
||||
<rect key="frame" x="0.0" y="238" width="375" height="1"/>
|
||||
<color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="1HU-Vd-0TB"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view clipsSubviews="YES" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hA1-Ss-YK5">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="88"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="What was the word 4?" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2fS-Ns-Kt5">
|
||||
<rect key="frame" x="16" y="20" width="343" height="21"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" priority="999" constant="21" id="GgV-QU-hbK"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="18"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="We are making sure you have your code right." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="unw-ad-44A">
|
||||
<rect key="frame" x="16" y="49" width="343" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" priority="999" constant="16" id="XAC-ry-CVq"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="14"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="etX-l5-0b2">
|
||||
<rect key="frame" x="0.0" y="87" width="375" height="1"/>
|
||||
<color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" priority="999" constant="1" id="hjb-WR-BRB"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Uzi-m7-v4Y">
|
||||
<rect key="frame" x="0.0" y="85" width="0.0" height="2"/>
|
||||
<color key="backgroundColor" red="0.0" green="0.98106676339999999" blue="0.57369142770000003" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" priority="999" constant="2" id="GhN-ZQ-7TF"/>
|
||||
<constraint firstAttribute="width" id="iCg-9p-Tvw"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="etX-l5-0b2" firstAttribute="top" secondItem="Uzi-m7-v4Y" secondAttribute="bottom" id="3Hq-D9-kgk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="etX-l5-0b2" secondAttribute="bottom" id="9MW-nY-0f4"/>
|
||||
<constraint firstItem="2fS-Ns-Kt5" firstAttribute="top" secondItem="hA1-Ss-YK5" secondAttribute="top" constant="20" id="F3H-r4-Ebj"/>
|
||||
<constraint firstItem="2fS-Ns-Kt5" firstAttribute="leading" secondItem="hA1-Ss-YK5" secondAttribute="leading" constant="16" id="G9B-wk-gdU"/>
|
||||
<constraint firstItem="etX-l5-0b2" firstAttribute="leading" secondItem="hA1-Ss-YK5" secondAttribute="leading" id="Goa-iN-q0h"/>
|
||||
<constraint firstAttribute="trailing" secondItem="2fS-Ns-Kt5" secondAttribute="trailing" constant="16" id="KKp-rA-FE4"/>
|
||||
<constraint firstItem="Uzi-m7-v4Y" firstAttribute="leading" secondItem="hA1-Ss-YK5" secondAttribute="leading" id="MHm-Kp-EnP"/>
|
||||
<constraint firstItem="unw-ad-44A" firstAttribute="top" secondItem="2fS-Ns-Kt5" secondAttribute="bottom" constant="8" id="N3I-vR-0tF"/>
|
||||
<constraint firstAttribute="trailing" secondItem="unw-ad-44A" secondAttribute="trailing" constant="16" id="YbB-Om-atb"/>
|
||||
<constraint firstItem="unw-ad-44A" firstAttribute="leading" secondItem="hA1-Ss-YK5" secondAttribute="leading" constant="16" id="ZFm-8w-hwl"/>
|
||||
<constraint firstAttribute="height" constant="88" id="x1t-FZ-1LN"/>
|
||||
<constraint firstAttribute="trailing" secondItem="etX-l5-0b2" secondAttribute="trailing" id="yVb-FM-IHT"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="Smi-Lv-1zE" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" id="6rP-Rs-kof"/>
|
||||
<constraint firstItem="hA1-Ss-YK5" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="Avh-eS-wXa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Smi-Lv-1zE" secondAttribute="trailing" id="CX8-Ml-V4i"/>
|
||||
<constraint firstItem="1RZ-No-B37" firstAttribute="top" secondItem="hA1-Ss-YK5" secondAttribute="bottom" id="F6I-aC-5gM"/>
|
||||
<constraint firstItem="Smi-Lv-1zE" firstAttribute="top" secondItem="1RZ-No-B37" secondAttribute="bottom" id="Fz5-sH-MW8"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="1RZ-No-B37" secondAttribute="trailing" id="SeI-5X-qW8"/>
|
||||
<constraint firstItem="hA1-Ss-YK5" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="aKN-eX-VST"/>
|
||||
<constraint firstItem="hA1-Ss-YK5" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" id="uc3-5Q-eHl"/>
|
||||
<constraint firstItem="1RZ-No-B37" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="zWX-7s-we5"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||
<point key="canvasLocation" x="-24.5" y="-39.5"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="6gk-Er-zug">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="90"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<toolbar opaque="NO" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" translucent="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tbP-7l-CPQ">
|
||||
<rect key="frame" x="0.0" y="50" width="375" height="40"/>
|
||||
<color key="backgroundColor" red="0.81992548704147339" green="0.83505350351333618" blue="0.85882049798965454" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="fdh-bm-BOd"/>
|
||||
</constraints>
|
||||
<items/>
|
||||
<color key="barTintColor" red="0.72976213693618774" green="0.74877750873565674" blue="0.77254676818847656" alpha="1" colorSpace="custom" customColorSpace="displayP3"/>
|
||||
</toolbar>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="QNY-cd-5bI" customClass="AppButton" customModule="BlockEQ" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="50"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="50" id="xOn-AF-Uji"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
<state key="normal" title="Next"/>
|
||||
<connections>
|
||||
<action selector="nextButtonSelected" destination="-1" eventType="touchUpInside" id="cK0-jK-aOj"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="M3R-MU-x80">
|
||||
<rect key="frame" x="0.0" y="50" width="125" height="40"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aq7-hu-tao">
|
||||
<rect key="frame" x="124" y="0.0" width="1" height="40"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.5" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="Bls-cs-oi0"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="aq7-hu-tao" secondAttribute="trailing" id="GiQ-Fj-iZT"/>
|
||||
<constraint firstAttribute="bottom" secondItem="aq7-hu-tao" secondAttribute="bottom" id="Wcp-d0-YkK"/>
|
||||
<constraint firstItem="aq7-hu-tao" firstAttribute="top" secondItem="M3R-MU-x80" secondAttribute="top" id="sMD-Ht-liL"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="dyQ-zc-0Ln">
|
||||
<rect key="frame" x="125" y="50" width="125" height="40"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OM9-VT-Fsi">
|
||||
<rect key="frame" x="124" y="0.0" width="1" height="40"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.5" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="kVX-YT-jZa"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="OM9-VT-Fsi" secondAttribute="trailing" id="JX0-V2-JDY"/>
|
||||
<constraint firstItem="OM9-VT-Fsi" firstAttribute="top" secondItem="dyQ-zc-0Ln" secondAttribute="top" id="OxP-A6-P0s"/>
|
||||
<constraint firstAttribute="bottom" secondItem="OM9-VT-Fsi" secondAttribute="bottom" id="u6J-Ay-hBp"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="q14-Hu-xUG">
|
||||
<rect key="frame" x="250" y="50" width="125" height="40"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="YUX-Kc-aJH">
|
||||
<rect key="frame" x="124" y="0.0" width="1" height="40"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.5" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="QdI-Ky-4Ug"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="YUX-Kc-aJH" secondAttribute="trailing" id="8u0-S1-6FS"/>
|
||||
<constraint firstItem="YUX-Kc-aJH" firstAttribute="top" secondItem="q14-Hu-xUG" secondAttribute="top" id="D8G-wL-lsa"/>
|
||||
<constraint firstAttribute="bottom" secondItem="YUX-Kc-aJH" secondAttribute="bottom" id="WJE-Id-xYj"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" bouncesZoom="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="uar-6Q-8gN">
|
||||
<rect key="frame" x="0.0" y="50" width="375" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="N6U-dt-3DW">
|
||||
<size key="itemSize" width="50" height="50"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="-1" id="u9s-8s-QkL"/>
|
||||
<outlet property="delegate" destination="-1" id="jel-8i-wxd"/>
|
||||
</connections>
|
||||
</collectionView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="uar-6Q-8gN" firstAttribute="top" secondItem="QNY-cd-5bI" secondAttribute="bottom" id="55g-Qo-m6f"/>
|
||||
<constraint firstItem="Bg2-qB-zmp" firstAttribute="bottom" secondItem="q14-Hu-xUG" secondAttribute="bottom" id="6VC-wU-S2B"/>
|
||||
<constraint firstItem="M3R-MU-x80" firstAttribute="bottom" secondItem="Bg2-qB-zmp" secondAttribute="bottom" id="6t4-fq-iit"/>
|
||||
<constraint firstItem="uar-6Q-8gN" firstAttribute="trailing" secondItem="Bg2-qB-zmp" secondAttribute="trailing" id="ACY-Il-cnw"/>
|
||||
<constraint firstItem="QNY-cd-5bI" firstAttribute="leading" secondItem="Bg2-qB-zmp" secondAttribute="leading" id="AT1-Ww-N86"/>
|
||||
<constraint firstItem="M3R-MU-x80" firstAttribute="bottom" secondItem="Bg2-qB-zmp" secondAttribute="bottom" id="DTV-yl-J0j"/>
|
||||
<constraint firstItem="QNY-cd-5bI" firstAttribute="top" secondItem="Bg2-qB-zmp" secondAttribute="top" id="IJ9-Dg-1mu"/>
|
||||
<constraint firstItem="dyQ-zc-0Ln" firstAttribute="top" secondItem="QNY-cd-5bI" secondAttribute="bottom" id="IuS-vg-NEO"/>
|
||||
<constraint firstItem="uar-6Q-8gN" firstAttribute="bottom" secondItem="Bg2-qB-zmp" secondAttribute="bottom" id="Lec-ZZ-Tf8"/>
|
||||
<constraint firstItem="QNY-cd-5bI" firstAttribute="trailing" secondItem="Bg2-qB-zmp" secondAttribute="trailing" id="P66-Zw-SCy"/>
|
||||
<constraint firstItem="tbP-7l-CPQ" firstAttribute="trailing" secondItem="Bg2-qB-zmp" secondAttribute="trailing" id="Pae-DT-yhq"/>
|
||||
<constraint firstItem="q14-Hu-xUG" firstAttribute="width" secondItem="M3R-MU-x80" secondAttribute="width" id="PxP-dB-hp1"/>
|
||||
<constraint firstItem="tbP-7l-CPQ" firstAttribute="leading" secondItem="Bg2-qB-zmp" secondAttribute="leading" id="QbA-SV-yhK"/>
|
||||
<constraint firstItem="tbP-7l-CPQ" firstAttribute="bottom" secondItem="Bg2-qB-zmp" secondAttribute="bottom" id="TF2-ox-VDW"/>
|
||||
<constraint firstItem="q14-Hu-xUG" firstAttribute="top" secondItem="QNY-cd-5bI" secondAttribute="bottom" id="UgL-yj-pca"/>
|
||||
<constraint firstItem="dyQ-zc-0Ln" firstAttribute="width" secondItem="M3R-MU-x80" secondAttribute="width" id="Uie-Ie-8b4"/>
|
||||
<constraint firstItem="dyQ-zc-0Ln" firstAttribute="leading" secondItem="M3R-MU-x80" secondAttribute="trailing" id="WPW-IL-KZs"/>
|
||||
<constraint firstItem="q14-Hu-xUG" firstAttribute="leading" secondItem="dyQ-zc-0Ln" secondAttribute="trailing" id="XDP-fI-p5K"/>
|
||||
<constraint firstItem="M3R-MU-x80" firstAttribute="top" secondItem="QNY-cd-5bI" secondAttribute="bottom" id="Yvf-wE-X8X"/>
|
||||
<constraint firstItem="M3R-MU-x80" firstAttribute="leading" secondItem="Bg2-qB-zmp" secondAttribute="leading" id="bm6-PE-TFY"/>
|
||||
<constraint firstItem="uar-6Q-8gN" firstAttribute="leading" secondItem="Bg2-qB-zmp" secondAttribute="leading" id="kdM-Pz-YJf"/>
|
||||
<constraint firstItem="dyQ-zc-0Ln" firstAttribute="bottom" secondItem="Bg2-qB-zmp" secondAttribute="bottom" id="pUz-fw-scB"/>
|
||||
<constraint firstItem="M3R-MU-x80" firstAttribute="top" secondItem="QNY-cd-5bI" secondAttribute="bottom" id="tXj-An-u35"/>
|
||||
<constraint firstItem="q14-Hu-xUG" firstAttribute="trailing" secondItem="Bg2-qB-zmp" secondAttribute="trailing" id="vC0-Zn-5Tt"/>
|
||||
<constraint firstItem="M3R-MU-x80" firstAttribute="leading" secondItem="Bg2-qB-zmp" secondAttribute="leading" id="vp6-JP-ZXf"/>
|
||||
<constraint firstItem="tbP-7l-CPQ" firstAttribute="top" secondItem="QNY-cd-5bI" secondAttribute="bottom" id="wDa-2j-oI8"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<viewLayoutGuide key="safeArea" id="Bg2-qB-zmp"/>
|
||||
<point key="canvasLocation" x="-25.5" y="392"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,54 @@
|
|||
//
|
||||
// WalletTitleViewController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class WalletTitleViewController: UIViewController {
|
||||
|
||||
@IBOutlet var textField: UITextField!
|
||||
@IBOutlet var underlineView: UIView!
|
||||
|
||||
@IBAction func saveTitle() {
|
||||
dismissView()
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
init() {
|
||||
super.init(nibName: String(describing: WalletTitleViewController.self), bundle: nil)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
navigationItem.title = "New Wallet"
|
||||
|
||||
let image = UIImage(named:"close")
|
||||
let leftBarButtonItem = UIBarButtonItem(image: image, style: .plain, target: self, action: #selector(self.dismissView))
|
||||
navigationItem.leftBarButtonItem = leftBarButtonItem
|
||||
|
||||
textField.textColor = Colors.primaryDark
|
||||
textField.text = "My Wallet"
|
||||
view.backgroundColor = Colors.lightBackground
|
||||
|
||||
underlineView.backgroundColor = Colors.primaryDark
|
||||
underlineView.alpha = Alphas.transparent
|
||||
}
|
||||
|
||||
@objc func dismissView() {
|
||||
view.endEditing(true)
|
||||
|
||||
dismiss(animated: true, completion: nil)
|
||||
}
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WalletTitleViewController" customModule="BlockEQ" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="textField" destination="GtY-Jd-vQb" id="ckl-ge-b9h"/>
|
||||
<outlet property="underlineView" destination="3f1-Ho-hFQ" id="ATI-iA-W0V"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="603"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3f1-Ho-hFQ">
|
||||
<rect key="frame" x="16" y="90" width="343" height="1"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="Y8P-lC-z3T"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="center" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="GtY-Jd-vQb">
|
||||
<rect key="frame" x="16" y="50" width="343" height="40"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="40" id="CbW-kt-DFp"/>
|
||||
</constraints>
|
||||
<nil key="textColor"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="22"/>
|
||||
<textInputTraits key="textInputTraits" autocapitalizationType="words"/>
|
||||
</textField>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bzc-JH-vZP" customClass="AppButton" customModule="BlockEQ" customModuleProvider="target">
|
||||
<rect key="frame" x="16" y="131" width="343" height="55"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="55" id="LjQ-VE-xGX"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
<state key="normal" title="Save">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="2"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
<connections>
|
||||
<action selector="saveTitle" destination="-1" eventType="touchUpInside" id="31n-O2-Dql"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="GtY-Jd-vQb" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="3qO-Ud-7e5"/>
|
||||
<constraint firstItem="bzc-JH-vZP" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="3so-5o-v50"/>
|
||||
<constraint firstItem="3f1-Ho-hFQ" firstAttribute="top" secondItem="GtY-Jd-vQb" secondAttribute="bottom" id="6eJ-YC-RfB"/>
|
||||
<constraint firstAttribute="trailing" secondItem="bzc-JH-vZP" secondAttribute="trailing" constant="16" id="A3A-J6-9Hz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="GtY-Jd-vQb" secondAttribute="trailing" constant="16" id="YyH-rc-ake"/>
|
||||
<constraint firstItem="GtY-Jd-vQb" firstAttribute="top" secondItem="i5M-Pr-FkT" secondAttribute="top" constant="50" id="dgS-Um-3cy"/>
|
||||
<constraint firstItem="bzc-JH-vZP" firstAttribute="top" secondItem="3f1-Ho-hFQ" secondAttribute="bottom" constant="40" id="fwX-uM-vfh"/>
|
||||
<constraint firstItem="3f1-Ho-hFQ" firstAttribute="leading" secondItem="i5M-Pr-FkT" secondAttribute="leading" constant="16" id="mjX-Ir-YNg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="3f1-Ho-hFQ" secondAttribute="trailing" constant="16" id="z21-ww-aaG"/>
|
||||
</constraints>
|
||||
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" translucent="NO" prompted="NO"/>
|
||||
<viewLayoutGuide key="safeArea" id="ikT-NA-lQB"/>
|
||||
<point key="canvasLocation" x="33.5" y="54.5"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,130 @@
|
|||
//
|
||||
// WalletViewController.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class WalletViewController: UIViewController {
|
||||
|
||||
@IBOutlet var activityIndicator: UIActivityIndicatorView!
|
||||
@IBOutlet var collectionView: UICollectionView!
|
||||
@IBOutlet var pageControl: UIPageControl!
|
||||
@IBOutlet var tableView: UITableView!
|
||||
@IBOutlet var tableViewHeader: UIView!
|
||||
@IBOutlet var tableViewHeaderLeftLabel: UILabel!
|
||||
@IBOutlet var tableViewHeaderRightLabel: UILabel!
|
||||
@IBOutlet var logoImageView: UIImageView!
|
||||
|
||||
@IBAction func receiveFunds() {
|
||||
let receiveViewController = ReceiveViewController(address: "b1RXUJgnuxtzHyJ5UTWerh4pNBWcVikESZe")
|
||||
let navigationController = AppNavigationController(rootViewController: receiveViewController)
|
||||
|
||||
present(navigationController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
@IBAction func sendFunds() {
|
||||
let sendViewController = SendViewController()
|
||||
let navigationController = AppNavigationController(rootViewController: sendViewController)
|
||||
|
||||
present(navigationController, animated: true, completion: nil)
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
}
|
||||
|
||||
init() {
|
||||
super.init(nibName: String(describing: WalletViewController.self), bundle: nil)
|
||||
}
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
override func viewWillAppear(_ animated: Bool) {
|
||||
super.viewWillAppear(animated)
|
||||
|
||||
navigationItem.setHidesBackButton(true, animated: false)
|
||||
navigationController?.setNavigationBarHidden(false, animated: true)
|
||||
}
|
||||
|
||||
func setupView() {
|
||||
let collectionViewNib = UINib(nibName: WalletCell.cellIdentifier, bundle: nil)
|
||||
collectionView.register(collectionViewNib, forCellWithReuseIdentifier: WalletCell.cellIdentifier)
|
||||
|
||||
let tableViewNib = UINib(nibName: TransactionHistoryCell.cellIdentifier, bundle: nil)
|
||||
tableView.register(tableViewNib, forCellReuseIdentifier: TransactionHistoryCell.cellIdentifier)
|
||||
|
||||
navigationItem.titleView = logoImageView
|
||||
|
||||
tableViewHeaderLeftLabel.textColor = Colors.darkGrayTransparent
|
||||
tableViewHeaderRightLabel.textColor = Colors.darkGrayTransparent
|
||||
pageControl.currentPageIndicatorTintColor = Colors.primaryDark
|
||||
pageControl.pageIndicatorTintColor = Colors.primaryDarkTransparent
|
||||
tableView.backgroundColor = Colors.lightBackground
|
||||
view.backgroundColor = Colors.primaryDark
|
||||
}
|
||||
}
|
||||
|
||||
extension WalletViewController: UICollectionViewDataSource {
|
||||
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
|
||||
return 2
|
||||
}
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
|
||||
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: WalletCell.cellIdentifier, for: indexPath) as! WalletCell
|
||||
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
extension WalletViewController: UICollectionViewDelegateFlowLayout {
|
||||
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
|
||||
return CGSize(width: UIScreen.main.bounds.size.width, height: collectionView.frame.size.height)
|
||||
}
|
||||
}
|
||||
|
||||
extension WalletViewController: UITableViewDataSource {
|
||||
func numberOfSections(in tableView: UITableView) -> Int {
|
||||
return 1
|
||||
}
|
||||
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
|
||||
return 10
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
|
||||
return tableViewHeader
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
|
||||
return tableViewHeader.frame.size.height
|
||||
}
|
||||
|
||||
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
|
||||
let cell = tableView.dequeueReusableCell(withIdentifier: TransactionHistoryCell.cellIdentifier, for: indexPath) as! TransactionHistoryCell
|
||||
|
||||
return cell
|
||||
}
|
||||
}
|
||||
|
||||
extension WalletViewController: UITableViewDelegate {
|
||||
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
|
||||
return TransactionHistoryCell.rowHeight
|
||||
}
|
||||
}
|
||||
|
||||
extension WalletViewController: UIScrollViewDelegate {
|
||||
func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
|
||||
if scrollView == collectionView {
|
||||
pageControl.currentPage = Int(scrollView.contentOffset.x) / Int(scrollView.frame.width)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WalletViewController" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="activityIndicator" destination="XTw-X2-zen" id="AGu-jf-2CW"/>
|
||||
<outlet property="collectionView" destination="7gV-QE-QZ2" id="DCF-1B-bjs"/>
|
||||
<outlet property="logoImageView" destination="PSG-hA-d0V" id="lIG-qn-FiV"/>
|
||||
<outlet property="pageControl" destination="nLk-Zq-d0C" id="4Ts-3C-DLs"/>
|
||||
<outlet property="tableView" destination="RND-qr-8sK" id="KCK-vC-wWn"/>
|
||||
<outlet property="tableViewHeader" destination="4NM-Ce-BUW" id="OYB-C5-0dx"/>
|
||||
<outlet property="tableViewHeaderLeftLabel" destination="o6L-OM-2GN" id="Ggg-Qo-yeD"/>
|
||||
<outlet property="tableViewHeaderRightLabel" destination="zfp-gk-e1p" id="SM1-9c-bbl"/>
|
||||
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="RND-qr-8sK">
|
||||
<rect key="frame" x="0.0" y="20" width="375" height="597"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<view key="tableHeaderView" contentMode="scaleToFill" id="jUg-o4-zFw">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="255"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<pageControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" numberOfPages="2" translatesAutoresizingMaskIntoConstraints="NO" id="nLk-Zq-d0C">
|
||||
<rect key="frame" x="16" y="220" width="343" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="20" id="kuI-an-vTN"/>
|
||||
</constraints>
|
||||
</pageControl>
|
||||
<collectionView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" pagingEnabled="YES" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" dataMode="none" translatesAutoresizingMaskIntoConstraints="NO" id="7gV-QE-QZ2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="220"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="220" id="j5i-Dy-Lcv"/>
|
||||
</constraints>
|
||||
<collectionViewFlowLayout key="collectionViewLayout" scrollDirection="horizontal" minimumLineSpacing="0.0" minimumInteritemSpacing="0.0" id="GvJ-er-0QK">
|
||||
<size key="itemSize" width="50" height="50"/>
|
||||
<size key="headerReferenceSize" width="0.0" height="0.0"/>
|
||||
<size key="footerReferenceSize" width="0.0" height="0.0"/>
|
||||
<inset key="sectionInset" minX="0.0" minY="0.0" maxX="0.0" maxY="0.0"/>
|
||||
</collectionViewFlowLayout>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="-1" id="zkk-AZ-y6X"/>
|
||||
<outlet property="delegate" destination="-1" id="oqy-1K-OOp"/>
|
||||
</connections>
|
||||
</collectionView>
|
||||
<activityIndicatorView hidden="YES" opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="XTw-X2-zen">
|
||||
<rect key="frame" x="177" y="117.5" width="20" height="20"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="20" id="T6Q-BM-bwb"/>
|
||||
<constraint firstAttribute="height" constant="20" id="TF2-9F-wYu"/>
|
||||
</constraints>
|
||||
</activityIndicatorView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="nLk-Zq-d0C" firstAttribute="leading" secondItem="jUg-o4-zFw" secondAttribute="leading" constant="16" id="Cvz-3s-Zvp"/>
|
||||
<constraint firstItem="nLk-Zq-d0C" firstAttribute="top" secondItem="7gV-QE-QZ2" secondAttribute="bottom" id="G5l-kr-OYP"/>
|
||||
<constraint firstItem="7gV-QE-QZ2" firstAttribute="top" secondItem="jUg-o4-zFw" secondAttribute="top" id="Gec-DI-UWh"/>
|
||||
<constraint firstItem="7gV-QE-QZ2" firstAttribute="leading" secondItem="jUg-o4-zFw" secondAttribute="leading" id="bJw-Xn-9gz"/>
|
||||
<constraint firstAttribute="trailing" secondItem="nLk-Zq-d0C" secondAttribute="trailing" constant="16" id="coW-ea-ojO"/>
|
||||
<constraint firstAttribute="bottom" secondItem="nLk-Zq-d0C" secondAttribute="bottom" constant="15" id="ejb-ov-VWF"/>
|
||||
<constraint firstItem="XTw-X2-zen" firstAttribute="centerX" secondItem="jUg-o4-zFw" secondAttribute="centerX" id="kgc-6R-yMf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="7gV-QE-QZ2" secondAttribute="trailing" id="q5Y-zr-fgZ"/>
|
||||
<constraint firstItem="XTw-X2-zen" firstAttribute="centerY" secondItem="jUg-o4-zFw" secondAttribute="centerY" id="qG1-d0-aoU"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<connections>
|
||||
<outlet property="dataSource" destination="-1" id="2AT-b2-HpC"/>
|
||||
<outlet property="delegate" destination="-1" id="kR3-CB-tuL"/>
|
||||
</connections>
|
||||
</tableView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cnR-fu-BEJ">
|
||||
<rect key="frame" x="0.0" y="617" width="375" height="50"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vzu-if-RO0" customClass="AppButton" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="187.5" height="50"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
<state key="normal" title="Send">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="sendFunds" destination="-1" eventType="touchUpInside" id="bL8-sb-vQ6"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ajF-qq-QLi" customClass="AppButton" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<rect key="frame" x="187.5" y="0.0" width="187.5" height="50"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="18"/>
|
||||
<state key="normal" title="Receive">
|
||||
<color key="titleColor" white="0.0" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="receiveFunds" destination="-1" eventType="touchUpInside" id="ohf-kv-OYw"/>
|
||||
</connections>
|
||||
</button>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="rXY-iH-fGo">
|
||||
<rect key="frame" x="187" y="10.5" width="1" height="30"/>
|
||||
<color key="backgroundColor" white="1" alpha="0.40000000000000002" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="1" id="TSN-6j-If5"/>
|
||||
<constraint firstAttribute="height" constant="30" id="a1p-9A-MnN"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="RsT-Vp-iP3"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="ajF-qq-QLi" secondAttribute="trailing" id="2R2-fC-Oz9"/>
|
||||
<constraint firstAttribute="bottom" secondItem="ajF-qq-QLi" secondAttribute="bottom" id="4h7-uy-ond"/>
|
||||
<constraint firstItem="ajF-qq-QLi" firstAttribute="width" secondItem="vzu-if-RO0" secondAttribute="width" id="6S6-EU-hQr"/>
|
||||
<constraint firstItem="rXY-iH-fGo" firstAttribute="centerX" secondItem="cnR-fu-BEJ" secondAttribute="centerX" id="8W5-Ig-LTi"/>
|
||||
<constraint firstItem="ajF-qq-QLi" firstAttribute="top" secondItem="cnR-fu-BEJ" secondAttribute="top" id="Kfd-5r-0Oo"/>
|
||||
<constraint firstAttribute="height" constant="50" id="Mc2-gZ-QEc"/>
|
||||
<constraint firstItem="rXY-iH-fGo" firstAttribute="centerY" secondItem="cnR-fu-BEJ" secondAttribute="centerY" id="SEp-DE-Wfz"/>
|
||||
<constraint firstItem="ajF-qq-QLi" firstAttribute="leading" secondItem="vzu-if-RO0" secondAttribute="trailing" id="V7p-U2-KBo"/>
|
||||
<constraint firstItem="vzu-if-RO0" firstAttribute="top" secondItem="cnR-fu-BEJ" secondAttribute="top" id="ZUV-oO-zGk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="vzu-if-RO0" secondAttribute="bottom" id="dcj-mp-jtq"/>
|
||||
<constraint firstItem="vzu-if-RO0" firstAttribute="leading" secondItem="cnR-fu-BEJ" secondAttribute="leading" id="p0l-40-1c8"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.96862745098039216" green="0.96862745098039216" blue="0.96862745098039216" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="RND-qr-8sK" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="2Ei-U5-020"/>
|
||||
<constraint firstItem="cnR-fu-BEJ" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="GF3-iL-43S"/>
|
||||
<constraint firstItem="RND-qr-8sK" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="Jai-af-t3o"/>
|
||||
<constraint firstItem="cnR-fu-BEJ" firstAttribute="top" secondItem="RND-qr-8sK" secondAttribute="bottom" id="QFh-PD-rwo"/>
|
||||
<constraint firstItem="RND-qr-8sK" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="UHY-bw-I7y"/>
|
||||
<constraint firstItem="cnR-fu-BEJ" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="aAV-0n-toz"/>
|
||||
<constraint firstItem="fnl-2z-Ty3" firstAttribute="bottom" secondItem="cnR-fu-BEJ" secondAttribute="bottom" id="vPV-3f-2tE"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
||||
<point key="canvasLocation" x="33.5" y="54.5"/>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" id="4NM-Ce-BUW">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="40"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="ACTIVITY" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="o6L-OM-2GN">
|
||||
<rect key="frame" x="16" y="0.0" width="171.5" height="39"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UAX-hD-Yem">
|
||||
<rect key="frame" x="0.0" y="39" width="375" height="1"/>
|
||||
<color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="Avb-cE-qcs"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="AMOUNT" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zfp-gk-e1p">
|
||||
<rect key="frame" x="187.5" y="0.0" width="171.5" height="39"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="UAX-hD-Yem" firstAttribute="bottom" secondItem="nEb-oZ-2jC" secondAttribute="bottom" id="B5u-Kj-DY0"/>
|
||||
<constraint firstItem="o6L-OM-2GN" firstAttribute="top" secondItem="nEb-oZ-2jC" secondAttribute="top" id="E05-Q2-Wfc"/>
|
||||
<constraint firstItem="nEb-oZ-2jC" firstAttribute="trailing" secondItem="zfp-gk-e1p" secondAttribute="trailing" constant="16" id="H0I-Xj-x4i"/>
|
||||
<constraint firstItem="o6L-OM-2GN" firstAttribute="leading" secondItem="nEb-oZ-2jC" secondAttribute="leading" constant="16" id="J0r-lf-Gdf"/>
|
||||
<constraint firstAttribute="trailing" secondItem="UAX-hD-Yem" secondAttribute="trailing" id="WVH-6g-LSz"/>
|
||||
<constraint firstItem="UAX-hD-Yem" firstAttribute="leading" secondItem="4NM-Ce-BUW" secondAttribute="leading" id="crj-5o-B1F"/>
|
||||
<constraint firstItem="zfp-gk-e1p" firstAttribute="leading" secondItem="o6L-OM-2GN" secondAttribute="trailing" id="dmr-9Z-Lbn"/>
|
||||
<constraint firstItem="zfp-gk-e1p" firstAttribute="top" secondItem="nEb-oZ-2jC" secondAttribute="top" id="eWr-Wd-gy9"/>
|
||||
<constraint firstItem="UAX-hD-Yem" firstAttribute="top" secondItem="o6L-OM-2GN" secondAttribute="bottom" id="fDQ-1n-uxN"/>
|
||||
<constraint firstItem="zfp-gk-e1p" firstAttribute="width" secondItem="o6L-OM-2GN" secondAttribute="width" id="mBC-zU-ieD"/>
|
||||
<constraint firstItem="UAX-hD-Yem" firstAttribute="top" secondItem="zfp-gk-e1p" secondAttribute="bottom" id="zXf-oS-ntE"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<viewLayoutGuide key="safeArea" id="nEb-oZ-2jC"/>
|
||||
<point key="canvasLocation" x="34" y="491"/>
|
||||
</view>
|
||||
<imageView userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="icon_small" id="PSG-hA-d0V">
|
||||
<rect key="frame" x="0.0" y="0.0" width="30" height="30"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<point key="canvasLocation" x="-235" y="-267"/>
|
||||
</imageView>
|
||||
</objects>
|
||||
<resources>
|
||||
<image name="icon_small" width="30" height="30"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -0,0 +1,36 @@
|
|||
//
|
||||
// NextButton.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class AppButton: UIButton {
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
setupView()
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
setupView()
|
||||
}
|
||||
|
||||
private func setupView() {
|
||||
backgroundColor = Colors.primaryDark
|
||||
setTitleColor(Colors.white, for: .normal)
|
||||
}
|
||||
|
||||
public func setEnabled() {
|
||||
isEnabled = true
|
||||
alpha = Alphas.opaque
|
||||
}
|
||||
|
||||
public func setDisabled() {
|
||||
isEnabled = false
|
||||
alpha = Alphas.transparent
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
//
|
||||
// TransactionHistoryCell.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-10.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class TransactionHistoryCell: UITableViewCell {
|
||||
@IBOutlet var activityLabel: UILabel!
|
||||
@IBOutlet var amountLabel: UILabel!
|
||||
@IBOutlet var dateLabel: UILabel!
|
||||
|
||||
static let cellIdentifier = "TransactionHistoryCell"
|
||||
static let rowHeight: CGFloat = 80.0
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
activityLabel.textColor = Colors.black
|
||||
amountLabel.textColor = Colors.black
|
||||
dateLabel.textColor = Colors.blackTransparent
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_0" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="TransactionHistoryCell" rowHeight="80" id="KGk-i7-Jjw" customClass="TransactionHistoryCell" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="80"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="79.5"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Received" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FOH-as-YRs">
|
||||
<rect key="frame" x="16" y="17" width="123" height="22"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="22" id="K5u-GU-aJg"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="15"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Yesterday" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZPq-yZ-ddv">
|
||||
<rect key="frame" x="16" y="40" width="123" height="22"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="22" id="098-bw-04f"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="12"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2.87564" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="MQD-ZE-nFL">
|
||||
<rect key="frame" x="159" y="17" width="145" height="44.5"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="145" id="NFH-kJ-Fb0"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lsK-ua-Ln9">
|
||||
<rect key="frame" x="0.0" y="78.5" width="320" height="1"/>
|
||||
<color key="backgroundColor" red="0.84705882352941175" green="0.84705882352941175" blue="0.84705882352941175" alpha="0.29999999999999999" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="WTd-34-L68"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="trailing" secondItem="lsK-ua-Ln9" secondAttribute="trailing" id="GQa-qR-eIN"/>
|
||||
<constraint firstItem="FOH-as-YRs" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="17" id="K5T-jl-a2f"/>
|
||||
<constraint firstAttribute="trailing" secondItem="MQD-ZE-nFL" secondAttribute="trailing" constant="16" id="K7V-I9-uUF"/>
|
||||
<constraint firstAttribute="bottom" secondItem="lsK-ua-Ln9" secondAttribute="bottom" id="LYw-5g-559"/>
|
||||
<constraint firstItem="MQD-ZE-nFL" firstAttribute="leading" secondItem="FOH-as-YRs" secondAttribute="trailing" constant="20" id="Red-NZ-3T8"/>
|
||||
<constraint firstItem="ZPq-yZ-ddv" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="Xj6-v8-KSV"/>
|
||||
<constraint firstItem="lsK-ua-Ln9" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="ZDC-sK-otZ"/>
|
||||
<constraint firstItem="lsK-ua-Ln9" firstAttribute="top" secondItem="ZPq-yZ-ddv" secondAttribute="bottom" constant="17" id="adD-uc-gAN"/>
|
||||
<constraint firstItem="FOH-as-YRs" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="16" id="cL9-Hs-2zy"/>
|
||||
<constraint firstItem="MQD-ZE-nFL" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="17" id="d6P-pk-cGI"/>
|
||||
<constraint firstItem="MQD-ZE-nFL" firstAttribute="leading" secondItem="ZPq-yZ-ddv" secondAttribute="trailing" constant="20" id="gQN-uo-gX3"/>
|
||||
<constraint firstItem="lsK-ua-Ln9" firstAttribute="top" secondItem="MQD-ZE-nFL" secondAttribute="bottom" constant="17" id="jn9-ya-42C"/>
|
||||
</constraints>
|
||||
</tableViewCellContentView>
|
||||
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
|
||||
<connections>
|
||||
<outlet property="activityLabel" destination="FOH-as-YRs" id="r08-f0-H1s"/>
|
||||
<outlet property="amountLabel" destination="MQD-ZE-nFL" id="Mik-J6-aad"/>
|
||||
<outlet property="dateLabel" destination="ZPq-yZ-ddv" id="whm-7u-msU"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-79" y="57"/>
|
||||
</tableViewCell>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// WalletCollectionViewCell.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-10.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class WalletCell: UICollectionViewCell {
|
||||
|
||||
@IBOutlet var holdingView: UIView!
|
||||
@IBOutlet var titleLabel: UILabel!
|
||||
@IBOutlet var currencyLabel: UILabel!
|
||||
@IBOutlet var amountLabel: UILabel!
|
||||
@IBOutlet var convertedCurrencyLabel: UILabel!
|
||||
|
||||
static let cellIdentifier = "WalletCell"
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
titleLabel.textColor = Colors.darkGray
|
||||
currencyLabel.textColor = Colors.primaryDark
|
||||
amountLabel.textColor = Colors.darkGray
|
||||
convertedCurrencyLabel.textColor = Colors.darkGrayTransparent
|
||||
}
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="WalletCell" id="gTV-IL-0wX" customClass="WalletCell" customModule="Bitcoin_Private" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="195"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="195"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Lba-n1-BZI">
|
||||
<rect key="frame" x="0.0" y="0.0" width="320" height="180"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qco-iz-Jdy">
|
||||
<rect key="frame" x="0.0" y="179" width="320" height="1"/>
|
||||
<color key="backgroundColor" red="0.84705882349999995" green="0.84705882349999995" blue="0.84705882349999995" alpha="0.5" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="1" id="2Sq-7v-qBa"/>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="1" id="Ydo-S4-CAJ"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="My Wallet" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Nt5-pT-CkO">
|
||||
<rect key="frame" x="16" y="18" width="288" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="q1b-Vf-auI"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="BTCP" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="EQH-HH-XpQ">
|
||||
<rect key="frame" x="16" y="39" width="288" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="bI8-8A-ryM"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="30.2345" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.5" translatesAutoresizingMaskIntoConstraints="NO" id="G9b-6x-tM5">
|
||||
<rect key="frame" x="16" y="55" width="288" height="91"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="light" pointSize="34"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="CA $1584.90" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="dZL-wA-eP9">
|
||||
<rect key="frame" x="16" y="146" width="288" height="16"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="kdC-TB-jUa"/>
|
||||
</constraints>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="13"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="qco-iz-Jdy" secondAttribute="bottom" id="0bQ-HO-LfX"/>
|
||||
<constraint firstItem="G9b-6x-tM5" firstAttribute="top" secondItem="EQH-HH-XpQ" secondAttribute="bottom" id="5Zb-VK-ydD"/>
|
||||
<constraint firstItem="Nt5-pT-CkO" firstAttribute="top" secondItem="Lba-n1-BZI" secondAttribute="top" constant="18" id="B6b-TS-ovk"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qco-iz-Jdy" secondAttribute="trailing" id="MdP-ci-mRV"/>
|
||||
<constraint firstAttribute="trailing" secondItem="EQH-HH-XpQ" secondAttribute="trailing" constant="16" id="Vmi-8L-g8n"/>
|
||||
<constraint firstItem="EQH-HH-XpQ" firstAttribute="leading" secondItem="Lba-n1-BZI" secondAttribute="leading" constant="16" id="ZAb-cy-pbS"/>
|
||||
<constraint firstItem="G9b-6x-tM5" firstAttribute="leading" secondItem="Lba-n1-BZI" secondAttribute="leading" constant="16" id="bb5-2x-XFt"/>
|
||||
<constraint firstItem="Nt5-pT-CkO" firstAttribute="leading" secondItem="Lba-n1-BZI" secondAttribute="leading" constant="16" id="dcT-rD-LYW"/>
|
||||
<constraint firstItem="qco-iz-Jdy" firstAttribute="leading" secondItem="Lba-n1-BZI" secondAttribute="leading" id="eOR-jh-zN8"/>
|
||||
<constraint firstAttribute="trailing" secondItem="dZL-wA-eP9" secondAttribute="trailing" constant="16" id="fnS-vU-DvZ"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Nt5-pT-CkO" secondAttribute="trailing" constant="16" id="fwQ-Tf-p5e"/>
|
||||
<constraint firstItem="dZL-wA-eP9" firstAttribute="leading" secondItem="Lba-n1-BZI" secondAttribute="leading" constant="16" id="hXz-WP-orM"/>
|
||||
<constraint firstAttribute="bottom" secondItem="dZL-wA-eP9" secondAttribute="bottom" constant="18" id="nT0-TU-JGr"/>
|
||||
<constraint firstItem="dZL-wA-eP9" firstAttribute="top" secondItem="G9b-6x-tM5" secondAttribute="bottom" id="nnd-rH-xVi"/>
|
||||
<constraint firstItem="EQH-HH-XpQ" firstAttribute="top" secondItem="Nt5-pT-CkO" secondAttribute="bottom" constant="5" id="tCn-6K-dh7"/>
|
||||
<constraint firstAttribute="trailing" secondItem="G9b-6x-tM5" secondAttribute="trailing" constant="16" id="tvU-lG-sBF"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
</view>
|
||||
<constraints>
|
||||
<constraint firstItem="Lba-n1-BZI" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="BgG-Je-STc"/>
|
||||
<constraint firstAttribute="trailing" secondItem="Lba-n1-BZI" secondAttribute="trailing" id="GqL-vz-4yy"/>
|
||||
<constraint firstItem="Lba-n1-BZI" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="P59-nw-kB0"/>
|
||||
<constraint firstAttribute="bottom" secondItem="Lba-n1-BZI" secondAttribute="bottom" constant="15" id="irP-H0-FsZ"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
|
||||
<size key="customSize" width="326" height="203"/>
|
||||
<connections>
|
||||
<outlet property="amountLabel" destination="G9b-6x-tM5" id="5Ef-c7-zau"/>
|
||||
<outlet property="convertedCurrencyLabel" destination="dZL-wA-eP9" id="g1V-Fq-gOo"/>
|
||||
<outlet property="currencyLabel" destination="EQH-HH-XpQ" id="vtp-ag-oas"/>
|
||||
<outlet property="holdingView" destination="Lba-n1-BZI" id="DAw-PC-bXM"/>
|
||||
<outlet property="titleLabel" destination="Nt5-pT-CkO" id="ZfR-0X-cDu"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="35" y="42"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,29 @@
|
|||
//
|
||||
// WordSuggestionCell.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-12.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class WordSuggestionCell: UICollectionViewCell {
|
||||
|
||||
@IBOutlet var titleLabel: UILabel!
|
||||
|
||||
static let cellIdentifier = "WordSuggestionCell"
|
||||
|
||||
override func awakeFromNib() {
|
||||
super.awakeFromNib()
|
||||
|
||||
titleLabel.textColor = Colors.white
|
||||
}
|
||||
|
||||
override var isHighlighted: Bool {
|
||||
didSet {
|
||||
contentView.backgroundColor = isHighlighted ? Colors.lightGray : nil
|
||||
titleLabel.textColor = isHighlighted ? Colors.darkGray: Colors.white
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<collectionViewCell opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" reuseIdentifier="WordSuggestionCell" id="gTV-IL-0wX" customClass="WordSuggestionCell" customModule="BlockEQ" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="167" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask"/>
|
||||
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
|
||||
<rect key="frame" x="0.0" y="0.0" width="167" height="50"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qnP-Sf-KEY">
|
||||
<rect key="frame" x="10" y="0.0" width="147" height="50"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="medium" pointSize="16"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
</view>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="qnP-Sf-KEY" secondAttribute="bottom" id="CnI-Oh-BSX"/>
|
||||
<constraint firstAttribute="trailing" secondItem="qnP-Sf-KEY" secondAttribute="trailing" constant="10" id="EmP-KA-xhI"/>
|
||||
<constraint firstItem="qnP-Sf-KEY" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" constant="10" id="YMv-BY-NSS"/>
|
||||
<constraint firstItem="qnP-Sf-KEY" firstAttribute="top" secondItem="gTV-IL-0wX" secondAttribute="top" id="gai-PC-TpW"/>
|
||||
</constraints>
|
||||
<viewLayoutGuide key="safeArea" id="ZTg-uK-7eu"/>
|
||||
<size key="customSize" width="167" height="50"/>
|
||||
<connections>
|
||||
<outlet property="titleLabel" destination="qnP-Sf-KEY" id="0Vc-WH-Iec"/>
|
||||
</connections>
|
||||
<point key="canvasLocation" x="-24.5" y="54"/>
|
||||
</collectionViewCell>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,54 @@
|
|||
//
|
||||
// PillView.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class PillView: UIView {
|
||||
let viewHeight: CGFloat = 30.0
|
||||
let indexWidth: CGFloat = 13.0
|
||||
let indexPadding: CGFloat = 4.0
|
||||
let viewPadding: CGFloat = 10.0
|
||||
let verticalSpacing: CGFloat = 42.0
|
||||
let horizontalSpacing: CGFloat = 8.0
|
||||
|
||||
init(index: String, title: String, origin: CGPoint) {
|
||||
super.init(frame: CGRect(origin: origin, size: CGSize(width: 0.0, height: viewHeight)))
|
||||
|
||||
setupView(index: index, title: title)
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
func setupView(index: String, title: String) {
|
||||
let indexLabel = UILabel(frame: CGRect(x: viewPadding, y: 0.0, width: indexWidth, height: viewHeight))
|
||||
indexLabel.text = index
|
||||
indexLabel.textColor = Colors.lightGray
|
||||
indexLabel.font = UIFont.systemFont(ofSize: 10, weight: .medium)
|
||||
indexLabel.textAlignment = .left
|
||||
|
||||
addSubview(indexLabel)
|
||||
|
||||
let titleLabel = UILabel(frame: CGRect(x: (viewPadding + indexWidth + indexPadding), y: 0.0, width: 0, height: viewHeight))
|
||||
titleLabel.text = title
|
||||
titleLabel.textColor = Colors.darkGray
|
||||
titleLabel.font = UIFont.systemFont(ofSize: 14, weight: .medium)
|
||||
titleLabel.textAlignment = .left
|
||||
let size = titleLabel.text?.size(withAttributes: [.font: titleLabel.font]) ?? .zero
|
||||
titleLabel.frame.size.width = size.width
|
||||
|
||||
addSubview(titleLabel)
|
||||
|
||||
frame.size.width = size.width + (viewPadding * 2) + indexWidth + indexPadding
|
||||
backgroundColor = Colors.white
|
||||
layer.borderColor = Colors.lightGray.cgColor
|
||||
layer.borderWidth = 1.0
|
||||
layer.cornerRadius = 16.0
|
||||
}
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
//
|
||||
// PinView.swift
|
||||
// BlockEQ
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-09.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class PinView: UIView {
|
||||
@IBOutlet weak var dotView: UIView!
|
||||
@IBOutlet weak var underlineView: UIView!
|
||||
@IBOutlet weak var view: UIView!
|
||||
|
||||
fileprivate static let nibName = "PinView"
|
||||
|
||||
init(frame: CGRect, title: String) {
|
||||
super.init(frame: frame)
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
required init?(coder aDecoder: NSCoder) {
|
||||
super.init(coder: aDecoder)
|
||||
|
||||
setupView()
|
||||
}
|
||||
|
||||
private func setupView() {
|
||||
view = NibLoader<UIView>(nibName: PinView.nibName).loadView(owner: self)
|
||||
view.frame = CGRect(origin: .zero, size: frame.size)
|
||||
view.autoresizingMask = UIViewAutoresizing.flexibleWidth
|
||||
view.backgroundColor = Colors.lightBackground
|
||||
|
||||
addSubview(view)
|
||||
}
|
||||
|
||||
public func setEmpty() {
|
||||
dotView.isHidden = true
|
||||
|
||||
underlineView.backgroundColor = Colors.primaryDarkTransparent
|
||||
}
|
||||
|
||||
public func setFilled() {
|
||||
dotView.backgroundColor = Colors.primaryDark
|
||||
dotView.isHidden = false
|
||||
|
||||
underlineView.backgroundColor = Colors.primaryDark
|
||||
}
|
||||
}
|
|
@ -0,0 +1,71 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="13771" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
||||
<device id="retina4_7" orientation="portrait">
|
||||
<adaptation id="fullscreen"/>
|
||||
</device>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="13772"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PinView" customModule="BlockEQ" customModuleProvider="target">
|
||||
<connections>
|
||||
<outlet property="dotView" destination="OYg-PT-1oz" id="3cy-Ps-62A"/>
|
||||
<outlet property="underlineView" destination="lK7-Iz-er4" id="hrs-qB-gzx"/>
|
||||
<outlet property="view" destination="c8X-1z-ubl" id="IEV-7D-Mgi"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" id="c8X-1z-ubl">
|
||||
<rect key="frame" x="0.0" y="0.0" width="70" height="70"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="lK7-Iz-er4">
|
||||
<rect key="frame" x="0.0" y="68" width="70" height="2"/>
|
||||
<color key="backgroundColor" white="0.66666666669999997" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="2" id="aER-84-NNH"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="r8L-iD-yWe">
|
||||
<rect key="frame" x="0.0" y="0.0" width="70" height="68"/>
|
||||
<subviews>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OYg-PT-1oz">
|
||||
<rect key="frame" x="27.5" y="25.5" width="16" height="16"/>
|
||||
<color key="backgroundColor" white="0.33333333329999998" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="16" id="Ocg-Ia-sGt"/>
|
||||
<constraint firstAttribute="width" constant="16" id="d1d-zp-Ifs"/>
|
||||
</constraints>
|
||||
<userDefinedRuntimeAttributes>
|
||||
<userDefinedRuntimeAttribute type="number" keyPath="cornerRadius">
|
||||
<integer key="value" value="8"/>
|
||||
</userDefinedRuntimeAttribute>
|
||||
</userDefinedRuntimeAttributes>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="OYg-PT-1oz" firstAttribute="centerY" secondItem="r8L-iD-yWe" secondAttribute="centerY" id="sPX-bi-MmO"/>
|
||||
<constraint firstItem="OYg-PT-1oz" firstAttribute="centerX" secondItem="r8L-iD-yWe" secondAttribute="centerX" id="uW7-yA-YRV"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="bottom" secondItem="lK7-Iz-er4" secondAttribute="bottom" id="2PJ-3W-bdg"/>
|
||||
<constraint firstAttribute="trailing" secondItem="lK7-Iz-er4" secondAttribute="trailing" id="2jJ-b2-U05"/>
|
||||
<constraint firstItem="r8L-iD-yWe" firstAttribute="top" secondItem="c8X-1z-ubl" secondAttribute="top" id="89M-HG-Qvd"/>
|
||||
<constraint firstItem="r8L-iD-yWe" firstAttribute="leading" secondItem="c8X-1z-ubl" secondAttribute="leading" id="DzM-B3-QzZ"/>
|
||||
<constraint firstItem="lK7-Iz-er4" firstAttribute="top" secondItem="r8L-iD-yWe" secondAttribute="bottom" id="YUL-6D-sBt"/>
|
||||
<constraint firstAttribute="trailing" secondItem="r8L-iD-yWe" secondAttribute="trailing" id="bvS-PF-ktd"/>
|
||||
<constraint firstItem="lK7-Iz-er4" firstAttribute="leading" secondItem="c8X-1z-ubl" secondAttribute="leading" id="ehz-i4-Wsj"/>
|
||||
</constraints>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
<viewLayoutGuide key="safeArea" id="GNG-21-I8c"/>
|
||||
<point key="canvasLocation" x="-117" y="-201"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
|
@ -0,0 +1,36 @@
|
|||
//
|
||||
// Bitcoin_PrivateTests.swift
|
||||
// Bitcoin PrivateTests
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-15.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
@testable import Bitcoin_Private
|
||||
|
||||
class Bitcoin_PrivateTests: XCTestCase {
|
||||
|
||||
override func setUp() {
|
||||
super.setUp()
|
||||
// Put setup code here. This method is called before the invocation of each test method in the class.
|
||||
}
|
||||
|
||||
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() {
|
||||
// This is an example of a functional test case.
|
||||
// Use XCTAssert and related functions to verify your tests produce the correct results.
|
||||
}
|
||||
|
||||
func testPerformanceExample() {
|
||||
// This is an example of a performance test case.
|
||||
self.measure {
|
||||
// Put the code you want to measure the time of here.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -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>$(DEVELOPMENT_LANGUAGE)</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,36 @@
|
|||
//
|
||||
// Bitcoin_PrivateUITests.swift
|
||||
// Bitcoin PrivateUITests
|
||||
//
|
||||
// Created by Satraj Bambra on 2018-03-15.
|
||||
// Copyright © 2018 Satraj Bambra. All rights reserved.
|
||||
//
|
||||
|
||||
import XCTest
|
||||
|
||||
class Bitcoin_PrivateUITests: 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>$(DEVELOPMENT_LANGUAGE)</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,20 @@
|
|||
# Uncomment the next line to define a global platform for your project
|
||||
# platform :ios, '9.0'
|
||||
|
||||
target 'Bitcoin Private' do
|
||||
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
|
||||
use_frameworks!
|
||||
|
||||
# Pods for Bitcoin Private
|
||||
|
||||
target 'Bitcoin PrivateTests' do
|
||||
inherit! :search_paths
|
||||
# Pods for testing
|
||||
end
|
||||
|
||||
target 'Bitcoin PrivateUITests' do
|
||||
inherit! :search_paths
|
||||
# Pods for testing
|
||||
end
|
||||
|
||||
end
|