improved navigation using coordinators. improved card in channels. needs modifications

This commit is contained in:
Darya Rednikina 2019-04-23 06:58:25 +03:00
parent 1520ef7904
commit b9768d66c5
10 changed files with 247 additions and 119 deletions

View File

@ -2,8 +2,7 @@ github "robb/Cartography"
github "ivanbruel/MarkdownKit"
github "roberthein/TinyConstraints"
github "macteo/Marklight"
github "Alamofire/Alamofire" "5.0.0-beta.2"
github "whitesmith/WSTagsField"
github "ReactiveCocoa/ReactiveCocoa" ~> 8.0
github "Alamofire/Alamofire" "5.0.0-beta.5"
github "52inc/Pulley"
github "HeroTransitions/Hero"
github "HeroTransitions/Hero"
github "ReactiveCocoa/ReactiveCocoa" "1c089a8"

View File

@ -8,13 +8,10 @@
/* Begin PBXBuildFile section */
1210A0BB223940310080686D /* SimplifiedChannelsList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1210A0BA223940310080686D /* SimplifiedChannelsList.swift */; };
123AD0E3223C1C3900326173 /* WSTagsField.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 123AD0E2223C1C3900326173 /* WSTagsField.framework */; };
123AD0E5223C1C4300326173 /* WSTagsField.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 123AD0E2223C1C3900326173 /* WSTagsField.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
121A8972226B1EAC005EE599 /* AnonimousChannelController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121A8971226B1EAC005EE599 /* AnonimousChannelController.swift */; };
123E37A5221F1B3200F6E42A /* LogInViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123E37A4221F1B3200F6E42A /* LogInViewController.swift */; };
123E37A7221F1DD700F6E42A /* MainController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 123E37A6221F1DD700F6E42A /* MainController.swift */; };
124CC7032221C00C009DF531 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = 124CC7022221C00C009DF531 /* Model.swift */; };
124CC7052221C2BB009DF531 /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 124CC7042221C2BA009DF531 /* Alamofire.framework */; };
124CC7072221C2C3009DF531 /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 124CC7042221C2BA009DF531 /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
125BD57D22171D2A008A3575 /* ProfileViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD57C22171D2A008A3575 /* ProfileViewController.swift */; };
125BD57F22171D73008A3575 /* Extentions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD57E22171D73008A3575 /* Extentions.swift */; };
125BD5812217314A008A3575 /* NewsVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 125BD5802217314A008A3575 /* NewsVC.swift */; };
@ -22,8 +19,6 @@
1291BE2D2221312D009D3F23 /* ChannelsCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE2C2221312C009D3F23 /* ChannelsCoordinator.swift */; };
1291BE342221569B009D3F23 /* TabbarCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE332221569B009D3F23 /* TabbarCoordinator.swift */; };
1291BE3622218DBF009D3F23 /* LogInCoordinator1.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1291BE3522218DBF009D3F23 /* LogInCoordinator1.swift */; };
12924BD6224401D4003813B9 /* Hero.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12924BD5224401D4003813B9 /* Hero.framework */; };
12924BD8224401DC003813B9 /* Hero.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12924BD5224401D4003813B9 /* Hero.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12BA4B9B224101A400DF93D7 /* ApplicationCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BA4B9A224101A400DF93D7 /* ApplicationCoordinator.swift */; };
12BA4B9D224101E700DF93D7 /* BaseCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BA4B9C224101E700DF93D7 /* BaseCoordinator.swift */; };
12BA4B9F224102B700DF93D7 /* LogInCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12BA4B9E224102B700DF93D7 /* LogInCoordinator.swift */; };
@ -40,54 +35,54 @@
12E36DA1221424EA006FCDD7 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12E36D9F221424EA006FCDD7 /* Main.storyboard */; };
12E36DA3221424ED006FCDD7 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 12E36DA2221424ED006FCDD7 /* Assets.xcassets */; };
12E36DA6221424ED006FCDD7 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 12E36DA4221424ED006FCDD7 /* LaunchScreen.storyboard */; };
12E36DAF22143D40006FCDD7 /* Cartography.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DAE22143D40006FCDD7 /* Cartography.framework */; };
12E36DB322143D4E006FCDD7 /* Marklight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DB222143D4E006FCDD7 /* Marklight.framework */; };
12E36DB522143D54006FCDD7 /* TinyConstraints.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DB422143D54006FCDD7 /* TinyConstraints.framework */; };
12E36DB72214400A006FCDD7 /* Post.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DB62214400A006FCDD7 /* Post.swift */; };
12E36DB922144016006FCDD7 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DB822144016006FCDD7 /* User.swift */; };
12E36DBD221441D5006FCDD7 /* TinyConstraints.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DB422143D54006FCDD7 /* TinyConstraints.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12E36DC0221441DB006FCDD7 /* Marklight.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DB222143D4E006FCDD7 /* Marklight.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12E36DC2221441E1006FCDD7 /* MarkdownKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DB022143D47006FCDD7 /* MarkdownKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12E36DC4221441EA006FCDD7 /* Cartography.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DAE22143D40006FCDD7 /* Cartography.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12E36DCA22144635006FCDD7 /* NewPostViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DC922144635006FCDD7 /* NewPostViewController.swift */; };
12E36DCC22144725006FCDD7 /* PostViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DCB22144725006FCDD7 /* PostViewCell.swift */; };
12E36DCE22144756006FCDD7 /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DCD22144756006FCDD7 /* Constants.swift */; };
12E36DD122148122006FCDD7 /* FullPostController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DD022148122006FCDD7 /* FullPostController.swift */; };
12E36DD522156559006FCDD7 /* MyStackView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E36DD422156559006FCDD7 /* MyStackView.swift */; };
12E36DDB221594B1006FCDD7 /* MarkdownKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12E36DB022143D47006FCDD7 /* MarkdownKit.framework */; };
12F3D6B0224106F700A69214 /* TabbarController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F3D6AF224106F700A69214 /* TabbarController.swift */; };
12F3D6B22241097B00A69214 /* ProfileCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12F3D6B12241097B00A69214 /* ProfileCoordinator.swift */; };
12F3D6B4224112D600A69214 /* ReactiveMapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B3224112D600A69214 /* ReactiveMapKit.framework */; };
12F3D6B6224112E100A69214 /* ReactiveSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B5224112E000A69214 /* ReactiveSwift.framework */; };
12F3D6B8224112E900A69214 /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B7224112E800A69214 /* Result.framework */; };
12F3D6BB224112FD00A69214 /* ReactiveCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B9224112F500A69214 /* ReactiveCocoa.framework */; };
12F3D6BC224112FD00A69214 /* ReactiveCocoa.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B9224112F500A69214 /* ReactiveCocoa.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12F3D6BE2241130000A69214 /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B7224112E800A69214 /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12F3D6C02241130200A69214 /* ReactiveSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B5224112E000A69214 /* ReactiveSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12F3D6C22241130400A69214 /* ReactiveMapKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6B3224112D600A69214 /* ReactiveMapKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12F3D6C92242645800A69214 /* Pulley.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6C72242644D00A69214 /* Pulley.framework */; };
12F3D6CA2242645800A69214 /* Pulley.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12F3D6C72242644D00A69214 /* Pulley.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12FDAC7C226B5E2900995B4E /* Marklight.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC75226B5E2800995B4E /* Marklight.framework */; };
12FDAC7D226B5E2900995B4E /* Result.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC76226B5E2800995B4E /* Result.framework */; };
12FDAC7E226B5E2900995B4E /* Cartography.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC77226B5E2900995B4E /* Cartography.framework */; };
12FDAC81226B5E2900995B4E /* MarkdownKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC7A226B5E2900995B4E /* MarkdownKit.framework */; };
12FDAC84226B5E3700995B4E /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC79226B5E2900995B4E /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12FDAC88226B5E4800995B4E /* Alamofire.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC79226B5E2900995B4E /* Alamofire.framework */; };
12FDAC8A226B5E4B00995B4E /* Cartography.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC77226B5E2900995B4E /* Cartography.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12FDAC8B226B5E4E00995B4E /* Hero.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC78226B5E2900995B4E /* Hero.framework */; };
12FDAC8C226B5E4E00995B4E /* Hero.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC78226B5E2900995B4E /* Hero.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12FDAC8E226B5E5000995B4E /* MarkdownKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC7A226B5E2900995B4E /* MarkdownKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12FDAC90226B5E5200995B4E /* Marklight.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC75226B5E2800995B4E /* Marklight.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12FDAC91226B5E5400995B4E /* Pulley.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC7B226B5E2900995B4E /* Pulley.framework */; };
12FDAC92226B5E5400995B4E /* Pulley.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC7B226B5E2900995B4E /* Pulley.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12FDAC94226B5E5600995B4E /* Result.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC76226B5E2800995B4E /* Result.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12FDAC96226B61C400995B4E /* TinyConstraints.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC95226B61C400995B4E /* TinyConstraints.framework */; };
12FDAC98226B61CB00995B4E /* TinyConstraints.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC95226B61C400995B4E /* TinyConstraints.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12FDAC9B226B652C00995B4E /* ReactiveSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC99226B652400995B4E /* ReactiveSwift.framework */; };
12FDAC9C226B652C00995B4E /* ReactiveSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC99226B652400995B4E /* ReactiveSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
12FDAC9F226B9E7C00995B4E /* ReactiveCocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC9D226B9E7600995B4E /* ReactiveCocoa.framework */; };
12FDACA0226B9E7C00995B4E /* ReactiveCocoa.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 12FDAC9D226B9E7600995B4E /* ReactiveCocoa.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
12E36DBE221441D5006FCDD7 /* Embed Frameworks */ = {
12FDAC85226B5E3700995B4E /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
12E36DC0221441DB006FCDD7 /* Marklight.framework in Embed Frameworks */,
12F3D6C22241130400A69214 /* ReactiveMapKit.framework in Embed Frameworks */,
124CC7072221C2C3009DF531 /* Alamofire.framework in Embed Frameworks */,
12E36DC4221441EA006FCDD7 /* Cartography.framework in Embed Frameworks */,
12F3D6BE2241130000A69214 /* Result.framework in Embed Frameworks */,
12E36DBD221441D5006FCDD7 /* TinyConstraints.framework in Embed Frameworks */,
12F3D6C02241130200A69214 /* ReactiveSwift.framework in Embed Frameworks */,
12F3D6BC224112FD00A69214 /* ReactiveCocoa.framework in Embed Frameworks */,
12924BD8224401DC003813B9 /* Hero.framework in Embed Frameworks */,
123AD0E5223C1C4300326173 /* WSTagsField.framework in Embed Frameworks */,
12F3D6CA2242645800A69214 /* Pulley.framework in Embed Frameworks */,
12E36DC2221441E1006FCDD7 /* MarkdownKit.framework in Embed Frameworks */,
12FDAC8E226B5E5000995B4E /* MarkdownKit.framework in Embed Frameworks */,
12FDAC98226B61CB00995B4E /* TinyConstraints.framework in Embed Frameworks */,
12FDAC94226B5E5600995B4E /* Result.framework in Embed Frameworks */,
12FDAC84226B5E3700995B4E /* Alamofire.framework in Embed Frameworks */,
12FDAC8A226B5E4B00995B4E /* Cartography.framework in Embed Frameworks */,
12FDAC9C226B652C00995B4E /* ReactiveSwift.framework in Embed Frameworks */,
12FDAC92226B5E5400995B4E /* Pulley.framework in Embed Frameworks */,
12FDAC8C226B5E4E00995B4E /* Hero.framework in Embed Frameworks */,
12FDAC90226B5E5200995B4E /* Marklight.framework in Embed Frameworks */,
12FDACA0226B9E7C00995B4E /* ReactiveCocoa.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
@ -96,11 +91,10 @@
/* Begin PBXFileReference section */
1210A0BA223940310080686D /* SimplifiedChannelsList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SimplifiedChannelsList.swift; sourceTree = "<group>"; };
123AD0E2223C1C3900326173 /* WSTagsField.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = WSTagsField.framework; path = Carthage/Build/iOS/WSTagsField.framework; sourceTree = "<group>"; };
121A8971226B1EAC005EE599 /* AnonimousChannelController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AnonimousChannelController.swift; sourceTree = "<group>"; };
123E37A4221F1B3200F6E42A /* LogInViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogInViewController.swift; sourceTree = "<group>"; };
123E37A6221F1DD700F6E42A /* MainController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainController.swift; sourceTree = "<group>"; };
124CC7022221C00C009DF531 /* Model.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Model.swift; sourceTree = "<group>"; };
124CC7042221C2BA009DF531 /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; };
125BD57C22171D2A008A3575 /* ProfileViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewController.swift; sourceTree = "<group>"; };
125BD57E22171D73008A3575 /* Extentions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extentions.swift; sourceTree = "<group>"; };
125BD5802217314A008A3575 /* NewsVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewsVC.swift; sourceTree = "<group>"; };
@ -108,7 +102,6 @@
1291BE2C2221312C009D3F23 /* ChannelsCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChannelsCoordinator.swift; sourceTree = "<group>"; };
1291BE332221569B009D3F23 /* TabbarCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabbarCoordinator.swift; sourceTree = "<group>"; };
1291BE3522218DBF009D3F23 /* LogInCoordinator1.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogInCoordinator1.swift; sourceTree = "<group>"; };
12924BD5224401D4003813B9 /* Hero.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Hero.framework; path = Carthage/Build/iOS/Hero.framework; sourceTree = "<group>"; };
12BA4B9A224101A400DF93D7 /* ApplicationCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ApplicationCoordinator.swift; sourceTree = "<group>"; };
12BA4B9C224101E700DF93D7 /* BaseCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseCoordinator.swift; sourceTree = "<group>"; };
12BA4B9E224102B700DF93D7 /* LogInCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LogInCoordinator.swift; sourceTree = "<group>"; };
@ -127,10 +120,6 @@
12E36DA2221424ED006FCDD7 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
12E36DA5221424ED006FCDD7 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
12E36DA7221424ED006FCDD7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
12E36DAE22143D40006FCDD7 /* Cartography.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cartography.framework; path = Carthage/Build/iOS/Cartography.framework; sourceTree = "<group>"; };
12E36DB022143D47006FCDD7 /* MarkdownKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MarkdownKit.framework; path = Carthage/Build/iOS/MarkdownKit.framework; sourceTree = "<group>"; };
12E36DB222143D4E006FCDD7 /* Marklight.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Marklight.framework; path = Carthage/Build/iOS/Marklight.framework; sourceTree = "<group>"; };
12E36DB422143D54006FCDD7 /* TinyConstraints.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TinyConstraints.framework; path = Carthage/Build/iOS/TinyConstraints.framework; sourceTree = "<group>"; };
12E36DB62214400A006FCDD7 /* Post.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Post.swift; sourceTree = "<group>"; };
12E36DB822144016006FCDD7 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = "<group>"; };
12E36DC922144635006FCDD7 /* NewPostViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewPostViewController.swift; sourceTree = "<group>"; };
@ -140,11 +129,16 @@
12E36DD422156559006FCDD7 /* MyStackView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MyStackView.swift; sourceTree = "<group>"; };
12F3D6AF224106F700A69214 /* TabbarController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabbarController.swift; sourceTree = "<group>"; };
12F3D6B12241097B00A69214 /* ProfileCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileCoordinator.swift; sourceTree = "<group>"; };
12F3D6B3224112D600A69214 /* ReactiveMapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReactiveMapKit.framework; path = Carthage/Build/iOS/ReactiveMapKit.framework; sourceTree = "<group>"; };
12F3D6B5224112E000A69214 /* ReactiveSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReactiveSwift.framework; path = Carthage/Build/iOS/ReactiveSwift.framework; sourceTree = "<group>"; };
12F3D6B7224112E800A69214 /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Result.framework; path = Carthage/Build/iOS/Result.framework; sourceTree = "<group>"; };
12F3D6B9224112F500A69214 /* ReactiveCocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReactiveCocoa.framework; path = Carthage/Build/iOS/ReactiveCocoa.framework; sourceTree = "<group>"; };
12F3D6C72242644D00A69214 /* Pulley.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Pulley.framework; path = Carthage/Build/iOS/Pulley.framework; sourceTree = "<group>"; };
12FDAC75226B5E2800995B4E /* Marklight.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Marklight.framework; path = Carthage/Build/iOS/Marklight.framework; sourceTree = "<group>"; };
12FDAC76226B5E2800995B4E /* Result.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Result.framework; path = Carthage/Build/iOS/Result.framework; sourceTree = "<group>"; };
12FDAC77226B5E2900995B4E /* Cartography.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cartography.framework; path = Carthage/Build/iOS/Cartography.framework; sourceTree = "<group>"; };
12FDAC78226B5E2900995B4E /* Hero.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Hero.framework; path = Carthage/Build/iOS/Hero.framework; sourceTree = "<group>"; };
12FDAC79226B5E2900995B4E /* Alamofire.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Alamofire.framework; path = Carthage/Build/iOS/Alamofire.framework; sourceTree = "<group>"; };
12FDAC7A226B5E2900995B4E /* MarkdownKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MarkdownKit.framework; path = Carthage/Build/iOS/MarkdownKit.framework; sourceTree = "<group>"; };
12FDAC7B226B5E2900995B4E /* Pulley.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Pulley.framework; path = Carthage/Build/iOS/Pulley.framework; sourceTree = "<group>"; };
12FDAC95226B61C400995B4E /* TinyConstraints.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = TinyConstraints.framework; path = Carthage/Build/iOS/TinyConstraints.framework; sourceTree = "<group>"; };
12FDAC99226B652400995B4E /* ReactiveSwift.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReactiveSwift.framework; path = Carthage/Build/iOS/ReactiveSwift.framework; sourceTree = "<group>"; };
12FDAC9D226B9E7600995B4E /* ReactiveCocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ReactiveCocoa.framework; path = Carthage/Build/iOS/ReactiveCocoa.framework; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@ -152,18 +146,16 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
12E36DB522143D54006FCDD7 /* TinyConstraints.framework in Frameworks */,
12F3D6B4224112D600A69214 /* ReactiveMapKit.framework in Frameworks */,
124CC7052221C2BB009DF531 /* Alamofire.framework in Frameworks */,
12F3D6C92242645800A69214 /* Pulley.framework in Frameworks */,
12F3D6BB224112FD00A69214 /* ReactiveCocoa.framework in Frameworks */,
12F3D6B8224112E900A69214 /* Result.framework in Frameworks */,
12F3D6B6224112E100A69214 /* ReactiveSwift.framework in Frameworks */,
12E36DDB221594B1006FCDD7 /* MarkdownKit.framework in Frameworks */,
12924BD6224401D4003813B9 /* Hero.framework in Frameworks */,
12E36DAF22143D40006FCDD7 /* Cartography.framework in Frameworks */,
123AD0E3223C1C3900326173 /* WSTagsField.framework in Frameworks */,
12E36DB322143D4E006FCDD7 /* Marklight.framework in Frameworks */,
12FDAC7C226B5E2900995B4E /* Marklight.framework in Frameworks */,
12FDAC96226B61C400995B4E /* TinyConstraints.framework in Frameworks */,
12FDAC91226B5E5400995B4E /* Pulley.framework in Frameworks */,
12FDAC9F226B9E7C00995B4E /* ReactiveCocoa.framework in Frameworks */,
12FDAC88226B5E4800995B4E /* Alamofire.framework in Frameworks */,
12FDAC81226B5E2900995B4E /* MarkdownKit.framework in Frameworks */,
12FDAC7D226B5E2900995B4E /* Result.framework in Frameworks */,
12FDAC9B226B652C00995B4E /* ReactiveSwift.framework in Frameworks */,
12FDAC7E226B5E2900995B4E /* Cartography.framework in Frameworks */,
12FDAC8B226B5E4E00995B4E /* Hero.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -209,18 +201,16 @@
12E36D8F221424EA006FCDD7 = {
isa = PBXGroup;
children = (
12924BD5224401D4003813B9 /* Hero.framework */,
12F3D6C72242644D00A69214 /* Pulley.framework */,
12F3D6B9224112F500A69214 /* ReactiveCocoa.framework */,
12F3D6B7224112E800A69214 /* Result.framework */,
12F3D6B5224112E000A69214 /* ReactiveSwift.framework */,
12F3D6B3224112D600A69214 /* ReactiveMapKit.framework */,
123AD0E2223C1C3900326173 /* WSTagsField.framework */,
124CC7042221C2BA009DF531 /* Alamofire.framework */,
12E36DB422143D54006FCDD7 /* TinyConstraints.framework */,
12E36DB222143D4E006FCDD7 /* Marklight.framework */,
12E36DB022143D47006FCDD7 /* MarkdownKit.framework */,
12E36DAE22143D40006FCDD7 /* Cartography.framework */,
12FDAC9D226B9E7600995B4E /* ReactiveCocoa.framework */,
12FDAC99226B652400995B4E /* ReactiveSwift.framework */,
12FDAC95226B61C400995B4E /* TinyConstraints.framework */,
12FDAC79226B5E2900995B4E /* Alamofire.framework */,
12FDAC77226B5E2900995B4E /* Cartography.framework */,
12FDAC78226B5E2900995B4E /* Hero.framework */,
12FDAC7A226B5E2900995B4E /* MarkdownKit.framework */,
12FDAC75226B5E2800995B4E /* Marklight.framework */,
12FDAC7B226B5E2900995B4E /* Pulley.framework */,
12FDAC76226B5E2800995B4E /* Result.framework */,
12E36D9A221424EA006FCDD7 /* GDproject */,
12E36D99221424EA006FCDD7 /* Products */,
12E36DDA221594B1006FCDD7 /* Frameworks */,
@ -288,6 +278,7 @@
isa = PBXGroup;
children = (
12D7D134221C42B700B35452 /* ChannelController.swift */,
121A8971226B1EAC005EE599 /* AnonimousChannelController.swift */,
12D7D132221C321600B35452 /* ChannelListController.swift */,
1210A0BA223940310080686D /* SimplifiedChannelsList.swift */,
12E36DC922144635006FCDD7 /* NewPostViewController.swift */,
@ -316,7 +307,7 @@
12E36D94221424EA006FCDD7 /* Sources */,
12E36D95221424EA006FCDD7 /* Frameworks */,
12E36D96221424EA006FCDD7 /* Resources */,
12E36DBE221441D5006FCDD7 /* Embed Frameworks */,
12FDAC85226B5E3700995B4E /* Embed Frameworks */,
);
buildRules = (
);
@ -393,6 +384,7 @@
125BD5812217314A008A3575 /* NewsVC.swift in Sources */,
12E36DB72214400A006FCDD7 /* Post.swift in Sources */,
12DB7FDF221877160096878E /* InviteViewController.swift in Sources */,
121A8972226B1EAC005EE599 /* AnonimousChannelController.swift in Sources */,
12E36DCA22144635006FCDD7 /* NewPostViewController.swift in Sources */,
12E36D9E221424EA006FCDD7 /* NewsController.swift in Sources */,
12E36DCC22144725006FCDD7 /* PostViewCell.swift in Sources */,
@ -576,7 +568,7 @@
PRODUCT_BUNDLE_IDENTIFIER = rednikina.com.drHSE.GDproject.sos;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
@ -600,7 +592,7 @@
PRODUCT_BUNDLE_IDENTIFIER = rednikina.com.drHSE.GDproject.sos;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;

View File

@ -43,8 +43,8 @@
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = ""
selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"

View File

@ -354,7 +354,7 @@
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="fzv-8a-15V" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="3560.8000000000002" y="-597.75112443778119"/>
<point key="canvasLocation" x="3577" y="-598"/>
</scene>
<!--New Post View Controller-->
<scene sceneID="TVK-xu-UdJ">
@ -506,6 +506,45 @@
</objects>
<point key="canvasLocation" x="-466" y="641"/>
</scene>
<!--Pulley View Controller-->
<scene sceneID="UoF-Qk-BM8">
<objects>
<viewController id="2Yu-1o-yft" customClass="PulleyViewController" customModule="Pulley" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="3et-u3-dSP">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="za7-bL-mv7">
<rect key="frame" x="0.0" y="20" width="375" height="323.5"/>
<connections>
<segue destination="ulF-DZ-X8U" kind="embed" id="AAL-by-ugl"/>
</connections>
</containerView>
<containerView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iWE-c6-fco">
<rect key="frame" x="0.0" y="343.5" width="375" height="323.5"/>
<connections>
<segue destination="WeI-zO-7Eh" kind="embed" id="JkK-vq-eWP"/>
</connections>
</containerView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstItem="iWE-c6-fco" firstAttribute="leading" secondItem="3L3-Xf-lna" secondAttribute="leading" id="Exq-4M-b4b"/>
<constraint firstItem="3L3-Xf-lna" firstAttribute="trailing" secondItem="iWE-c6-fco" secondAttribute="trailing" id="FCK-0g-Hkx"/>
<constraint firstItem="3L3-Xf-lna" firstAttribute="trailing" secondItem="za7-bL-mv7" secondAttribute="trailing" id="HQc-5t-Y2J"/>
<constraint firstItem="iWE-c6-fco" firstAttribute="height" secondItem="za7-bL-mv7" secondAttribute="height" id="Lnu-CN-lkp"/>
<constraint firstItem="za7-bL-mv7" firstAttribute="top" secondItem="3L3-Xf-lna" secondAttribute="top" id="XlM-4t-IZF"/>
<constraint firstItem="za7-bL-mv7" firstAttribute="leading" secondItem="3L3-Xf-lna" secondAttribute="leading" id="gft-5C-vKC"/>
<constraint firstItem="3L3-Xf-lna" firstAttribute="bottom" secondItem="iWE-c6-fco" secondAttribute="bottom" id="ied-zS-PJe"/>
<constraint firstItem="iWE-c6-fco" firstAttribute="top" secondItem="za7-bL-mv7" secondAttribute="bottom" id="wJe-FE-o3y"/>
</constraints>
<viewLayoutGuide key="safeArea" id="3L3-Xf-lna"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="LNf-NC-tIC" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="6568.8000000000002" y="-536.58170914542734"/>
</scene>
<!--News Controller-->
<scene sceneID="6SA-L8-PwW">
<objects>
@ -551,6 +590,63 @@
</objects>
<point key="canvasLocation" x="5888.8000000000002" y="999.40029985007504"/>
</scene>
<!--View Controller-->
<scene sceneID="wC5-hU-UvA">
<objects>
<viewController storyboardIdentifier="DrawerContentViewController1" id="WeI-zO-7Eh" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="JLv-bg-XLk">
<rect key="frame" x="0.0" y="0.0" width="375" height="323.5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zww-sy-694">
<rect key="frame" x="162" y="9" width="51" height="7"/>
<color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="height" constant="7" id="5CW-MN-dqc"/>
<constraint firstAttribute="width" constant="51" id="RzS-Ug-nLj"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="zww-sy-694" secondAttribute="bottom" constant="293.5" id="YkN-uN-QpE"/>
<constraint firstItem="zww-sy-694" firstAttribute="centerX" secondItem="JLv-bg-XLk" secondAttribute="centerX" id="drj-8r-0tX"/>
<constraint firstItem="zww-sy-694" firstAttribute="top" secondItem="JLv-bg-XLk" secondAttribute="top" constant="9" id="qA5-6a-1F4"/>
</constraints>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="2Qo-34-wZp" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="7640.8000000000002" y="-336.43178410794604"/>
</scene>
<!--News Controller-->
<scene sceneID="RDE-dJ-rKL">
<objects>
<viewController storyboardIdentifier="NewsController1" id="ulF-DZ-X8U" customClass="NewsController" customModule="GDproject" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="mOG-nL-CRD">
<rect key="frame" x="0.0" y="0.0" width="375" height="323.5"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="FSV-Pu-wlS">
<rect key="frame" x="0.0" y="0.0" width="375" height="323.5"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</tableView>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
<constraints>
<constraint firstAttribute="trailing" secondItem="FSV-Pu-wlS" secondAttribute="trailing" id="8wp-yX-8TF"/>
<constraint firstItem="FSV-Pu-wlS" firstAttribute="leading" secondItem="mOG-nL-CRD" secondAttribute="leading" id="Hah-NN-nNj"/>
<constraint firstAttribute="bottom" secondItem="FSV-Pu-wlS" secondAttribute="bottom" id="PSp-HL-Xpi"/>
<constraint firstItem="FSV-Pu-wlS" firstAttribute="top" secondItem="mOG-nL-CRD" secondAttribute="top" id="piA-Z5-euY"/>
</constraints>
</view>
<connections>
<outlet property="tableView" destination="FSV-Pu-wlS" id="Ti9-HQ-24K"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="mMa-G9-Ygw" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="7643" y="-796"/>
</scene>
</scenes>
<resources>
<image name="1" width="30" height="30"/>

View File

@ -0,0 +1,18 @@
//
// AnonimousChannelController.swift
// GDproject
//
// Created by cstore on 20/04/2019.
// Copyright © 2019 drHSE. All rights reserved.
//
import UIKit
class AnonimousChannelController: UITableViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
}

