diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.pbxproj b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.pbxproj new file mode 100644 index 00000000..53a625f0 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.pbxproj @@ -0,0 +1,812 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 6D3D5B21233D496F00E310D1 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5B20233D496F00E310D1 /* AppDelegate.swift */; }; + 6D3D5B2B233D496F00E310D1 /* LuizProcessoTesteSantader.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5B29233D496F00E310D1 /* LuizProcessoTesteSantader.xcdatamodeld */; }; + 6D3D5B2D233D496F00E310D1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6D3D5B2C233D496F00E310D1 /* Assets.xcassets */; }; + 6D3D5B30233D496F00E310D1 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6D3D5B2E233D496F00E310D1 /* LaunchScreen.storyboard */; }; + 6D3D5B3B233D497000E310D1 /* LuizProcessoTesteSantaderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5B3A233D497000E310D1 /* LuizProcessoTesteSantaderTests.swift */; }; + 6D3D5B46233D497000E310D1 /* LuizProcessoTesteSantaderUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5B45233D497000E310D1 /* LuizProcessoTesteSantaderUITests.swift */; }; + 6D3D5B5A233D498C00E310D1 /* FormPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5B54233D498C00E310D1 /* FormPresenter.swift */; }; + 6D3D5B5B233D498C00E310D1 /* FormWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5B55233D498C00E310D1 /* FormWorker.swift */; }; + 6D3D5B5C233D498C00E310D1 /* FormRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5B56233D498C00E310D1 /* FormRouter.swift */; }; + 6D3D5B5D233D498C00E310D1 /* FormModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5B57233D498C00E310D1 /* FormModels.swift */; }; + 6D3D5B5E233D498C00E310D1 /* FormViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5B58233D498C00E310D1 /* FormViewController.swift */; }; + 6D3D5B5F233D498C00E310D1 /* FormInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5B59233D498C00E310D1 /* FormInteractor.swift */; }; + 6D3D5BA4233D6E4D00E310D1 /* TxtFieldTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BA2233D6E4D00E310D1 /* TxtFieldTableViewCell.swift */; }; + 6D3D5BA9233D6E7700E310D1 /* SendTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BA7233D6E7700E310D1 /* SendTableViewCell.swift */; }; + 6D3D5BAC233D6E9200E310D1 /* VisualFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BAB233D6E9200E310D1 /* VisualFormat.swift */; }; + 6D3D5BAE233E84A400E310D1 /* FormView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BAD233E84A400E310D1 /* FormView.swift */; }; + 6D3D5BB6233E857300E310D1 /* InvestPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BB0233E857300E310D1 /* InvestPresenter.swift */; }; + 6D3D5BB7233E857300E310D1 /* InvestWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BB1233E857300E310D1 /* InvestWorker.swift */; }; + 6D3D5BB8233E857300E310D1 /* InvestRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BB2233E857300E310D1 /* InvestRouter.swift */; }; + 6D3D5BB9233E857300E310D1 /* InvestModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BB3233E857300E310D1 /* InvestModels.swift */; }; + 6D3D5BBA233E857300E310D1 /* InvestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BB4233E857300E310D1 /* InvestViewController.swift */; }; + 6D3D5BBB233E857300E310D1 /* InvestInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BB5233E857300E310D1 /* InvestInteractor.swift */; }; + 6D3D5BBD233E8E6400E310D1 /* InvestView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BBC233E8E6300E310D1 /* InvestView.swift */; }; + 6D3D5BBF233E8F8A00E310D1 /* CustomColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BBE233E8F8A00E310D1 /* CustomColors.swift */; }; + 6D3D5BC8233EB16200E310D1 /* ViewInfoObj.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BC7233EB16200E310D1 /* ViewInfoObj.swift */; }; + 6D3D5BCA233ECFA200E310D1 /* ViewInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BC9233ECFA200E310D1 /* ViewInfo.swift */; }; + 6D3D5BCC233ECFB600E310D1 /* InvestViewInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BCB233ECFB600E310D1 /* InvestViewInfo.swift */; }; + 6D3D5BCE233FC49300E310D1 /* MessageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BCD233FC49300E310D1 /* MessageView.swift */; }; + 6D3D5BD6233FCF8300E310D1 /* HeaderTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BD5233FCF8300E310D1 /* HeaderTableViewCell.swift */; }; + 6D3D5BD8233FCFAF00E310D1 /* RiskTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BD7233FCFAF00E310D1 /* RiskTableViewCell.swift */; }; + 6D3D5BDA233FCFC500E310D1 /* ReturnTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BD9233FCFC500E310D1 /* ReturnTableViewCell.swift */; }; + 6D3D5BDC233FD02500E310D1 /* InvestInfoTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BDB233FD02500E310D1 /* InvestInfoTableViewCell.swift */; }; + 6D3D5BDE233FD03400E310D1 /* InvestMoreInfoTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BDD233FD03400E310D1 /* InvestMoreInfoTableViewCell.swift */; }; + 6D3D5BE0233FED8500E310D1 /* ImageExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BDF233FED8500E310D1 /* ImageExtension.swift */; }; + 6D3D5BE2233FEFB200E310D1 /* ReturnView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BE1233FEFB200E310D1 /* ReturnView.swift */; }; + 6D3D5BE4233FF3B700E310D1 /* InvestBtnTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BE3233FF3B700E310D1 /* InvestBtnTableViewCell.swift */; }; + 6D3D5BE623401D0200E310D1 /* DoubleExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BE523401D0200E310D1 /* DoubleExtension.swift */; }; + 6D3D5BEE234047C300E310D1 /* MessagePresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BE8234047C300E310D1 /* MessagePresenter.swift */; }; + 6D3D5BEF234047C300E310D1 /* MessageWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BE9234047C300E310D1 /* MessageWorker.swift */; }; + 6D3D5BF0234047C300E310D1 /* MessageRouter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BEA234047C300E310D1 /* MessageRouter.swift */; }; + 6D3D5BF1234047C300E310D1 /* MessageModels.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BEB234047C300E310D1 /* MessageModels.swift */; }; + 6D3D5BF2234047C300E310D1 /* MessageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BEC234047C300E310D1 /* MessageViewController.swift */; }; + 6D3D5BF3234047C300E310D1 /* MessageInteractor.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3D5BED234047C300E310D1 /* MessageInteractor.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 6D3D5B37233D497000E310D1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6D3D5B15233D496F00E310D1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6D3D5B1C233D496F00E310D1; + remoteInfo = LuizProcessoTesteSantader; + }; + 6D3D5B42233D497000E310D1 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 6D3D5B15233D496F00E310D1 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 6D3D5B1C233D496F00E310D1; + remoteInfo = LuizProcessoTesteSantader; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + 6D3D5B1D233D496F00E310D1 /* LuizProcessoTesteSantader.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LuizProcessoTesteSantader.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D3D5B20233D496F00E310D1 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 6D3D5B2A233D496F00E310D1 /* LuizProcessoTesteSantader.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = LuizProcessoTesteSantader.xcdatamodel; sourceTree = ""; }; + 6D3D5B2C233D496F00E310D1 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 6D3D5B2F233D496F00E310D1 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 6D3D5B31233D496F00E310D1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D3D5B36233D497000E310D1 /* LuizProcessoTesteSantaderTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LuizProcessoTesteSantaderTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D3D5B3A233D497000E310D1 /* LuizProcessoTesteSantaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LuizProcessoTesteSantaderTests.swift; sourceTree = ""; }; + 6D3D5B3C233D497000E310D1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D3D5B41233D497000E310D1 /* LuizProcessoTesteSantaderUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LuizProcessoTesteSantaderUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 6D3D5B45233D497000E310D1 /* LuizProcessoTesteSantaderUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LuizProcessoTesteSantaderUITests.swift; sourceTree = ""; }; + 6D3D5B47233D497000E310D1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 6D3D5B54233D498C00E310D1 /* FormPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormPresenter.swift; sourceTree = ""; }; + 6D3D5B55233D498C00E310D1 /* FormWorker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormWorker.swift; sourceTree = ""; }; + 6D3D5B56233D498C00E310D1 /* FormRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormRouter.swift; sourceTree = ""; }; + 6D3D5B57233D498C00E310D1 /* FormModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormModels.swift; sourceTree = ""; }; + 6D3D5B58233D498C00E310D1 /* FormViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormViewController.swift; sourceTree = ""; }; + 6D3D5B59233D498C00E310D1 /* FormInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormInteractor.swift; sourceTree = ""; }; + 6D3D5BA2233D6E4D00E310D1 /* TxtFieldTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TxtFieldTableViewCell.swift; sourceTree = ""; }; + 6D3D5BA7233D6E7700E310D1 /* SendTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SendTableViewCell.swift; sourceTree = ""; }; + 6D3D5BAB233D6E9200E310D1 /* VisualFormat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VisualFormat.swift; sourceTree = ""; }; + 6D3D5BAD233E84A400E310D1 /* FormView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormView.swift; sourceTree = ""; }; + 6D3D5BB0233E857300E310D1 /* InvestPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestPresenter.swift; sourceTree = ""; }; + 6D3D5BB1233E857300E310D1 /* InvestWorker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestWorker.swift; sourceTree = ""; }; + 6D3D5BB2233E857300E310D1 /* InvestRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestRouter.swift; sourceTree = ""; }; + 6D3D5BB3233E857300E310D1 /* InvestModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestModels.swift; sourceTree = ""; }; + 6D3D5BB4233E857300E310D1 /* InvestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestViewController.swift; sourceTree = ""; }; + 6D3D5BB5233E857300E310D1 /* InvestInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestInteractor.swift; sourceTree = ""; }; + 6D3D5BBC233E8E6300E310D1 /* InvestView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestView.swift; sourceTree = ""; }; + 6D3D5BBE233E8F8A00E310D1 /* CustomColors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomColors.swift; sourceTree = ""; }; + 6D3D5BC7233EB16200E310D1 /* ViewInfoObj.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewInfoObj.swift; sourceTree = ""; }; + 6D3D5BC9233ECFA200E310D1 /* ViewInfo.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ViewInfo.swift; sourceTree = ""; }; + 6D3D5BCB233ECFB600E310D1 /* InvestViewInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestViewInfo.swift; sourceTree = ""; }; + 6D3D5BCD233FC49300E310D1 /* MessageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageView.swift; sourceTree = ""; }; + 6D3D5BD5233FCF8300E310D1 /* HeaderTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeaderTableViewCell.swift; sourceTree = ""; }; + 6D3D5BD7233FCFAF00E310D1 /* RiskTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RiskTableViewCell.swift; sourceTree = ""; }; + 6D3D5BD9233FCFC500E310D1 /* ReturnTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReturnTableViewCell.swift; sourceTree = ""; }; + 6D3D5BDB233FD02500E310D1 /* InvestInfoTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestInfoTableViewCell.swift; sourceTree = ""; }; + 6D3D5BDD233FD03400E310D1 /* InvestMoreInfoTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestMoreInfoTableViewCell.swift; sourceTree = ""; }; + 6D3D5BDF233FED8500E310D1 /* ImageExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageExtension.swift; sourceTree = ""; }; + 6D3D5BE1233FEFB200E310D1 /* ReturnView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReturnView.swift; sourceTree = ""; }; + 6D3D5BE3233FF3B700E310D1 /* InvestBtnTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InvestBtnTableViewCell.swift; sourceTree = ""; }; + 6D3D5BE523401D0200E310D1 /* DoubleExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DoubleExtension.swift; sourceTree = ""; }; + 6D3D5BE8234047C300E310D1 /* MessagePresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessagePresenter.swift; sourceTree = ""; }; + 6D3D5BE9234047C300E310D1 /* MessageWorker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageWorker.swift; sourceTree = ""; }; + 6D3D5BEA234047C300E310D1 /* MessageRouter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageRouter.swift; sourceTree = ""; }; + 6D3D5BEB234047C300E310D1 /* MessageModels.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageModels.swift; sourceTree = ""; }; + 6D3D5BEC234047C300E310D1 /* MessageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageViewController.swift; sourceTree = ""; }; + 6D3D5BED234047C300E310D1 /* MessageInteractor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageInteractor.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 6D3D5B1A233D496F00E310D1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D3D5B33233D497000E310D1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D3D5B3E233D497000E310D1 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 6D3D5B14233D496F00E310D1 = { + isa = PBXGroup; + children = ( + 6D3D5B1F233D496F00E310D1 /* LuizProcessoTesteSantader */, + 6D3D5B39233D497000E310D1 /* LuizProcessoTesteSantaderTests */, + 6D3D5B44233D497000E310D1 /* LuizProcessoTesteSantaderUITests */, + 6D3D5B1E233D496F00E310D1 /* Products */, + ); + sourceTree = ""; + }; + 6D3D5B1E233D496F00E310D1 /* Products */ = { + isa = PBXGroup; + children = ( + 6D3D5B1D233D496F00E310D1 /* LuizProcessoTesteSantader.app */, + 6D3D5B36233D497000E310D1 /* LuizProcessoTesteSantaderTests.xctest */, + 6D3D5B41233D497000E310D1 /* LuizProcessoTesteSantaderUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 6D3D5B1F233D496F00E310D1 /* LuizProcessoTesteSantader */ = { + isa = PBXGroup; + children = ( + 6D3D5BC0233EA6B000E310D1 /* Models */, + 6D3D5BA1233D6E1D00E310D1 /* CustomExtensions */, + 6D3D5BA0233D6E1400E310D1 /* CustomCells */, + 6D3D5BAF233E84AE00E310D1 /* Views */, + 6D3D5B53233D497600E310D1 /* Formulario */, + 6D3D5B9F233D577D00E310D1 /* Investimento */, + 6D3D5BE72340479C00E310D1 /* Menssagem */, + 6D3D5B20233D496F00E310D1 /* AppDelegate.swift */, + 6D3D5B2C233D496F00E310D1 /* Assets.xcassets */, + 6D3D5B2E233D496F00E310D1 /* LaunchScreen.storyboard */, + 6D3D5B31233D496F00E310D1 /* Info.plist */, + 6D3D5B29233D496F00E310D1 /* LuizProcessoTesteSantader.xcdatamodeld */, + ); + path = LuizProcessoTesteSantader; + sourceTree = ""; + }; + 6D3D5B39233D497000E310D1 /* LuizProcessoTesteSantaderTests */ = { + isa = PBXGroup; + children = ( + 6D3D5B3A233D497000E310D1 /* LuizProcessoTesteSantaderTests.swift */, + 6D3D5B3C233D497000E310D1 /* Info.plist */, + ); + path = LuizProcessoTesteSantaderTests; + sourceTree = ""; + }; + 6D3D5B44233D497000E310D1 /* LuizProcessoTesteSantaderUITests */ = { + isa = PBXGroup; + children = ( + 6D3D5B45233D497000E310D1 /* LuizProcessoTesteSantaderUITests.swift */, + 6D3D5B47233D497000E310D1 /* Info.plist */, + ); + path = LuizProcessoTesteSantaderUITests; + sourceTree = ""; + }; + 6D3D5B53233D497600E310D1 /* Formulario */ = { + isa = PBXGroup; + children = ( + 6D3D5B54233D498C00E310D1 /* FormPresenter.swift */, + 6D3D5B55233D498C00E310D1 /* FormWorker.swift */, + 6D3D5B56233D498C00E310D1 /* FormRouter.swift */, + 6D3D5B57233D498C00E310D1 /* FormModels.swift */, + 6D3D5B58233D498C00E310D1 /* FormViewController.swift */, + 6D3D5B59233D498C00E310D1 /* FormInteractor.swift */, + ); + path = Formulario; + sourceTree = ""; + }; + 6D3D5B9F233D577D00E310D1 /* Investimento */ = { + isa = PBXGroup; + children = ( + 6D3D5BB0233E857300E310D1 /* InvestPresenter.swift */, + 6D3D5BB1233E857300E310D1 /* InvestWorker.swift */, + 6D3D5BB2233E857300E310D1 /* InvestRouter.swift */, + 6D3D5BB3233E857300E310D1 /* InvestModels.swift */, + 6D3D5BB4233E857300E310D1 /* InvestViewController.swift */, + 6D3D5BB5233E857300E310D1 /* InvestInteractor.swift */, + ); + path = Investimento; + sourceTree = ""; + }; + 6D3D5BA0233D6E1400E310D1 /* CustomCells */ = { + isa = PBXGroup; + children = ( + 6D3D5BE1233FEFB200E310D1 /* ReturnView.swift */, + 6D3D5BCF233FCEDD00E310D1 /* form */, + 6D3D5BD0233FCEEE00E310D1 /* invest */, + ); + path = CustomCells; + sourceTree = ""; + }; + 6D3D5BA1233D6E1D00E310D1 /* CustomExtensions */ = { + isa = PBXGroup; + children = ( + 6D3D5BAB233D6E9200E310D1 /* VisualFormat.swift */, + 6D3D5BBE233E8F8A00E310D1 /* CustomColors.swift */, + 6D3D5BDF233FED8500E310D1 /* ImageExtension.swift */, + 6D3D5BE523401D0200E310D1 /* DoubleExtension.swift */, + ); + path = CustomExtensions; + sourceTree = ""; + }; + 6D3D5BAF233E84AE00E310D1 /* Views */ = { + isa = PBXGroup; + children = ( + 6D3D5BAD233E84A400E310D1 /* FormView.swift */, + 6D3D5BBC233E8E6300E310D1 /* InvestView.swift */, + 6D3D5BCD233FC49300E310D1 /* MessageView.swift */, + ); + path = Views; + sourceTree = ""; + }; + 6D3D5BC0233EA6B000E310D1 /* Models */ = { + isa = PBXGroup; + children = ( + 6D3D5BC9233ECFA200E310D1 /* ViewInfo.swift */, + 6D3D5BC7233EB16200E310D1 /* ViewInfoObj.swift */, + 6D3D5BCB233ECFB600E310D1 /* InvestViewInfo.swift */, + ); + path = Models; + sourceTree = ""; + }; + 6D3D5BCF233FCEDD00E310D1 /* form */ = { + isa = PBXGroup; + children = ( + 6D3D5BA7233D6E7700E310D1 /* SendTableViewCell.swift */, + 6D3D5BA2233D6E4D00E310D1 /* TxtFieldTableViewCell.swift */, + ); + path = form; + sourceTree = ""; + }; + 6D3D5BD0233FCEEE00E310D1 /* invest */ = { + isa = PBXGroup; + children = ( + 6D3D5BD5233FCF8300E310D1 /* HeaderTableViewCell.swift */, + 6D3D5BD7233FCFAF00E310D1 /* RiskTableViewCell.swift */, + 6D3D5BD9233FCFC500E310D1 /* ReturnTableViewCell.swift */, + 6D3D5BDB233FD02500E310D1 /* InvestInfoTableViewCell.swift */, + 6D3D5BDD233FD03400E310D1 /* InvestMoreInfoTableViewCell.swift */, + 6D3D5BE3233FF3B700E310D1 /* InvestBtnTableViewCell.swift */, + ); + path = invest; + sourceTree = ""; + }; + 6D3D5BE72340479C00E310D1 /* Menssagem */ = { + isa = PBXGroup; + children = ( + 6D3D5BE8234047C300E310D1 /* MessagePresenter.swift */, + 6D3D5BE9234047C300E310D1 /* MessageWorker.swift */, + 6D3D5BEA234047C300E310D1 /* MessageRouter.swift */, + 6D3D5BEB234047C300E310D1 /* MessageModels.swift */, + 6D3D5BEC234047C300E310D1 /* MessageViewController.swift */, + 6D3D5BED234047C300E310D1 /* MessageInteractor.swift */, + ); + path = Menssagem; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 6D3D5B1C233D496F00E310D1 /* LuizProcessoTesteSantader */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D3D5B4A233D497000E310D1 /* Build configuration list for PBXNativeTarget "LuizProcessoTesteSantader" */; + buildPhases = ( + 6D3D5B19233D496F00E310D1 /* Sources */, + 6D3D5B1A233D496F00E310D1 /* Frameworks */, + 6D3D5B1B233D496F00E310D1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LuizProcessoTesteSantader; + productName = LuizProcessoTesteSantader; + productReference = 6D3D5B1D233D496F00E310D1 /* LuizProcessoTesteSantader.app */; + productType = "com.apple.product-type.application"; + }; + 6D3D5B35233D497000E310D1 /* LuizProcessoTesteSantaderTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D3D5B4D233D497000E310D1 /* Build configuration list for PBXNativeTarget "LuizProcessoTesteSantaderTests" */; + buildPhases = ( + 6D3D5B32233D497000E310D1 /* Sources */, + 6D3D5B33233D497000E310D1 /* Frameworks */, + 6D3D5B34233D497000E310D1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 6D3D5B38233D497000E310D1 /* PBXTargetDependency */, + ); + name = LuizProcessoTesteSantaderTests; + productName = LuizProcessoTesteSantaderTests; + productReference = 6D3D5B36233D497000E310D1 /* LuizProcessoTesteSantaderTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 6D3D5B40233D497000E310D1 /* LuizProcessoTesteSantaderUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 6D3D5B50233D497000E310D1 /* Build configuration list for PBXNativeTarget "LuizProcessoTesteSantaderUITests" */; + buildPhases = ( + 6D3D5B3D233D497000E310D1 /* Sources */, + 6D3D5B3E233D497000E310D1 /* Frameworks */, + 6D3D5B3F233D497000E310D1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 6D3D5B43233D497000E310D1 /* PBXTargetDependency */, + ); + name = LuizProcessoTesteSantaderUITests; + productName = LuizProcessoTesteSantaderUITests; + productReference = 6D3D5B41233D497000E310D1 /* LuizProcessoTesteSantaderUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 6D3D5B15233D496F00E310D1 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 1100; + LastUpgradeCheck = 1100; + ORGANIZATIONNAME = "Luiz Otavio Processo"; + TargetAttributes = { + 6D3D5B1C233D496F00E310D1 = { + CreatedOnToolsVersion = 11.0; + }; + 6D3D5B35233D497000E310D1 = { + CreatedOnToolsVersion = 11.0; + TestTargetID = 6D3D5B1C233D496F00E310D1; + }; + 6D3D5B40233D497000E310D1 = { + CreatedOnToolsVersion = 11.0; + TestTargetID = 6D3D5B1C233D496F00E310D1; + }; + }; + }; + buildConfigurationList = 6D3D5B18233D496F00E310D1 /* Build configuration list for PBXProject "LuizProcessoTesteSantader" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 6D3D5B14233D496F00E310D1; + productRefGroup = 6D3D5B1E233D496F00E310D1 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 6D3D5B1C233D496F00E310D1 /* LuizProcessoTesteSantader */, + 6D3D5B35233D497000E310D1 /* LuizProcessoTesteSantaderTests */, + 6D3D5B40233D497000E310D1 /* LuizProcessoTesteSantaderUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 6D3D5B1B233D496F00E310D1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D3D5B30233D496F00E310D1 /* LaunchScreen.storyboard in Resources */, + 6D3D5B2D233D496F00E310D1 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D3D5B34233D497000E310D1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D3D5B3F233D497000E310D1 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 6D3D5B19233D496F00E310D1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D3D5BAE233E84A400E310D1 /* FormView.swift in Sources */, + 6D3D5BBA233E857300E310D1 /* InvestViewController.swift in Sources */, + 6D3D5BCA233ECFA200E310D1 /* ViewInfo.swift in Sources */, + 6D3D5BE623401D0200E310D1 /* DoubleExtension.swift in Sources */, + 6D3D5BB6233E857300E310D1 /* InvestPresenter.swift in Sources */, + 6D3D5BDC233FD02500E310D1 /* InvestInfoTableViewCell.swift in Sources */, + 6D3D5BEF234047C300E310D1 /* MessageWorker.swift in Sources */, + 6D3D5B5E233D498C00E310D1 /* FormViewController.swift in Sources */, + 6D3D5BC8233EB16200E310D1 /* ViewInfoObj.swift in Sources */, + 6D3D5BF1234047C300E310D1 /* MessageModels.swift in Sources */, + 6D3D5B5A233D498C00E310D1 /* FormPresenter.swift in Sources */, + 6D3D5BB8233E857300E310D1 /* InvestRouter.swift in Sources */, + 6D3D5BBF233E8F8A00E310D1 /* CustomColors.swift in Sources */, + 6D3D5BDA233FCFC500E310D1 /* ReturnTableViewCell.swift in Sources */, + 6D3D5BF2234047C300E310D1 /* MessageViewController.swift in Sources */, + 6D3D5B5B233D498C00E310D1 /* FormWorker.swift in Sources */, + 6D3D5BA9233D6E7700E310D1 /* SendTableViewCell.swift in Sources */, + 6D3D5BE0233FED8500E310D1 /* ImageExtension.swift in Sources */, + 6D3D5BDE233FD03400E310D1 /* InvestMoreInfoTableViewCell.swift in Sources */, + 6D3D5BF3234047C300E310D1 /* MessageInteractor.swift in Sources */, + 6D3D5B5D233D498C00E310D1 /* FormModels.swift in Sources */, + 6D3D5BD8233FCFAF00E310D1 /* RiskTableViewCell.swift in Sources */, + 6D3D5BCE233FC49300E310D1 /* MessageView.swift in Sources */, + 6D3D5BBB233E857300E310D1 /* InvestInteractor.swift in Sources */, + 6D3D5BAC233D6E9200E310D1 /* VisualFormat.swift in Sources */, + 6D3D5BB7233E857300E310D1 /* InvestWorker.swift in Sources */, + 6D3D5BB9233E857300E310D1 /* InvestModels.swift in Sources */, + 6D3D5BF0234047C300E310D1 /* MessageRouter.swift in Sources */, + 6D3D5BCC233ECFB600E310D1 /* InvestViewInfo.swift in Sources */, + 6D3D5BEE234047C300E310D1 /* MessagePresenter.swift in Sources */, + 6D3D5BE4233FF3B700E310D1 /* InvestBtnTableViewCell.swift in Sources */, + 6D3D5B21233D496F00E310D1 /* AppDelegate.swift in Sources */, + 6D3D5B2B233D496F00E310D1 /* LuizProcessoTesteSantader.xcdatamodeld in Sources */, + 6D3D5BD6233FCF8300E310D1 /* HeaderTableViewCell.swift in Sources */, + 6D3D5BA4233D6E4D00E310D1 /* TxtFieldTableViewCell.swift in Sources */, + 6D3D5B5F233D498C00E310D1 /* FormInteractor.swift in Sources */, + 6D3D5B5C233D498C00E310D1 /* FormRouter.swift in Sources */, + 6D3D5BBD233E8E6400E310D1 /* InvestView.swift in Sources */, + 6D3D5BE2233FEFB200E310D1 /* ReturnView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D3D5B32233D497000E310D1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D3D5B3B233D497000E310D1 /* LuizProcessoTesteSantaderTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 6D3D5B3D233D497000E310D1 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 6D3D5B46233D497000E310D1 /* LuizProcessoTesteSantaderUITests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 6D3D5B38233D497000E310D1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6D3D5B1C233D496F00E310D1 /* LuizProcessoTesteSantader */; + targetProxy = 6D3D5B37233D497000E310D1 /* PBXContainerItemProxy */; + }; + 6D3D5B43233D497000E310D1 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 6D3D5B1C233D496F00E310D1 /* LuizProcessoTesteSantader */; + targetProxy = 6D3D5B42233D497000E310D1 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 6D3D5B2E233D496F00E310D1 /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 6D3D5B2F233D496F00E310D1 /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 6D3D5B48233D497000E310D1 /* 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_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 6D3D5B49233D497000E310D1 /* 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_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + 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 = 9.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 6D3D5B4B233D497000E310D1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 98LD6VB48K; + INFOPLIST_FILE = LuizProcessoTesteSantader/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = LuizProcesso.LuizProcessoTesteSantader; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Debug; + }; + 6D3D5B4C233D497000E310D1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 98LD6VB48K; + INFOPLIST_FILE = LuizProcessoTesteSantader/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = LuizProcesso.LuizProcessoTesteSantader; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = 1; + }; + name = Release; + }; + 6D3D5B4E233D497000E310D1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 98LD6VB48K; + INFOPLIST_FILE = LuizProcessoTesteSantaderTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = LuizProcesso.LuizProcessoTesteSantaderTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LuizProcessoTesteSantader.app/LuizProcessoTesteSantader"; + }; + name = Debug; + }; + 6D3D5B4F233D497000E310D1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 98LD6VB48K; + INFOPLIST_FILE = LuizProcessoTesteSantaderTests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = LuizProcesso.LuizProcessoTesteSantaderTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/LuizProcessoTesteSantader.app/LuizProcessoTesteSantader"; + }; + name = Release; + }; + 6D3D5B51233D497000E310D1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 98LD6VB48K; + INFOPLIST_FILE = LuizProcessoTesteSantaderUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = LuizProcesso.LuizProcessoTesteSantaderUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = LuizProcessoTesteSantader; + }; + name = Debug; + }; + 6D3D5B52233D497000E310D1 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = 98LD6VB48K; + INFOPLIST_FILE = LuizProcessoTesteSantaderUITests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = LuizProcesso.LuizProcessoTesteSantaderUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = LuizProcessoTesteSantader; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 6D3D5B18233D496F00E310D1 /* Build configuration list for PBXProject "LuizProcessoTesteSantader" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D3D5B48233D497000E310D1 /* Debug */, + 6D3D5B49233D497000E310D1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D3D5B4A233D497000E310D1 /* Build configuration list for PBXNativeTarget "LuizProcessoTesteSantader" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D3D5B4B233D497000E310D1 /* Debug */, + 6D3D5B4C233D497000E310D1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D3D5B4D233D497000E310D1 /* Build configuration list for PBXNativeTarget "LuizProcessoTesteSantaderTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D3D5B4E233D497000E310D1 /* Debug */, + 6D3D5B4F233D497000E310D1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 6D3D5B50233D497000E310D1 /* Build configuration list for PBXNativeTarget "LuizProcessoTesteSantaderUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 6D3D5B51233D497000E310D1 /* Debug */, + 6D3D5B52233D497000E310D1 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCVersionGroup section */ + 6D3D5B29233D496F00E310D1 /* LuizProcessoTesteSantader.xcdatamodeld */ = { + isa = XCVersionGroup; + children = ( + 6D3D5B2A233D496F00E310D1 /* LuizProcessoTesteSantader.xcdatamodel */, + ); + currentVersion = 6D3D5B2A233D496F00E310D1 /* LuizProcessoTesteSantader.xcdatamodel */; + path = LuizProcessoTesteSantader.xcdatamodeld; + sourceTree = ""; + versionGroupType = wrapper.xcdatamodel; + }; +/* End XCVersionGroup section */ + }; + rootObject = 6D3D5B15233D496F00E310D1 /* Project object */; +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..05410e46 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 00000000..18d98100 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.xcworkspace/xcuserdata/luizprocesso.xcuserdatad/UserInterfaceState.xcuserstate b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.xcworkspace/xcuserdata/luizprocesso.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 00000000..1f067642 Binary files /dev/null and b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/project.xcworkspace/xcuserdata/luizprocesso.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/xcuserdata/luizprocesso.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/xcuserdata/luizprocesso.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist new file mode 100644 index 00000000..58bb1733 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/xcuserdata/luizprocesso.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -0,0 +1,6 @@ + + + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/xcuserdata/luizprocesso.xcuserdatad/xcschemes/xcschememanagement.plist b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/xcuserdata/luizprocesso.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 00000000..e906d74a --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcodeproj/xcuserdata/luizprocesso.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + LuizProcessoTesteSantader.xcscheme_^#shared#^_ + + orderHint + 0 + + + + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/AppDelegate.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/AppDelegate.swift new file mode 100644 index 00000000..e88a4ac1 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/AppDelegate.swift @@ -0,0 +1,34 @@ +// +// AppDelegate.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import UIKit +import CoreData + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { + + self.window = UIWindow(frame: UIScreen.main.bounds) + if let window = self.window { + window.backgroundColor = .white + let mainView = FormViewController() +// let mainView = InvestViewController() + let navigation = UINavigationController(rootViewController: mainView) +// navigation.title = "Contato" +// navigation.viewControllers = [mainView] + window.rootViewController = navigation + window.makeKeyAndVisible() + } + return true + } + +} + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/AppIcon.appiconset/Contents.json b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..d8db8d65 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -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" + } +} \ No newline at end of file diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/Contents.json b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/Shape.imageset/Contents.json b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/Shape.imageset/Contents.json new file mode 100644 index 00000000..24d67427 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/Shape.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Shape.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/Shape.imageset/Shape.png b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/Shape.imageset/Shape.png new file mode 100644 index 00000000..1219c0fa Binary files /dev/null and b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/Shape.imageset/Shape.png differ diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downArrow.imageset/Contents.json b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downArrow.imageset/Contents.json new file mode 100644 index 00000000..77ceb5d8 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downArrow.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "downArrow.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downArrow.imageset/downArrow.png b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downArrow.imageset/downArrow.png new file mode 100644 index 00000000..2191dbba Binary files /dev/null and b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downArrow.imageset/downArrow.png differ diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downLine.imageset/Contents.json b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downLine.imageset/Contents.json new file mode 100644 index 00000000..32ab5cb1 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downLine.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "downLine.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downLine.imageset/downLine.png b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downLine.imageset/downLine.png new file mode 100644 index 00000000..79d32859 Binary files /dev/null and b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Assets.xcassets/downLine.imageset/downLine.png differ diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Base.lproj/LaunchScreen.storyboard b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 00000000..865e9329 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/ReturnView.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/ReturnView.swift new file mode 100644 index 00000000..d183bcf4 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/ReturnView.swift @@ -0,0 +1,62 @@ +// +// ReturnView.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation +import UIKit + +class ReturnView:UIView{ + + var intervalo = UILabel() + var fundReturn = UILabel() + var cdiReturn = UILabel() + + + override init(frame: CGRect) { + super.init(frame:frame) + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let viewWidth = self.frame.size.width + let viewHeight = self.frame.size.height + + self.addSubview(intervalo) + self.addSubview(fundReturn) + self.addSubview(cdiReturn) + + self.setUpContraint(pattern: "H:|-10-[v0(\(viewWidth/2))]-50-[v1(\(viewWidth/5))][v2(\(viewWidth/6))]-10-|", views: intervalo,fundReturn,cdiReturn) + self.setUpContraint(pattern: "V:|[v0(\(viewHeight*2))]", views: intervalo) + self.setUpContraint(pattern: "V:|[v0(\(viewHeight*2))]", views: fundReturn) + self.setUpContraint(pattern: "V:|[v0(\(viewHeight*2))]", views: cdiReturn) + + + } + + func setElementsLayout(){ + + intervalo.textAlignment = .left + intervalo.textColor = .darkGray + intervalo.font = UIFont(name: "HelveticaNeue-Thin", size: 12) + + fundReturn.textAlignment = .right + fundReturn.textColor = .darkGray + fundReturn.font = UIFont(name: "HelveticaNeue-Bold", size: 12) + + cdiReturn.textAlignment = .right + cdiReturn.textColor = .darkGray + cdiReturn.font = UIFont(name: "HelveticaNeue-Bold", size: 12) + + } + +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/form/SendTableViewCell.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/form/SendTableViewCell.swift new file mode 100644 index 00000000..0a0bb346 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/form/SendTableViewCell.swift @@ -0,0 +1,74 @@ +// +// SendTableViewCell.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import UIKit + +class SendTableViewCell: UITableViewCell { + + static let identifier = "SendTableViewCell" + var checkBox = UIButton() + var sendBtn = UIButton() + var label = UILabel() + var innerView = UIView() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setElementsLayout(){ + + checkBox.backgroundColor = .clear + checkBox.layer.cornerRadius = 5.0 + checkBox.layer.borderWidth = 1.0 + checkBox.layer.borderColor = UIColor.gray.cgColor + checkBox.addTarget(self, action: #selector(selectedBox), for: .touchUpInside) + + sendBtn.backgroundColor = .appRed + sendBtn.layer.cornerRadius = 20.0 + + innerView.backgroundColor = .clear + } + + func setUpView(){ + + let cellWidth = contentView.frame.width + let cellHeigt = contentView.frame.height + + innerView.addSubview(checkBox) + innerView.addSubview(label) + + self.contentView.addSubview(innerView) + self.contentView.addSubview(sendBtn) + + sendBtn.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + innerView.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + + innerView.setUpContraint(pattern: "H:[v0(\(cellWidth/16))]-5-[v1(\(cellWidth/1.2))]", views: checkBox,label) + innerView.setUpContraint(pattern: "V:|-3-[v0(\(cellHeigt/2.5))]", views: checkBox) + innerView.setUpContraint(pattern: "V:|-5-[v0(\(cellHeigt/3))]", views: label) + + self.contentView.setUpContraint(pattern: "V:|-30-[v0(\(cellHeigt/2))]-25-[v1(\(cellHeigt))]", views: innerView, sendBtn) + self.contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: innerView) + self.contentView.setUpContraint(pattern: "H:[v0(\(cellWidth/1.2))]", views: sendBtn) + } + + @objc func selectedBox(){ + + if(checkBox.backgroundColor == .appRed){ + checkBox.backgroundColor = .clear + }else{ + checkBox.backgroundColor = .appRed + } + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/form/TxtFieldTableViewCell.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/form/TxtFieldTableViewCell.swift new file mode 100644 index 00000000..b4b781a4 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/form/TxtFieldTableViewCell.swift @@ -0,0 +1,51 @@ +// +// TxtFieldTableViewCell.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import UIKit + +class TxtFieldTableViewCell: UITableViewCell { + + static let identifier = "TxtFieldTableViewCell" + var txtField = UITextField() + + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + setUpView() + setElementsLayout() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let cellWidth = self.contentView.frame.size.width + let cellHeight = self.contentView.frame.size.height + +// let centerX = self.contentView.centerXAnchor. + + contentView.addSubview(txtField) + + txtField.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + + contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: txtField) + contentView.setUpContraint(pattern: "V:|-\(cellHeight/2)-[v0(\(cellHeight))]", views: txtField) + + + } + + func setElementsLayout(){ + let bottomBorder = CALayer() + bottomBorder.backgroundColor = UIColor.gray.cgColor + bottomBorder.frame = CGRect(x: 0, y: txtField.center.y+self.contentView.frame.height, width: self.contentView.frame.width, height: 1) + txtField.layer.addSublayer(bottomBorder) + + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/HeaderTableViewCell.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/HeaderTableViewCell.swift new file mode 100644 index 00000000..a591237b --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/HeaderTableViewCell.swift @@ -0,0 +1,60 @@ +// +// HeaderTableViewCell.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import UIKit + +class HeaderTableViewCell: UITableViewCell { + + static let identifier = "HeaderTableViewCell" + + var upperTitle = UILabel() + var title = UILabel() + + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let cellWidth = self.contentView.frame.size.width + let cellHeight = self.contentView.frame.size.height + + self.contentView.addSubview(upperTitle) + self.contentView.addSubview(title) + + upperTitle.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + title.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + + self.contentView.setUpContraint(pattern: "V:|[v0(\(cellHeight))][v1(\(cellHeight*1.5))]", views: upperTitle,title) + self.contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: upperTitle) + self.contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: title) + + } + + func setElementsLayout(){ + + upperTitle.textAlignment = .center + upperTitle.textColor = .darkGray + upperTitle.font = UIFont(name: "HelveticaNeue-Light", size: 15) + + title.textAlignment = .center + title.numberOfLines = 2 + title.textColor = .darkGray + title.font = UIFont(name: "HelveticaNeue-Medium", size: 25) + + } + + +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/InvestBtnTableViewCell.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/InvestBtnTableViewCell.swift new file mode 100644 index 00000000..ecfe6447 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/InvestBtnTableViewCell.swift @@ -0,0 +1,45 @@ +// +// InvestBtnTableViewCell.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import UIKit + +class InvestBtnTableViewCell: UITableViewCell { + + static let identifier = "InvestBtnTableViewCell" + var btn = UIButton() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let cellWidth = contentView.frame.width + let cellHeigt = contentView.frame.height + + self.contentView.addSubview(btn) + + self.contentView.setUpContraint(pattern: "V:|-30-[v0(\(cellHeigt))]", views: btn) + self.contentView.setUpContraint(pattern: "H:|-50-[v0(\(cellWidth/1.2))]", views: btn) + + } + + func setElementsLayout(){ + + btn.backgroundColor = .appRed + btn.layer.cornerRadius = 20.0 + btn.setTitle("Investir", for: .normal) + } + +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/InvestInfoTableViewCell.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/InvestInfoTableViewCell.swift new file mode 100644 index 00000000..8d233825 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/InvestInfoTableViewCell.swift @@ -0,0 +1,55 @@ +// +// InvestInfoTableViewCell.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import UIKit + +class InvestInfoTableViewCell: UITableViewCell { + + + static let identifier = "InvestInfoTableViewCell" + + var title = UILabel() + var infoDettail = UILabel() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let cellWidth = self.contentView.frame.size.width + let cellHeight = self.contentView.frame.size.height + + contentView.addSubview(title) + contentView.addSubview(infoDettail) + + contentView.setUpContraint(pattern: "H:|-10-[v0(\(cellWidth/2))][v1(\(cellWidth/4))]-10-|", views: title, infoDettail) + contentView.setUpContraint(pattern: "V:|[v0(\(20))]", views: title) + contentView.setUpContraint(pattern: "V:|[v0(\(20))]", views: infoDettail) + + + } + func setElementsLayout(){ + + title.textAlignment = .left + title.textColor = .darkGray + title.font = UIFont(name: "HelveticaNeue-Thin", size: 12) + + infoDettail.textAlignment = .right + infoDettail.textColor = .darkGray + infoDettail.font = UIFont(name: "HelveticaNeue-Bold", size: 12) + + } + +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/InvestMoreInfoTableViewCell.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/InvestMoreInfoTableViewCell.swift new file mode 100644 index 00000000..34b9e068 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/InvestMoreInfoTableViewCell.swift @@ -0,0 +1,57 @@ +// +// InvestMoreInfoTableViewCell.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import UIKit + +class InvestMoreInfoTableViewCell: UITableViewCell { + + static let identifier = "InvestMoreInfoTableViewCell" + + var title = UILabel() + var downLoadImg = UIButton() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let cellWidth = self.contentView.frame.size.width + let cellHeight = self.contentView.frame.size.height + + contentView.addSubview(title) + contentView.addSubview(downLoadImg) + + contentView.setUpContraint(pattern: "H:|-10-[v0(\(cellWidth/2))][v1(\(cellWidth/4))]-10-|", views: title, downLoadImg) + contentView.setUpContraint(pattern: "V:|[v0(\(20))]", views: title) + contentView.setUpContraint(pattern: "V:|-5-[v0(\(20))]", views: downLoadImg) + + } + func setElementsLayout(){ + + title.textAlignment = .left + title.textColor = .darkGray + title.font = UIFont(name: "HelveticaNeue-Thin", size: 12) + + //downLoadImg.setBackgroundImage(UIImage(named: "downArrow"), for: .normal) + downLoadImg.titleEdgeInsets = UIEdgeInsets(top: 0, left: 30, bottom: 0, right: 0) + downLoadImg.titleLabel?.font = UIFont(name: "HelveticaNeue-Bold", size: 12) + downLoadImg.titleLabel?.textAlignment = .right + downLoadImg.setTitle("Baixar", for: .normal) + downLoadImg.setTitleColor(.appRed, for: .normal) + downLoadImg.contentMode = .scaleAspectFit + downLoadImg.backgroundColor = .clear + + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/ReturnTableViewCell.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/ReturnTableViewCell.swift new file mode 100644 index 00000000..22e6b023 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/ReturnTableViewCell.swift @@ -0,0 +1,99 @@ +// +// ReturnTableViewCell.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import UIKit + +class ReturnTableViewCell: UITableViewCell { + + static let identifier = "ReturnTableViewCell" + + var headerLbl = UILabel() + var fundLbl = UILabel() + var cdiLbl = UILabel() + + var innerView = UIView() + + var monthView:ReturnView? + var yearView:ReturnView? + var twelveView:ReturnView? + + var border = UIView() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let cellWidth = self.contentView.frame.size.width + let cellHeight = self.contentView.frame.size.height + + self.contentView.addSubview(headerLbl) + self.contentView.addSubview(innerView) + self.contentView.addSubview(monthView!) + self.contentView.addSubview(yearView!) + self.contentView.addSubview(twelveView!) + self.contentView.addSubview(border) + + innerView.addSubview(fundLbl) + innerView.addSubview(cdiLbl) + + headerLbl.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + innerView.trailingAnchor.constraint(equalTo: self.contentView.trailingAnchor, constant: -15).isActive = true + monthView!.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + yearView!.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + twelveView!.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + border.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + + print(cellWidth) + self.contentView.setUpContraint(pattern: "V:|-20-[v0(\(cellHeight/5))]-5-[v1(\(cellHeight))][v2(\(cellHeight/2))]-2-[v3(\(cellHeight/2))]-2-[v4(\(cellHeight/2))]-5-[v5(\(cellHeight/5))]", views: headerLbl,innerView,monthView!,yearView!,twelveView!,border) + self.contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: headerLbl) + self.contentView.setUpContraint(pattern: "H:[v0(\(cellWidth*1.35))]", views: innerView) + self.contentView.setUpContraint(pattern: "H:[v0(\(cellWidth*1.17))]", views: monthView!) + self.contentView.setUpContraint(pattern: "H:[v0(\(cellWidth*1.17))]", views: yearView!) + self.contentView.setUpContraint(pattern: "H:[v0(\(cellWidth*1.17))]", views: twelveView!) + self.contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: border) + + innerView.setUpContraint(pattern: "H:[v0(\(cellWidth/6))]-10-[v1(\(cellWidth/6))]|", views: fundLbl,cdiLbl) + innerView.setUpContraint(pattern: "V:|[v0(\(cellHeight))]", views: fundLbl) + innerView.setUpContraint(pattern: "V:|[v0(\(cellHeight))]", views: cdiLbl) + + + } + + func setElementsLayout(){ + + monthView = ReturnView(frame: CGRect(x: 0, y: 0, width: self.contentView.frame.width, height: self.contentView.frame.height/6)) + yearView = ReturnView(frame: CGRect(x: 0, y: 0, width: self.contentView.frame.width, height: self.contentView.frame.height/6)) + twelveView = ReturnView(frame: CGRect(x: 0, y: 0, width: self.contentView.frame.width, height: self.contentView.frame.height/6)) + + headerLbl.textAlignment = .center + headerLbl.textColor = .darkGray + headerLbl.font = UIFont(name: "HelveticaNeue-Light", size: 18) + + cdiLbl.textAlignment = .right + cdiLbl.textColor = .darkGray + cdiLbl.font = UIFont(name: "HelveticaNeue-Thin", size: 12) + + fundLbl.textAlignment = .right + fundLbl.textColor = .darkGray + fundLbl.font = UIFont(name: "HelveticaNeue-Thin", size: 12) + + let bottomBorder = CALayer() + bottomBorder.backgroundColor = UIColor.lightGray.cgColor + bottomBorder.frame = CGRect(x: 0, y: 0, width: self.contentView.frame.width, height: 1) + border.layer.addSublayer(bottomBorder) + + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/RiskTableViewCell.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/RiskTableViewCell.swift new file mode 100644 index 00000000..721e4210 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomCells/invest/RiskTableViewCell.swift @@ -0,0 +1,118 @@ +// +// RiskTableViewCell.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import UIKit + +class RiskTableViewCell: UITableViewCell { + + + static let identifier = "RiskTableViewCell" + + var whatIs = UILabel() + var descript = UILabel() + var risk = UILabel() + + var arrowImgArray:[UIImageView] = [UIImageView(),UIImageView(),UIImageView(),UIImageView(),UIImageView()] + var colorImgArray:[UIImageView] = [UIImageView(),UIImageView(),UIImageView(),UIImageView(),UIImageView()] + + var arrowView = UIView() + var colorView = UIView() + + override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { + super.init(style: style, reuseIdentifier: reuseIdentifier) + setImgArray() + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let cellWidth = self.contentView.frame.size.width + let cellHeight = self.contentView.frame.size.height + + contentView.addSubview(whatIs) + contentView.addSubview(descript) + contentView.addSubview(risk) + contentView.addSubview(arrowView) + contentView.addSubview(colorView) + for i in 0 ..< arrowImgArray.count{ + arrowView.addSubview(arrowImgArray[i]) + colorView.addSubview(colorImgArray[i]) + } + + whatIs.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + descript.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + risk.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + arrowView.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + colorView.centerXAnchor.constraint(equalTo: self.contentView.centerXAnchor).isActive = true + + contentView.setUpContraint(pattern: "V:|-20-[v0(\(cellHeight/5))]-10-[v1(\(cellHeight*1.5))]-15-[v2(\(cellHeight/3))]-15-[v3(\(cellHeight/10))]-10-[v4(\(cellHeight/10))]", views: whatIs,descript,risk,arrowView,colorView) + contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: whatIs) + contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: descript) + contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: risk) + contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: arrowView) + contentView.setUpContraint(pattern: "H:[v0(\(cellWidth))]", views: colorView) + + arrowView.setUpContraint(pattern: "H:|[v0(\(cellWidth/5))][v1(\(cellWidth/5))][v2(\(cellWidth/5))][v3(\(cellWidth/5))][v4(\(cellWidth/5))]", views: arrowImgArray[0],arrowImgArray[1],arrowImgArray[2],arrowImgArray[3],arrowImgArray[4]) + arrowView.setUpContraint(pattern: "V:[v0(10)]", views: arrowImgArray[0]) + arrowView.setUpContraint(pattern: "V:[v0(10)]", views: arrowImgArray[1]) + arrowView.setUpContraint(pattern: "V:[v0(10)]", views: arrowImgArray[2]) + arrowView.setUpContraint(pattern: "V:[v0(10)]", views: arrowImgArray[3]) + arrowView.setUpContraint(pattern: "V:[v0(10)]", views: arrowImgArray[4]) + + + colorView.setUpContraint(pattern: "H:|[v0(\(cellWidth/5))][v1(\(cellWidth/5))][v2(\(cellWidth/5))][v3(\(cellWidth/5))][v4(\(cellWidth/5))]", views: colorImgArray[0],colorImgArray[1],colorImgArray[2],colorImgArray[3],colorImgArray[4]) + colorView.setUpContraint(pattern: "V:|-2-[v0(10)]", views: colorImgArray[0]) + colorView.setUpContraint(pattern: "V:|-2-[v0(10)]", views: colorImgArray[1]) + colorView.setUpContraint(pattern: "V:|-2-[v0(10)]", views: colorImgArray[2]) + colorView.setUpContraint(pattern: "V:|[v0(15)]", views: colorImgArray[3]) + colorView.setUpContraint(pattern: "V:|-2-[v0(10)]", views: colorImgArray[4]) + + } + + func setElementsLayout(){ + + whatIs.textAlignment = .center + whatIs.textColor = .darkGray + whatIs.font = UIFont(name: "HelveticaNeue-Light", size: 18) + + descript.textAlignment = .center + descript.textColor = .darkGray + descript.numberOfLines = 3 + descript.font = UIFont(name: "HelveticaNeue-Thin", size: 15) + + risk.textAlignment = .center + risk.textColor = .darkGray + risk.font = UIFont(name: "HelveticaNeue-Light", size: 18) + + let bottomBorder = CALayer() + bottomBorder.backgroundColor = UIColor.lightGray.cgColor + bottomBorder.frame = CGRect(x: 0, y: -20, width: self.contentView.frame.width, height: 1) + whatIs.layer.addSublayer(bottomBorder) + + + } + + func setImgArray(){ + for i in 0 ..< arrowImgArray.count{ + arrowImgArray[i].contentMode = .scaleAspectFit + colorImgArray[i].contentMode = .scaleAspectFit + } + arrowImgArray[3].image = UIImage(named: "Shape") + colorImgArray[0].backgroundColor = .appLightGreen + colorImgArray[1].backgroundColor = .appGreen + colorImgArray[2].backgroundColor = .appYellow + colorImgArray[3].backgroundColor = .appOrange + colorImgArray[4].backgroundColor = .appRiskRed + + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/CustomColors.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/CustomColors.swift new file mode 100644 index 00000000..d9cb64dd --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/CustomColors.swift @@ -0,0 +1,33 @@ +// +// CustomColors.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation +import UIKit + +extension UIColor{ + + static var appRed: UIColor { return UIColor.fromIntRGB(red: 218.0, green: 1.0, blue: 1.0) } + static var appDarkRed: UIColor { return UIColor.fromIntRGB(red: 150.0, green: 1.0, blue: 1.0) } + + static var appLightGreen: UIColor { return UIColor.fromIntRGB(red: 116.0, green: 218.0, blue: 97.0) } + static var appGreen: UIColor { return UIColor.fromIntRGB(red: 74.0, green: 193.0, blue: 108.0) } + static var appYellow: UIColor { return UIColor.fromIntRGB(red: 255.0 , green: 192.0, blue: 17.0) } + static var appOrange: UIColor { return UIColor.fromIntRGB(red: 255.0, green: 116.0, blue: 44.0) } + static var appRiskRed: UIColor { return UIColor.fromIntRGB(red: 255.0, green: 54.0, blue: 52.0) } + + static func fromIntRGB(red: CGFloat, green: CGFloat, blue: CGFloat) -> UIColor { + + let r = (red * 1) / 255.0 + let g = (green * 1) / 255.0 + let b = (blue * 1) / 255.0 + let a = CGFloat(1.0) + + return UIColor(red: r, green: g, blue: b, alpha: a) + + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/DoubleExtension.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/DoubleExtension.swift new file mode 100644 index 00000000..9c00e190 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/DoubleExtension.swift @@ -0,0 +1,18 @@ +// +// DoubleExtension.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation + + +extension Double { + + var toString: String { + return NSNumber(value: self).stringValue + } + +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/ImageExtension.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/ImageExtension.swift new file mode 100644 index 00000000..ecde0eb0 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/ImageExtension.swift @@ -0,0 +1,38 @@ +// +// ImageExtension.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation +import UIKit + +extension UIImage { + + class func imageByCombiningImage(firstImage: UIImage, withImage secondImage: UIImage) -> UIImage { + + let newImageWidth = max(firstImage.size.width, secondImage.size.width ) + let newImageHeight = max(firstImage.size.height, secondImage.size.height) + let newImageSize = CGSize(width : newImageWidth, height: newImageHeight) + + + UIGraphicsBeginImageContextWithOptions(newImageSize, false, UIScreen.main.scale) + + let firstImageDrawX = round((newImageSize.width - firstImage.size.width ) / 2) + let firstImageDrawY = round((newImageSize.height - firstImage.size.height ) / 2) + + let secondImageDrawX = round((newImageSize.width - secondImage.size.width ) / 2) + let secondImageDrawY = round((newImageSize.height - secondImage.size.height) / 2) + + firstImage .draw(at: CGPoint(x: firstImageDrawX, y: firstImageDrawY)) + secondImage.draw(at: CGPoint(x: secondImageDrawX, y: secondImageDrawY)) + + let image = UIGraphicsGetImageFromCurrentImageContext() + + UIGraphicsEndImageContext() + + return image! + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/VisualFormat.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/VisualFormat.swift new file mode 100644 index 00000000..34ff61e5 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/CustomExtensions/VisualFormat.swift @@ -0,0 +1,23 @@ +// +// VisualFormat.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation +import UIKit + +extension UIView { + + func setUpContraint(pattern: String, views: UIView...) { + var myViews: [String : UIView] = [:] + + for (index, view) in views.enumerated() { + view.translatesAutoresizingMaskIntoConstraints = false + myViews["v\(index)"] = view + } + addConstraints(NSLayoutConstraint.constraints(withVisualFormat: pattern, options: NSLayoutConstraint.FormatOptions(), metrics: nil, views: myViews)) + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormInteractor.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormInteractor.swift new file mode 100644 index 00000000..f9a6dd84 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormInteractor.swift @@ -0,0 +1,36 @@ +// +// FormInteractor.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +protocol FormBusinessLogicProtocol{ + func getFormData(request: Form.UserInfo.Request) +} + +protocol FormDataStoreProtocol{ + //var name: String { get set } +} + +class FormInteractor: FormBusinessLogicProtocol, FormDataStoreProtocol{ + var presenter: FormPresentationLogicProtocol? + var worker: FormWorker? + + // MARK: Do something + + func getFormData(request: Form.UserInfo.Request){ + worker = FormWorker() + worker?.requestFromAPI(completionHandler: { infos in + let response = Form.UserInfo.Response(infos: infos.cells) + self.presenter?.presentFormData(response: response) + }) + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormModels.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormModels.swift new file mode 100644 index 00000000..506e674f --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormModels.swift @@ -0,0 +1,28 @@ +// +// FormModels.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +enum Form{ + // MARK: Use cases + + enum UserInfo{ + struct Request{ + } + struct Response:Codable{ + var infos:[ViewInfoObj] + } + struct ViewModel:Codable{ + var infos:[ViewInfoObj] + } + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormPresenter.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormPresenter.swift new file mode 100644 index 00000000..18f8082d --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormPresenter.swift @@ -0,0 +1,31 @@ +// +// FormPresenter.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +protocol FormPresentationLogicProtocol +{ + func presentFormData(response: Form.UserInfo.Response) +} + +class FormPresenter: FormPresentationLogicProtocol +{ + weak var viewController: FormDisplayLogicProtocol? + + // MARK: Do something + + func presentFormData(response: Form.UserInfo.Response) + { + let viewModel = Form.UserInfo.ViewModel(infos: response.infos) + viewController?.displayViewInfo(viewModel: viewModel) + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormRouter.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormRouter.swift new file mode 100644 index 00000000..b29101c6 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormRouter.swift @@ -0,0 +1,56 @@ +// +// FormRouter.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +@objc protocol FormRoutingLogicProtocol{ + func routeToInvestiment() + func routeToMessage() +} + +protocol FormDataPassingProtocol{ + var dataStore: FormDataStoreProtocol? { get } +} + +class FormRouter: NSObject, FormRoutingLogicProtocol, FormDataPassingProtocol{ + weak var viewController: FormViewController? + var dataStore: FormDataStoreProtocol? + + // MARK: Routing + + func routeToInvestiment() { + let destination = InvestViewController() + navigateToInvestiment(source: viewController!, destination: destination ) + } + + func routeToMessage() { + let destination = MessageViewController() + navigateToMessage(source: viewController!, destination: destination ) + } + + // MARK: Navigation + + func navigateToInvestiment(source: FormViewController, destination: InvestViewController){ + source.navigationController?.pushViewController(destination, animated: false) + } + + func navigateToMessage(source: FormViewController, destination: MessageViewController){ + source.navigationController?.pushViewController(destination, animated: false) + } + + // MARK: Passing data + + //func passDataToSomewhere(source: FormDataStore, destination: inout SomewhereDataStore) + //{ + // destination.name = source.name + //} +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormViewController.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormViewController.swift new file mode 100644 index 00000000..b85dbce1 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormViewController.swift @@ -0,0 +1,144 @@ +// +// FormViewController.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +protocol FormDisplayLogicProtocol: class{ + func displayViewInfo(viewModel: Form.UserInfo.ViewModel) +} + +class FormViewController: UIViewController{ + var interactor: FormBusinessLogicProtocol? + var router: (NSObjectProtocol & FormRoutingLogicProtocol & FormDataPassingProtocol)? + var formView:FormView? + var infoForView:[ViewInfoObj] = [] + + // MARK: Object lifecycle + + override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?){ + super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) + setup() + } + + required init?(coder aDecoder: NSCoder){ + super.init(coder: aDecoder) + setup() + } + + // MARK: View lifecycle + + override func viewDidLoad(){ + super.viewDidLoad() + + formView = FormView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height)) + self.view = formView + + formView!.table.register(SendTableViewCell.self, forCellReuseIdentifier: SendTableViewCell.identifier) + formView!.table.register(TxtFieldTableViewCell.self, forCellReuseIdentifier: TxtFieldTableViewCell.identifier) + formView!.table.delegate = self + formView!.table.dataSource = self + + formView?.investBtn.addTarget(self, action: #selector(routingToInvestiment), for: .touchUpInside) + navigationItem.leftBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: self, action: nil) + loadFormData() + } + + // MARK: Setup + + private func setup(){ + let viewController = self + self.title = "Contato" + let interactor = FormInteractor() + let presenter = FormPresenter() + let router = FormRouter() + viewController.interactor = interactor + viewController.router = router + interactor.presenter = presenter + presenter.viewController = viewController + router.viewController = viewController + router.dataStore = interactor + + } + + // MARK: Routing + + @objc func routingToInvestiment(){ + router?.routeToInvestiment() + } + + @objc func routingToMessage(){ + router?.routeToMessage() + } + + // MARK: Do something + + func loadFormData(){ + let request = Form.UserInfo.Request() + interactor?.getFormData(request: request) + } +} + +extension FormViewController:FormDisplayLogicProtocol{ + + func displayViewInfo(viewModel: Form.UserInfo.ViewModel){ + infoForView = viewModel.infos + formView?.table.reloadData() + } +} + +extension FormViewController: UITableViewDelegate, UITableViewDataSource{ + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 4 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + + if(infoForView.count > 0){ + + switch indexPath.row { + case 0: + let cell = tableView.dequeueReusableCell(withIdentifier: TxtFieldTableViewCell.identifier, for: indexPath) as? TxtFieldTableViewCell + cell?.txtField.placeholder = infoForView[1].message + return cell ?? UITableViewCell() + case 1: + let cell = tableView.dequeueReusableCell(withIdentifier: TxtFieldTableViewCell.identifier, for: indexPath) as? TxtFieldTableViewCell + cell?.txtField.placeholder = infoForView[2].message + return cell ?? UITableViewCell() + case 2: + let cell = tableView.dequeueReusableCell(withIdentifier: TxtFieldTableViewCell.identifier, for: indexPath) as? TxtFieldTableViewCell + cell?.txtField.placeholder = infoForView[3].message + return cell ?? UITableViewCell() + case 3: + let cell = tableView.dequeueReusableCell(withIdentifier: SendTableViewCell.identifier, for: indexPath) as? SendTableViewCell + cell?.label.text = infoForView[4].message + cell?.sendBtn.setTitle(infoForView[5].message, for: .normal) + cell?.sendBtn.addTarget(self, action: #selector(routingToMessage), for: .touchUpInside) + + return cell ?? UITableViewCell() + default: + break + } + + return UITableViewCell() + + }else{ + return UITableViewCell() + } + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + if(indexPath.row == 3){ + return 200 + } + return 70 + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormWorker.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormWorker.swift new file mode 100644 index 00000000..56c779ed --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Formulario/FormWorker.swift @@ -0,0 +1,37 @@ +// +// FormWorker.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +class FormWorker{ + func requestFromAPI(completionHandler: @escaping (FormViewInfo) -> Void ){ + let url = URL(string: "https://floating-mountain-50292.herokuapp.com/cells.json") + let task = URLSession.shared.dataTask(with: url!){(data,response, error) in + DispatchQueue.main.async{ + if let data = data{ + let decoder = JSONDecoder() + do{ + let decodedData = try decoder.decode(FormViewInfo.self, from: data) + completionHandler(decodedData) + }catch{ + print(error.localizedDescription) + let objArray:[ViewInfoObj] = [] + let emptyInfo = FormViewInfo(cells: objArray) + completionHandler(emptyInfo) + } + } + } + } + task.resume() + } +} + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Info.plist b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Info.plist new file mode 100644 index 00000000..7e6d9097 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + LaunchScreen + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestInteractor.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestInteractor.swift new file mode 100644 index 00000000..b482a4c5 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestInteractor.swift @@ -0,0 +1,36 @@ +// +// InvestInteractor.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +protocol InvestBusinessLogicProtocol{ + func getInvestmentData(request: Invest.InvestInfo.Request) +} + +protocol InvestDataStoreProtocol{ + //var name: String { get set } +} + +class InvestInteractor: InvestBusinessLogicProtocol, InvestDataStoreProtocol{ + var presenter: InvestPresentationLogicProtocol? + var worker: InvestWorker? + + // MARK: Do something + + func getInvestmentData(request: Invest.InvestInfo.Request){ + worker = InvestWorker() + worker?.getInvestInfo(completionHandler: { data in + let response = Invest.InvestInfo.Response(investInfo: data) + self.presenter?.presentInvestData(response: response) + }) + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestModels.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestModels.swift new file mode 100644 index 00000000..6662709c --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestModels.swift @@ -0,0 +1,28 @@ +// +// InvestModels.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +enum Invest{ + // MARK: Use cases + + enum InvestInfo{ + struct Request{ + } + struct Response{ + let investInfo:InvestViewInfo + } + struct ViewModel{ + let investInfo:InvestViewInfo + } + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestPresenter.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestPresenter.swift new file mode 100644 index 00000000..00bcda1a --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestPresenter.swift @@ -0,0 +1,31 @@ +// +// InvestPresenter.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +protocol InvestPresentationLogicProtocol +{ + func presentInvestData(response: Invest.InvestInfo.Response) +} + +class InvestPresenter: InvestPresentationLogicProtocol +{ + weak var viewController: InvestDisplayLogicProtocol? + + // MARK: Do something + + func presentInvestData(response: Invest.InvestInfo.Response) + { + let viewModel = Invest.InvestInfo.ViewModel(investInfo: response.investInfo) + viewController?.displayInvestData(viewModel: viewModel) + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestRouter.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestRouter.swift new file mode 100644 index 00000000..6af11216 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestRouter.swift @@ -0,0 +1,46 @@ +// +// InvestRouter.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +@objc protocol InvestRoutingLogicProtocol{ + func routeToForm() +} + +protocol InvestDataPassingProtocol{ + var dataStore: InvestDataStoreProtocol? { get } +} + +class InvestRouter: NSObject, InvestRoutingLogicProtocol, InvestDataPassingProtocol{ + weak var viewController: InvestViewController? + var dataStore: InvestDataStoreProtocol? + + // MARK: Routing + + func routeToForm() { + let destination = FormViewController() + navigateToForm(source: viewController!, destination: destination) + } + + // MARK: Navigation + + func navigateToForm(source: InvestViewController, destination: FormViewController){ + source.navigationController?.pushViewController(destination, animated: false) + } + + // MARK: Passing data + + //func passDataToSomewhere(source: InvestDataStore, destination: inout SomewhereDataStore) + //{ + // destination.name = source.name + //} +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestViewController.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestViewController.swift new file mode 100644 index 00000000..825be868 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestViewController.swift @@ -0,0 +1,234 @@ +// +// InvestViewController.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit +import SafariServices + +protocol InvestDisplayLogicProtocol: class +{ + func displayInvestData(viewModel: Invest.InvestInfo.ViewModel) +} + +class InvestViewController: UIViewController, SFSafariViewControllerDelegate{ + var interactor: InvestBusinessLogicProtocol? + var router: (NSObjectProtocol & InvestRoutingLogicProtocol & InvestDataPassingProtocol)? + var investView:InvestView? + var investInfo:InvestViewInfo? + + // MARK: Object lifecycle + + override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?){ + super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) + setup() + } + + required init?(coder aDecoder: NSCoder){ + super.init(coder: aDecoder) + setup() + } + + // MARK: Setup + + private func setup(){ + let viewController = self + self.title = "Investimento" + let interactor = InvestInteractor() + let presenter = InvestPresenter() + let router = InvestRouter() + viewController.interactor = interactor + viewController.router = router + interactor.presenter = presenter + presenter.viewController = viewController + router.viewController = viewController + router.dataStore = interactor + } + + // MARK: Routing + + @objc func routingToForm(){ + router?.routeToForm() + } + + // MARK: View lifecycle + + override func viewDidLoad(){ + super.viewDidLoad() + + investView = InvestView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height)) + self.view = investView + + investView!.table.register(HeaderTableViewCell.self, forCellReuseIdentifier: HeaderTableViewCell.identifier) + investView!.table.register(RiskTableViewCell.self, forCellReuseIdentifier: RiskTableViewCell.identifier) + investView!.table.register(ReturnTableViewCell.self, forCellReuseIdentifier: ReturnTableViewCell.identifier) + investView!.table.register(InvestInfoTableViewCell.self, forCellReuseIdentifier: InvestInfoTableViewCell.identifier) + investView!.table.register(InvestMoreInfoTableViewCell.self, forCellReuseIdentifier: InvestMoreInfoTableViewCell.identifier) + investView!.table.register(InvestBtnTableViewCell.self, forCellReuseIdentifier: InvestBtnTableViewCell.identifier) + + investView!.table.delegate = self + investView!.table.dataSource = self + + investView?.contactBtn.addTarget(self, action: #selector(routingToForm), for: .touchUpInside) + navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .action, target: self, action: nil) + navigationItem.rightBarButtonItem?.tintColor = .appRed + navigationItem.leftBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: self, action: nil) + + loadInvestData() + } + + // MARK: Do something + func loadInvestData(){ + let request = Invest.InvestInfo.Request() + interactor?.getInvestmentData(request: request) + } + + @objc func openSafari(){ + let safariViewController = SFSafariViewController(url: NSURL(string: "https://www.google.com")! as URL) + safariViewController.delegate = self + self.present(safariViewController, animated: true, completion: nil) + } +} +extension InvestViewController: InvestDisplayLogicProtocol{ + + func displayInvestData(viewModel: Invest.InvestInfo.ViewModel){ + investInfo = viewModel.investInfo + investView?.table.reloadData() + } +} + +extension InvestViewController: UITableViewDelegate, UITableViewDataSource{ + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return 18 + } + + func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + + if(investInfo != nil){ + + switch indexPath.row { + case 0: + let cell = tableView.dequeueReusableCell(withIdentifier: HeaderTableViewCell.identifier, for: indexPath) as? HeaderTableViewCell + cell?.upperTitle.text = investInfo?.screen?.title + cell?.title.text = investInfo?.screen?.fundName + return cell ?? UITableViewCell() + case 1: + let cell = tableView.dequeueReusableCell(withIdentifier: RiskTableViewCell.identifier, for: indexPath) as? RiskTableViewCell + cell?.whatIs.text = investInfo?.screen?.whatIs + cell?.descript.text = investInfo?.screen?.definition + cell?.risk.text = investInfo?.screen?.riskTitle + return cell ?? UITableViewCell() + case 2: + let cell = tableView.dequeueReusableCell(withIdentifier: ReturnTableViewCell.identifier, for: indexPath) as? ReturnTableViewCell + cell?.headerLbl.text = investInfo?.screen?.infoTitle + cell?.fundLbl.text = "Fundo" + cell?.cdiLbl.text = "CDI" + cell?.monthView!.intervalo.text = "No mês" + cell?.yearView!.intervalo.text = "No ano" + cell?.twelveView!.intervalo.text = "12 meses" + + cell?.monthView!.fundReturn.text = (investInfo?.screen?.moreInfo?.month?.fund)!.toString+"%" + cell?.yearView!.fundReturn.text = (investInfo?.screen?.moreInfo?.year?.fund)!.toString+"%" + cell?.twelveView!.fundReturn.text = (investInfo?.screen?.moreInfo?.twelveMonth?.fund)!.toString+"%" + + cell?.monthView!.cdiReturn.text = (investInfo?.screen?.moreInfo?.month?.CDI)!.toString+"%" + cell?.yearView!.cdiReturn.text = (investInfo?.screen?.moreInfo?.year?.CDI)!.toString+"%" + cell?.twelveView!.cdiReturn.text = (investInfo?.screen?.moreInfo?.twelveMonth?.CDI)!.toString+"%" + + return cell ?? UITableViewCell() + case 3: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestInfoTableViewCell.identifier, for: indexPath) as? InvestInfoTableViewCell + + cell?.title.text = investInfo?.screen?.info![0].name + cell?.infoDettail.text = investInfo?.screen?.info![0].data + return cell ?? UITableViewCell() + case 4: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestInfoTableViewCell.identifier, for: indexPath) as? InvestInfoTableViewCell + cell?.title.text = investInfo?.screen?.info![1].name + cell?.infoDettail.text = investInfo?.screen?.info![1].data + return cell ?? UITableViewCell() + case 5: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestInfoTableViewCell.identifier, for: indexPath) as? InvestInfoTableViewCell + cell?.title.text = investInfo?.screen?.info![2].name + cell?.infoDettail.text = investInfo?.screen?.info![2].data + return cell ?? UITableViewCell() + case 6: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestInfoTableViewCell.identifier, for: indexPath) as? InvestInfoTableViewCell + cell?.title.text = investInfo?.screen?.info![3].name + cell?.infoDettail.text = investInfo?.screen?.info![3].data + return cell ?? UITableViewCell() + case 7: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestInfoTableViewCell.identifier, for: indexPath) as? InvestInfoTableViewCell + cell?.title.text = investInfo?.screen?.info![4].name + cell?.infoDettail.text = investInfo?.screen?.info![4].data + return cell ?? UITableViewCell() + case 8: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestInfoTableViewCell.identifier, for: indexPath) as? InvestInfoTableViewCell + cell?.title.text = investInfo?.screen?.info![5].name + cell?.infoDettail.text = investInfo?.screen?.info![5].data + return cell ?? UITableViewCell() + case 9: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestInfoTableViewCell.identifier, for: indexPath) as? InvestInfoTableViewCell + cell?.title.text = investInfo?.screen?.info![6].name + cell?.infoDettail.text = investInfo?.screen?.info![6].data + return cell ?? UITableViewCell() + case 10: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestMoreInfoTableViewCell.identifier, for: indexPath) as? InvestMoreInfoTableViewCell + cell?.title.text = investInfo?.screen?.downInfo![0].name + cell?.downLoadImg.addTarget(self, action: #selector(openSafari), for: .touchUpInside) + return cell ?? UITableViewCell() + case 11: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestMoreInfoTableViewCell.identifier, for: indexPath) as? InvestMoreInfoTableViewCell + cell?.title.text = investInfo?.screen?.downInfo![1].name + cell?.downLoadImg.addTarget(self, action: #selector(openSafari), for: .touchUpInside) + return cell ?? UITableViewCell() + case 12: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestMoreInfoTableViewCell.identifier, for: indexPath) as? InvestMoreInfoTableViewCell + cell?.title.text = investInfo?.screen?.downInfo![2].name + cell?.downLoadImg.addTarget(self, action: #selector(openSafari), for: .touchUpInside) + return cell ?? UITableViewCell() + case 13: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestMoreInfoTableViewCell.identifier, for: indexPath) as? InvestMoreInfoTableViewCell + cell?.title.text = investInfo?.screen?.downInfo![3].name + cell?.downLoadImg.addTarget(self, action: #selector(openSafari), for: .touchUpInside) + return cell ?? UITableViewCell() + case 14: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestMoreInfoTableViewCell.identifier, for: indexPath) as? InvestMoreInfoTableViewCell + cell?.title.text = investInfo?.screen?.downInfo![4].name + cell?.downLoadImg.addTarget(self, action: #selector(openSafari), for: .touchUpInside) + return cell ?? UITableViewCell() + case 15: + let cell = tableView.dequeueReusableCell(withIdentifier: InvestBtnTableViewCell.identifier, for: indexPath) as? InvestBtnTableViewCell + return cell ?? UITableViewCell() + default: + break + } + } + return UITableViewCell() + } + + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + + switch indexPath.row{ + case 0: + return 120 + case 1: + return 200 + case 2: + return 170 + case 16: + return 100 + default: + return 30 + } + } +} + + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestWorker.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestWorker.swift new file mode 100644 index 00000000..962fed17 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Investimento/InvestWorker.swift @@ -0,0 +1,37 @@ +// +// InvestWorker.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +class InvestWorker{ + + func getInvestInfo(completionHandler: @escaping (InvestViewInfo) -> Void ){ + + let url = URL(string: "https://floating-mountain-50292.herokuapp.com/fund.json") + let task = URLSession.shared.dataTask(with: url!){(data,response, error) in + DispatchQueue.main.async{ + if let data = data{ + let decoder = JSONDecoder() + do{ + let decodedData = try decoder.decode(InvestViewInfo.self, from: data) + print(decodedData) + completionHandler(decodedData) + }catch{ + print(error) + print(error.localizedDescription) + } + } + } + } + task.resume() + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcdatamodeld/LuizProcessoTesteSantader.xcdatamodel/contents b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcdatamodeld/LuizProcessoTesteSantader.xcdatamodel/contents new file mode 100644 index 00000000..50d2514e --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/LuizProcessoTesteSantader.xcdatamodeld/LuizProcessoTesteSantader.xcdatamodel/contents @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageInteractor.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageInteractor.swift new file mode 100644 index 00000000..0b1e1518 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageInteractor.swift @@ -0,0 +1,37 @@ +// +// MessageInteractor.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +protocol MessageBusinessLogic{ + func doSomething(request: Message.Something.Request) +} + +protocol MessageDataStore{ + //var name: String { get set } +} + +class MessageInteractor: MessageBusinessLogic, MessageDataStore{ + var presenter: MessagePresentationLogic? + var worker: MessageWorker? + //var name: String = "" + + // MARK: Do something + + func doSomething(request: Message.Something.Request){ + worker = MessageWorker() + worker?.doSomeWork() + + let response = Message.Something.Response() + presenter?.presentSomething(response: response) + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageModels.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageModels.swift new file mode 100644 index 00000000..b1593a03 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageModels.swift @@ -0,0 +1,26 @@ +// +// MessageModels.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +enum Message{ + // MARK: Use cases + + enum Something{ + struct Request{ + } + struct Response{ + } + struct ViewModel{ + } + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessagePresenter.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessagePresenter.swift new file mode 100644 index 00000000..d62d834d --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessagePresenter.swift @@ -0,0 +1,28 @@ +// +// MessagePresenter.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +protocol MessagePresentationLogic{ + func presentSomething(response: Message.Something.Response) +} + +class MessagePresenter: MessagePresentationLogic{ + weak var viewController: MessageDisplayLogic? + + // MARK: Do something + + func presentSomething(response: Message.Something.Response){ + let viewModel = Message.Something.ViewModel() + viewController?.displaySomething(viewModel: viewModel) + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageRouter.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageRouter.swift new file mode 100644 index 00000000..7199df2a --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageRouter.swift @@ -0,0 +1,56 @@ +// +// MessageRouter.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +@objc protocol MessageRoutingLogic{ + func routeToForm() + func routeToInvest() +} + +protocol MessageDataPassing{ + var dataStore: MessageDataStore? { get } +} + +class MessageRouter: NSObject, MessageRoutingLogic, MessageDataPassing{ + weak var viewController: MessageViewController? + var dataStore: MessageDataStore? + + // MARK: Routing + + func routeToForm() { + let destination = FormViewController() + navigateToForm(source: viewController!, destination: destination) + } + + func routeToInvest() { + let destination = InvestViewController() + navigateToInvest(source: viewController!, destination: destination) + } + + + // MARK: Navigation + + func navigateToForm(source: MessageViewController, destination: FormViewController){ + source.navigationController?.pushViewController(destination, animated: false) + } + func navigateToInvest(source: MessageViewController, destination: InvestViewController){ + source.navigationController?.pushViewController(destination, animated: false) + } + + // MARK: Passing data + + //func passDataToSomewhere(source: MessageDataStore, destination: inout SomewhereDataStore) + //{ + // destination.name = source.name + //} +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageViewController.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageViewController.swift new file mode 100644 index 00000000..d2e0ff23 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageViewController.swift @@ -0,0 +1,87 @@ +// +// MessageViewController.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +protocol MessageDisplayLogic: class{ + func displaySomething(viewModel: Message.Something.ViewModel) +} + +class MessageViewController: UIViewController, MessageDisplayLogic{ + var interactor: MessageBusinessLogic? + var router: (NSObjectProtocol & MessageRoutingLogic & MessageDataPassing)? + var messageView:MessageView? + + // MARK: Object lifecycle + + override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?){ + super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) + setup() + } + + required init?(coder aDecoder: NSCoder){ + super.init(coder: aDecoder) + setup() + } + + // MARK: Setup + + private func setup(){ + let viewController = self + self.title = "Contato" + let interactor = MessageInteractor() + let presenter = MessagePresenter() + let router = MessageRouter() + viewController.interactor = interactor + viewController.router = router + interactor.presenter = presenter + presenter.viewController = viewController + router.viewController = viewController + router.dataStore = interactor + } + + // MARK: Routing + + @objc func routingToForm(){ + router?.routeToForm() + } + @objc func routingToInvest(){ + router?.routeToInvest() + } + + // MARK: View lifecycle + + override func viewDidLoad(){ + super.viewDidLoad() + messageView = MessageView(frame: CGRect(x: 0, y: 0, width: self.view.frame.width, height: self.view.frame.height)) + self.view = messageView + + messageView?.newMsgBtn.addTarget(self, action: #selector(routingToForm), for: .touchUpInside) + messageView?.investBtn.addTarget(self, action: #selector(routingToInvest), for: .touchUpInside) + + navigationItem.leftBarButtonItem = UIBarButtonItem(title: "", style: .plain, target: self, action: nil) + doSomething() + } + + // MARK: Do something + + //@IBOutlet weak var nameTextField: UITextField! + + func doSomething(){ + let request = Message.Something.Request() + interactor?.doSomething(request: request) + } + + func displaySomething(viewModel: Message.Something.ViewModel){ + //nameTextField.text = viewModel.name + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageWorker.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageWorker.swift new file mode 100644 index 00000000..c7ef9455 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Menssagem/MessageWorker.swift @@ -0,0 +1,18 @@ +// +// MessageWorker.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright (c) 2019 Luiz Otavio Processo. All rights reserved. +// +// This file was generated by the Clean Swift Xcode Templates so +// you can apply clean architecture to your iOS and Mac projects, +// see http://clean-swift.com +// + +import UIKit + +class MessageWorker{ + func doSomeWork(){ + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Models/InvestViewInfo.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Models/InvestViewInfo.swift new file mode 100644 index 00000000..afb18ada --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Models/InvestViewInfo.swift @@ -0,0 +1,51 @@ +// +// InvestViewInfo.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation + +struct InvestViewInfo:Codable{ + var screen:Screen? +} + +struct Screen:Codable{ + var title:String? + var fundName:String? + var whatIs:String? + var definition:String? + var riskTitle:String? + var risk:Int? + var infoTitle:String? + var moreInfo:MoreInfo? + var info:[Info]? + var downInfo:[DownInfo]? +} +struct MoreInfo:Codable { + var month:IntervaloTempo? + var year:IntervaloTempo? + var twelveMonth: IntervaloTempo? + + private enum CodingKeys: String, CodingKey{ + case month, year, twelveMonth = "12months" + } +} + +struct IntervaloTempo:Codable { + var fund:Double? + var CDI:Double? +} + +struct Info:Codable { + var name:String? + var data:String? +} + +struct DownInfo:Codable { + var name:String? + var data:String? +} + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Models/ViewInfo.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Models/ViewInfo.swift new file mode 100644 index 00000000..d6869784 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Models/ViewInfo.swift @@ -0,0 +1,14 @@ +// +// ViewInfo.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation + +struct FormViewInfo:Codable{ + var cells:[ViewInfoObj] +} + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Models/ViewInfoObj.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Models/ViewInfoObj.swift new file mode 100644 index 00000000..c0368b26 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Models/ViewInfoObj.swift @@ -0,0 +1,20 @@ +// +// ViewInfoObj.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation + +struct ViewInfoObj:Codable { + var id:Int? +// var type:Int? + var message:String? +// var typefield:Int? +// var hidden:Bool? +// var topspacing:Float? +// var show:Int? +// var required:Bool? +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Views/FormView.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Views/FormView.swift new file mode 100644 index 00000000..a29b9747 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Views/FormView.swift @@ -0,0 +1,66 @@ +// +// FormView.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation +import UIKit + + +class FormView: UIView{ + + let table = UITableView() + + var innerView:UIView = { + let v = UIView() + v.backgroundColor = .clear + return v + }() + var contactBtn = UIButton() + var investBtn = UIButton() + + var sentMsgview:MessageView? + + override init(frame: CGRect) { + super.init(frame: frame) + table.separatorStyle = .none + table.allowsSelection = false + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let viewWidth = self.frame.width + let viewHeight = self.frame.height + + self.addSubview(table) + self.addSubview(innerView) + innerView.addSubview(contactBtn) + innerView.addSubview(investBtn) + + self.setUpContraint(pattern: "V:|[v0(\(viewHeight))][v1(\(viewHeight/10))]|", views: table, innerView) + self.setUpContraint(pattern: "H:|[v0(\(viewWidth))]", views: table) + self.setUpContraint(pattern: "H:|[v0(\(viewWidth))]", views: innerView) + + innerView.setUpContraint(pattern: "V:[v0(\(viewHeight/11))]|", views: investBtn) + innerView.setUpContraint(pattern: "V:[v0(\(viewHeight/10))]|", views: contactBtn) + innerView.setUpContraint(pattern: "H:|[v0(\(viewWidth/2))][v1(\(viewWidth/2))]", views: investBtn, contactBtn) + + + } + + func setElementsLayout(){ + contactBtn.backgroundColor = .appDarkRed + contactBtn.setTitle("Contato", for: .normal) + investBtn.backgroundColor = .appRed + investBtn.setTitle("Investimento", for: .normal) + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Views/InvestView.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Views/InvestView.swift new file mode 100644 index 00000000..ef9575b4 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Views/InvestView.swift @@ -0,0 +1,67 @@ +// +// InvestView.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 27/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation +import UIKit + +class InvestView:UIView{ + + var table = UITableView() + + + var innerView:UIView = { + let v = UIView() + v.backgroundColor = .clear + return v + }() + var contactBtn = UIButton() + var investBtn = UIButton() + + + override init(frame: CGRect) { + super.init(frame: frame) + table.separatorStyle = .none + table.allowsSelection = false + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let viewWidth = self.frame.width + let viewHeight = self.frame.height + + self.addSubview(table) + self.addSubview(innerView) + innerView.addSubview(investBtn) + innerView.addSubview(contactBtn) + + print(viewWidth) + + self.setUpContraint(pattern: "V:|[v0(\(viewHeight))][v1(\(viewHeight/10))]|", views: table, innerView) + self.setUpContraint(pattern: "H:|[v0(\(viewWidth))]|", views: table) + self.setUpContraint(pattern: "H:|[v0(\(viewWidth))]", views: innerView) + + innerView.setUpContraint(pattern: "H:|[v0(\(viewWidth/2))][v1(\(viewWidth/2))]", views: investBtn,contactBtn) + innerView.setUpContraint(pattern: "V:[v0(\(viewHeight/10))]|", views: investBtn) + innerView.setUpContraint(pattern: "V:[v0(\(viewHeight/11))]|", views: contactBtn) + + + } + + func setElementsLayout(){ + contactBtn.backgroundColor = .appRed + contactBtn.setTitle("Contato", for: .normal) + investBtn.backgroundColor = .appDarkRed + investBtn.setTitle("Investimento", for: .normal) + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Views/MessageView.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Views/MessageView.swift new file mode 100644 index 00000000..c16e63ea --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantader/Views/MessageView.swift @@ -0,0 +1,91 @@ +// +// MessageView.swift +// LuizProcessoTesteSantader +// +// Created by Luiz Otavio Processo on 28/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import Foundation +import UIKit + + +class MessageView:UIView{ + + var upperLbl = UILabel() + var titleLbl = UILabel() + var newMsgBtn = UIButton() + + var innerView:UIView = { + let v = UIView() + v.backgroundColor = .clear + return v + }() + var contactBtn = UIButton() + var investBtn = UIButton() + + override init(frame: CGRect) { + super.init(frame: frame) + setElementsLayout() + setUpView() + } + + required init?(coder: NSCoder) { + fatalError("init(coder:) has not been implemented") + } + + func setUpView(){ + + let viewWidth = self.frame.width + let viewHeight = self.frame.height + + self.addSubview(upperLbl) + self.addSubview(titleLbl) + self.addSubview(newMsgBtn) + self.addSubview(innerView) + + innerView.addSubview(investBtn) + innerView.addSubview(contactBtn) + + upperLbl.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true + titleLbl.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true + newMsgBtn.centerXAnchor.constraint(equalTo: self.centerXAnchor).isActive = true + + self.setUpContraint(pattern: "V:|-\(viewHeight/4)-[v0(\(viewHeight/10))][v1(\(viewHeight/8))]-\(viewHeight/6)-[v2(\(viewHeight/10))]-30-[v3(\(viewHeight/10))]|", views: upperLbl,titleLbl,newMsgBtn, innerView) + self.setUpContraint(pattern: "H:[v0(\(viewWidth/2))]", views: upperLbl) + self.setUpContraint(pattern: "H:[v0(\(viewWidth))]", views: titleLbl) + self.setUpContraint(pattern: "H:[v0(\(viewWidth/2))]", views: newMsgBtn) + self.setUpContraint(pattern: "H:|[v0(\(viewWidth))]", views: innerView) + + innerView.setUpContraint(pattern: "V:[v0(\(viewHeight/11))]|", views: investBtn) + innerView.setUpContraint(pattern: "V:[v0(\(viewHeight/10))]|", views: contactBtn) + innerView.setUpContraint(pattern: "H:|[v0(\(viewWidth/2))][v1(\(viewWidth/2))]", views: investBtn, contactBtn) + + } + + func setElementsLayout(){ + + upperLbl.text = "Obrigado!" + upperLbl.textAlignment = .center + upperLbl.textColor = .lightGray + upperLbl.font = UIFont(name: "HelveticaNeue-Medium", size: 15) + + + titleLbl.text = "Menssagem enviada \ncom sucesso :)" + titleLbl.textAlignment = .center + titleLbl.numberOfLines = 2 + titleLbl.textColor = .darkGray + titleLbl.font = UIFont(name: "HelveticaNeue-Medium", size: 25) + + newMsgBtn.backgroundColor = .clear + newMsgBtn.setTitle("Enviar nova mensagem", for: .normal) + newMsgBtn.titleLabel?.font = UIFont(name: "HelveticaNeue-Bold", size: 15) + newMsgBtn.setTitleColor(.appRed, for: .normal) + + contactBtn.backgroundColor = .appDarkRed + contactBtn.setTitle("Contato", for: .normal) + investBtn.backgroundColor = .appRed + investBtn.setTitle("Investimento", for: .normal) + + } +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantaderTests/Info.plist b/LuizProcessoTesteSantader/LuizProcessoTesteSantaderTests/Info.plist new file mode 100644 index 00000000..64d65ca4 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantaderTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantaderTests/LuizProcessoTesteSantaderTests.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantaderTests/LuizProcessoTesteSantaderTests.swift new file mode 100644 index 00000000..763eecba --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantaderTests/LuizProcessoTesteSantaderTests.swift @@ -0,0 +1,34 @@ +// +// LuizProcessoTesteSantaderTests.swift +// LuizProcessoTesteSantaderTests +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import XCTest +@testable import LuizProcessoTesteSantader + +class LuizProcessoTesteSantaderTests: XCTestCase { + + override func 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. + } + + 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. + } + } + +} diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantaderUITests/Info.plist b/LuizProcessoTesteSantader/LuizProcessoTesteSantaderUITests/Info.plist new file mode 100644 index 00000000..64d65ca4 --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantaderUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/LuizProcessoTesteSantader/LuizProcessoTesteSantaderUITests/LuizProcessoTesteSantaderUITests.swift b/LuizProcessoTesteSantader/LuizProcessoTesteSantaderUITests/LuizProcessoTesteSantaderUITests.swift new file mode 100644 index 00000000..15069ffe --- /dev/null +++ b/LuizProcessoTesteSantader/LuizProcessoTesteSantaderUITests/LuizProcessoTesteSantaderUITests.swift @@ -0,0 +1,43 @@ +// +// LuizProcessoTesteSantaderUITests.swift +// LuizProcessoTesteSantaderUITests +// +// Created by Luiz Otavio Processo on 26/09/19. +// Copyright © 2019 Luiz Otavio Processo. All rights reserved. +// + +import XCTest + +class LuizProcessoTesteSantaderUITests: XCTestCase { + + override func 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 + + // 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. + } + + func testExample() { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use recording to get started writing UI tests. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTOSSignpostMetric.applicationLaunch]) { + XCUIApplication().launch() + } + } + } +}