-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
398 additions
and
130 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// NSDate+GenerDate.h | ||
// gener | ||
// | ||
// Created by Privezentsev Yury on 28.07.17. | ||
// Copyright © 2017 GNR. All rights reserved. | ||
// | ||
|
||
#import <Foundation/Foundation.h> | ||
|
||
@interface NSDate (GenerDate) | ||
|
||
/** | ||
Formats NSDate to NSString with specified format using NSDateFormatter | ||
@param format NSString date format like in NSDateFormatter | ||
@return formatted NSString representing date | ||
*/ | ||
-(NSString *)stringWithFormat:(NSString *)format; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// | ||
// NSDate+GenerDate.m | ||
// gener | ||
// | ||
// Created by Privezentsev Yury on 28.07.17. | ||
// Copyright © 2017 GNR. All rights reserved. | ||
// | ||
|
||
#import "NSDate+GenerDate.h" | ||
|
||
@implementation NSDate (GenerDate) | ||
|
||
-(NSString *)stringWithFormat:(NSString *)format { | ||
|
||
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; | ||
[dateFormatter setDateFormat:format]; | ||
|
||
return [dateFormatter stringFromDate:self]; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions
33
gener/gener/Templates/swift/Assembly/ModuleAssembly.gentemp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// | ||
// $moduleName$Assembly.swift | ||
// $projectName$ | ||
// | ||
// Created by $author$ on $date$. | ||
// Copyright © $year$ $company$. All rights reserved. | ||
// | ||
|
||
import UIKit | ||
|
||
class $moduleName$Assembly { | ||
|
||
func build$moduleName$Module(_ completion: (UIViewController?) -> Void) { | ||
|
||
// Creating module components | ||
let viewController = UIStoryboard(name: <#Storyboard Name#>, bundle: nil).instantiateViewController(withIdentifier: <#Identifier#>) | ||
let presenter = $moduleName$Presenter() | ||
|
||
guard let moduleViewController = viewController as? $moduleName$ViewController else { | ||
completion(nil) | ||
return | ||
} | ||
|
||
// Inject properties | ||
moduleViewController.output = presenter | ||
presenter.view = moduleViewController | ||
presenter.router = moduleViewController | ||
|
||
completion(moduleViewController) | ||
|
||
} | ||
|
||
} |
27 changes: 27 additions & 0 deletions
27
gener/gener/Templates/swift/Presenter/ModulePresenter.gentemp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// $moduleName$Presenter.swift | ||
// $projectName$ | ||
// | ||
// Created by $author$ on $date$. | ||
// Copyright © $year$ $company$. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
class $moduleName$Presenter { | ||
|
||
var view: $moduleName$ViewInput? | ||
|
||
var router: $moduleName$ModuleRouting? | ||
|
||
} | ||
|
||
// MARK: - $moduleName$ViewOutput | ||
extension $moduleName$Presenter: $moduleName$ViewOutput { | ||
|
||
func didTriggerViewReadyEvent() { | ||
|
||
self.view?.setupInitialState() | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// | ||
// $moduleName$ModuleRouting.swift | ||
// $projectName$ | ||
// | ||
// Created by $author$ on $date$. | ||
// Copyright © $year$ $company$. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
protocol $moduleName$ModuleRouting { | ||
|
||
} |
Oops, something went wrong.