View File

@ -13,11 +13,16 @@ struct ChannelData{
var subtitle = String()
}
protocol ChannelListData: class {
func reloadData (with channels: [Model.Channels])
}
// TODO: make search controller availiable
class ChannelListController: UITableViewController {
// MARK: - Output -
var onChannelSelected: ((Model.Channels) -> Void)?
var onEditingModeBegins: ((Model.Channels, IndexPath)->Void)?
// MARK: - filter search controller
var filteredDataSource = [Model.Channels]()
@ -88,16 +93,14 @@ class ChannelListController: UITableViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(true)
askForUpdates()
//askForUpdates()
tabBarController?.tabBar.isHidden = false
}
@objc func addChannel()
{
// editing mode is on automatically
let vc = storyboard?.instantiateViewController(withIdentifier: channelControllerId) as! ChannelController
vc.index = 1
vc.channel = Model.Channels(people: [], name: "Untitled", tags: [])
navigationController?.pushViewController(vc, animated: true)
onEditingModeBegins?(Model.Channels(people: [], name: "Untitled", tags: []),IndexPath(row: 1, section: 0))
}
static let generalChannel = Model.Channels(people: [], name: "General", tags: [])
@ -141,15 +144,11 @@ class ChannelListController: UITableViewController {
override func tableView(_ tableView: UITableView, editActionsForRowAt indexPath: IndexPath) -> [UITableViewRowAction]?
{
let editButton = UITableViewRowAction(style: .normal, title: "Edit") { [weak self] (action, indexPath) in
let vc = self?.storyboard?.instantiateViewController(withIdentifier: channelControllerId) as! ChannelController
vc.index = indexPath.row
vc.channel = self?.dataSource[indexPath.row]
self?.navigationController?.pushViewController(vc, animated: true)
let editButton = UITableViewRowAction(style: .normal, title: "Edit") { [unowned self] (rowAction, indexPath) in
self.onEditingModeBegins?(self.dataSource[indexPath.row], indexPath)
}
editButton.backgroundColor = #colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)
editButton.backgroundColor = #colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1)
let deleteButton = UITableViewRowAction(style: .normal, title: "Delete") { [weak self] (action, indexPath) in

View File

@ -10,7 +10,7 @@ import UIKit
import Cartography
import Marklight
import TinyConstraints
import WSTagsField
// import WSTagsField
class NewPostViewController: UIViewController, UITextViewDelegate {
@ -18,7 +18,7 @@ class NewPostViewController: UIViewController, UITextViewDelegate {
@IBOutlet weak var viewForTags: UIView!
fileprivate let tagsField = WSTagsField()
// fileprivate let tagsField = WSTagsField()
// Keep strong instance of the `NSTextStorage` subclass
let textStorage = MarklightTextStorage()
@ -55,10 +55,10 @@ class NewPostViewController: UIViewController, UITextViewDelegate {
setUpMD()
setUpTextView()
setUpAccessoryView()
setUpTagsView()
//setUpTagsView()
}
func setUpTagsView(){
/* func setUpTagsView(){
tagsField.frame = viewForTags.bounds
viewForTags.addSubview(tagsField)
@ -86,7 +86,7 @@ class NewPostViewController: UIViewController, UITextViewDelegate {
tagsField.acceptTagOption = .space
textFieldEvents()
}
}*/
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
@ -94,7 +94,7 @@ class NewPostViewController: UIViewController, UITextViewDelegate {
navigationController?.navigationBar.prefersLargeTitles = false
navigationItem.title = "New post"
textView.text = NewPostViewController.draft
tagsField.addTags(NewPostViewController.hashTagsDraft)
// tagsField.addTags(NewPostViewController.hashTagsDraft)
}
@ -213,7 +213,7 @@ class NewPostViewController: UIViewController, UITextViewDelegate {
var indexOfPost = 0
// MARK:- new post
@objc func newPost(){
Model.createAndPublish(body: [Model.Attachments(markdown: textView!.text)], tags: tagsField.tags.map { $0.text })
Model.createAndPublish(body: [Model.Attachments(markdown: textView!.text)], tags: /*tagsField.tags.map { $0.text }*/ [])
// adding row to uiTableView after adding new post
// myProtocol?.addPost(post: p)
moveBackToParentVC?()
@ -228,7 +228,7 @@ class NewPostViewController: UIViewController, UITextViewDelegate {
[weak self]
_ in
NewPostViewController.draft = self?.textView.text ?? ""
NewPostViewController.hashTagsDraft = self?.tagsField.tags.map { $0.text } ?? []
NewPostViewController.hashTagsDraft = /*self?.tagsField.tags.map { $0.text } ??*/ []
self?.moveBackToParentVC?()
}
@ -269,7 +269,7 @@ class NewPostViewController: UIViewController, UITextViewDelegate {
textView.scrollRectToVisible(rect, animated: animated)
}
fileprivate func textFieldEvents() {
/*fileprivate func textFieldEvents() {
tagsField.onDidAddTag = { _, _ in
print("onDidAddTag")
}
@ -293,16 +293,16 @@ class NewPostViewController: UIViewController, UITextViewDelegate {
tagsField.onDidUnselectTagView = { _, tagView in
print("Unselect \(tagView)")
}
}
}*/
}
extension NewPostViewController: UITextFieldDelegate {
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
if textField == tagsField {
/*if textField == tagsField {
textView.becomeFirstResponder()
}
}*/
return true
}

View File

@ -31,13 +31,34 @@ class ChannelsCoordinator: BaseCoordinator{
(channel) in
self?.navigationController?.pushViewController(self!.presentNewsController(with: channel), animated: true)
}
navigationController?.setViewControllers([channels,presentNewsController()], animated: false)
channels.onEditingModeBegins = { [unowned self] (channel, indexPath) in
let vc = self.presentEditingChannelController(with: channel)
self.navigationController?.pushViewController(vc, animated: true)
vc.tabBarController?.tabBar.isHidden = true
}
let nc = presentNewsController()
navigationController?.setViewControllers([channels, nc], animated: false)
}
func presentEditingChannelController(with channel: Model.Channels? = nil) -> PulleyViewController {
let mainContentVC = storyboard.instantiateViewController(withIdentifier: newsController+"1") as! NewsController
let drawerContentVC = storyboard.instantiateViewController(withIdentifier: "DrawerContentViewController1")
mainContentVC.channel = channel
let pulleyDrawerVC = PulleyViewController(contentViewController: mainContentVC, drawerViewController: drawerContentVC)
pulleyDrawerVC.initialDrawerPosition = .collapsed
return pulleyDrawerVC
}
func presentNewsController(with channel: Model.Channels? = nil) -> PulleyViewController {
let mainContentVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: newsController) as! NewsController
let drawerContentVC = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "DrawerContentViewController")
let mainContentVC = storyboard.instantiateViewController(withIdentifier: newsController) as! NewsController
let drawerContentVC = storyboard.instantiateViewController(withIdentifier: "DrawerContentViewController")
mainContentVC.channel = channel
mainContentVC.news.onFullPost = {

View File

@ -79,7 +79,7 @@ class LogInViewController: UIViewController {
func logicOfLogInInputValidation() -> ((String?)->()) {
let logic: ((String?)->()) = { [weak self] (someText) in
if let text = someText, !text.isEmpty, let id = Int(text) {
if let text = someText, !text.isEmpty, let _ = Int(text) {
self?.logInButton.isEnabled = true
} else {
self?.logInButton.isEnabled = false
@ -95,7 +95,7 @@ class LogInViewController: UIViewController {
setUpView()
configureKeyboard()
let mailFieldValuesSignal: Signal<String?, NoError> = mailTextField.reactive.continuousTextValues
let mailFieldValuesSignal: Signal<String, Never> = mailTextField.reactive.continuousTextValues
mailFieldValuesSignal.observeValues(logicOfLogInInputValidation())

View File

@ -37,11 +37,11 @@ class Model{
static let channelsCreateURL = URL(string: "\(baseUrl)/channels/create")!
static let channelsDeleteURL = URL(string: "\(baseUrl)/channels/delete")!
static let channelsGetAnonURL = URL(string: "\(baseUrl)/channels/getAnonymous")!
static let complexURL = URL(string: "\(baseUrl)/complex")!
struct QueryPosts: Codable{
struct QueryPosts: Codable {
var users: [Int: Users]
var posts: [Posts]
var response: [Posts]
}
struct Posts: Codable {
@ -227,7 +227,7 @@ class Model{
return }
idUser = newQueery.users
completion((newQueery.users, newQueery.posts))
completion((newQueery.users, newQueery.response))
}
}
@ -274,7 +274,7 @@ class Model{
guard let newPost = try? decoder.decode(QueryPosts.self, from: json) else { return }
completion(newPost.posts)
completion(newPost.response)
}
}
@ -336,7 +336,7 @@ class Model{
guard let newQueery = try? decoder.decode(QueryPosts.self, from: json) else { return }
idUser = newQueery.users
completion((newQueery.users, newQueery.posts))
completion((newQueery.users, newQueery.response))
}
}
@ -498,7 +498,10 @@ class Model{
guard let newQueery = try? decoder.decode(QueryPosts.self, from: json) else { return }
// idUser = newQueery.users
completion((newQueery.users, newQueery.posts))
completion((newQueery.users, newQueery.response))
}
}
}