Commit f6c10426 authored by ColdPaleLight's avatar ColdPaleLight

Fix iOS Example project compilation problem

parent 524b6601
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import <flutter_boost/FlutterBoost.h> #import <flutter_boost2/FlutterBoost2.h>
@interface AppDelegate : FLBFlutterAppDelegate <UIApplicationDelegate> @interface AppDelegate : FLB2FlutterAppDelegate <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window; @property (strong, nonatomic) UIWindow *window;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#import "AppDelegate.h" #import "AppDelegate.h"
#import "UIViewControllerDemo.h" #import "UIViewControllerDemo.h"
#import "DemoRouter.h" #import "DemoRouter.h"
#import <flutter_boost/FlutterBoost.h> #import <flutter_boost2/FlutterBoost2.h>
@interface AppDelegate () @interface AppDelegate ()
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{ {
DemoRouter *router = [DemoRouter sharedRouter]; DemoRouter *router = [DemoRouter sharedRouter];
[FlutterBoostPlugin.sharedInstance startFlutterWithPlatform:router [FlutterBoostPlugin2.sharedInstance startFlutterWithPlatform:router
onStart:^(FlutterEngine *fvc) { onStart:^(FlutterEngine *fvc) {
}]; }];
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
vc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"hybrid" image:nil tag:0]; vc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"hybrid" image:nil tag:0];
FLBFlutterViewContainer *fvc = FLBFlutterViewContainer.new; FLB2FlutterViewContainer *fvc = FLB2FlutterViewContainer.new;
[fvc setName:@"tab" params:@{}]; [fvc setName:@"tab" params:@{}];
fvc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"flutter_tab" image:nil tag:1]; fvc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"flutter_tab" image:nil tag:1];
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import <flutter_boost/FlutterBoost.h> #import <flutter_boost2/FlutterBoost2.h>
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
// //
#import "DemoRouter.h" #import "DemoRouter.h"
#import <flutter_boost/FlutterBoost.h> #import <flutter_boost2/FlutterBoost2.h>
@implementation DemoRouter @implementation DemoRouter
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
{ {
BOOL animated = [exts[@"animated"] boolValue]; BOOL animated = [exts[@"animated"] boolValue];
animated = YES; animated = YES;
FLBFlutterViewContainer *vc = (id)self.navigationController.presentedViewController; FLB2FlutterViewContainer *vc = (id)self.navigationController.presentedViewController;
if([vc isKindOfClass:FLB2FlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){ if([vc isKindOfClass:FLB2FlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){
[vc dismissViewControllerAnimated:animated completion:^{}]; [vc dismissViewControllerAnimated:animated completion:^{}];
}else{ }else{
...@@ -80,13 +80,13 @@ ...@@ -80,13 +80,13 @@
} }
if([params[@"present"] boolValue]){ if([params[@"present"] boolValue]){
FLBFlutterViewContainer *vc = FLBFlutterViewContainer.new; FLB2FlutterViewContainer *vc = FLB2FlutterViewContainer.new;
[vc setName:name params:params]; [vc setName:name params:params];
[self.navigationController presentViewController:vc animated:animated completion:^{ [self.navigationController presentViewController:vc animated:animated completion:^{
if(completion) completion(YES); if(completion) completion(YES);
}]; }];
}else{ }else{
FLBFlutterViewContainer *vc = FLBFlutterViewContainer.new; FLB2FlutterViewContainer *vc = FLB2FlutterViewContainer.new;
[vc setName:name params:params]; [vc setName:name params:params];
[self.navigationController pushViewController:vc animated:animated]; [self.navigationController pushViewController:vc animated:animated];
if(completion) completion(YES); if(completion) completion(YES);
...@@ -103,8 +103,8 @@ ...@@ -103,8 +103,8 @@
return; return;
} }
FLBFlutterViewContainer *vc = (id)self.navigationController.presentedViewController; FLB2FlutterViewContainer *vc = (id)self.navigationController.presentedViewController;
if([vc isKindOfClass:FLBFlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){ if([vc isKindOfClass:FLB2FlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){
[vc dismissViewControllerAnimated:animated completion:^{}]; [vc dismissViewControllerAnimated:animated completion:^{}];
}else{ }else{
[self.navigationController popViewControllerAnimated:animated]; [self.navigationController popViewControllerAnimated:animated];
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#import "UIViewControllerDemo.h" #import "UIViewControllerDemo.h"
#import <Flutter/Flutter.h> #import <Flutter/Flutter.h>
#import "DemoRouter.h" #import "DemoRouter.h"
#import <flutter_boost/FlutterBoostPlugin.h> #import <flutter_boost2/FlutterBoostPlugin2.h>
@interface UIViewControllerDemo () @interface UIViewControllerDemo ()
...@@ -23,21 +23,20 @@ ...@@ -23,21 +23,20 @@
// Do any additional setup after loading the view from its nib. // Do any additional setup after loading the view from its nib.
} }
- (IBAction)pushFlutterPage:(id)sender { - (IBAction)pushFlutterPage:(id)sender {
[DemoRouter.sharedRouter openPage:@"first" [DemoRouter.sharedRouter open:@"first"
params:@{} urlParams:@{}
animated:YES exts:@{@"animated":@(YES)}
completion:^(BOOL f){ completion:^(BOOL f){
}]; }];
} }
- (IBAction)present:(id)sender { - (IBAction)present:(id)sender {
[DemoRouter.sharedRouter openPage:@"second" [DemoRouter.sharedRouter open:@"second"
params:@{@"present":@(YES)} urlParams:@{@"present":@(YES)}
animated:YES exts:@{@"animated":@(YES)}
completion:^(BOOL f){}]; completion:^(BOOL f){}];
// [self dismissViewControllerAnimated:YES completion:completion]; // [self dismissViewControllerAnimated:YES completion:completion];
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment