refact: use DoricSingleton to hold all static or singleton objects
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
#import "AppDelegate.h"
|
||||
#import "NavigationController.h"
|
||||
#import "ViewController.h"
|
||||
#import "DoricRegistry.h"
|
||||
#import <DoricCore/Doric.h>
|
||||
|
||||
#if __has_include(<SDWebImage/SDWebImage.h>)
|
||||
|
||||
@@ -27,7 +27,7 @@ @implementation AppDelegate
|
||||
|
||||
|
||||
- (void)localeChanged {
|
||||
[DoricRegistry setEnvironmentValue:@{
|
||||
[Doric setEnvironmentValue:@{
|
||||
@"localeLanguage": [[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleLanguageCode],
|
||||
@"localeCountry": [[NSLocale autoupdatingCurrentLocale] objectForKey:NSLocaleCountryCode],
|
||||
}];
|
||||
|
@@ -46,9 +46,9 @@ - (void)viewDidLoad {
|
||||
it.dataSource = self;
|
||||
it.delegate = self;
|
||||
}]];
|
||||
[DoricRegistry register:[DemoLibrary new]];
|
||||
[DoricRegistry enablePerformance:YES];
|
||||
[DoricRegistry enableRenderSnapshot:YES];
|
||||
[Doric registerLibrary:[DemoLibrary new]];
|
||||
[Doric enablePerformance:YES];
|
||||
[Doric enableRenderSnapshot:YES];
|
||||
}
|
||||
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
|
Reference in New Issue
Block a user