Commit f6c10426 authored by ColdPaleLight's avatar ColdPaleLight

Fix iOS Example project compilation problem

parent 524b6601
......@@ -7,9 +7,9 @@
//
#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;
......
......@@ -9,7 +9,7 @@
#import "AppDelegate.h"
#import "UIViewControllerDemo.h"
#import "DemoRouter.h"
#import <flutter_boost/FlutterBoost.h>
#import <flutter_boost2/FlutterBoost2.h>
@interface AppDelegate ()
......@@ -20,7 +20,7 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
DemoRouter *router = [DemoRouter sharedRouter];
[FlutterBoostPlugin.sharedInstance startFlutterWithPlatform:router
[FlutterBoostPlugin2.sharedInstance startFlutterWithPlatform:router
onStart:^(FlutterEngine *fvc) {
}];
......@@ -35,7 +35,7 @@
vc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"hybrid" image:nil tag:0];
FLBFlutterViewContainer *fvc = FLBFlutterViewContainer.new;
FLB2FlutterViewContainer *fvc = FLB2FlutterViewContainer.new;
[fvc setName:@"tab" params:@{}];
fvc.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"flutter_tab" image:nil tag:1];
......
......@@ -8,7 +8,7 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <flutter_boost/FlutterBoost.h>
#import <flutter_boost2/FlutterBoost2.h>
NS_ASSUME_NONNULL_BEGIN
......
......@@ -7,7 +7,7 @@
//
#import "DemoRouter.h"
#import <flutter_boost/FlutterBoost.h>
#import <flutter_boost2/FlutterBoost2.h>
@implementation DemoRouter
......@@ -56,7 +56,7 @@
{
BOOL animated = [exts[@"animated"] boolValue];
animated = YES;
FLBFlutterViewContainer *vc = (id)self.navigationController.presentedViewController;
FLB2FlutterViewContainer *vc = (id)self.navigationController.presentedViewController;
if([vc isKindOfClass:FLB2FlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){
[vc dismissViewControllerAnimated:animated completion:^{}];
}else{
......@@ -80,13 +80,13 @@
}
if([params[@"present"] boolValue]){
FLBFlutterViewContainer *vc = FLBFlutterViewContainer.new;
FLB2FlutterViewContainer *vc = FLB2FlutterViewContainer.new;
[vc setName:name params:params];
[self.navigationController presentViewController:vc animated:animated completion:^{
if(completion) completion(YES);
}];
}else{
FLBFlutterViewContainer *vc = FLBFlutterViewContainer.new;
FLB2FlutterViewContainer *vc = FLB2FlutterViewContainer.new;
[vc setName:name params:params];
[self.navigationController pushViewController:vc animated:animated];
if(completion) completion(YES);
......@@ -103,8 +103,8 @@
return;
}
FLBFlutterViewContainer *vc = (id)self.navigationController.presentedViewController;
if([vc isKindOfClass:FLBFlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){
FLB2FlutterViewContainer *vc = (id)self.navigationController.presentedViewController;
if([vc isKindOfClass:FLB2FlutterViewContainer.class] && [vc.uniqueIDString isEqual: uid]){
[vc dismissViewControllerAnimated:animated completion:^{}];
}else{
[self.navigationController popViewControllerAnimated:animated];
......
......@@ -9,7 +9,7 @@
#import "UIViewControllerDemo.h"
#import <Flutter/Flutter.h>
#import "DemoRouter.h"
#import <flutter_boost/FlutterBoostPlugin.h>
#import <flutter_boost2/FlutterBoostPlugin2.h>
@interface UIViewControllerDemo ()
......@@ -23,21 +23,20 @@
// Do any additional setup after loading the view from its nib.
}
- (IBAction)pushFlutterPage:(id)sender {
[DemoRouter.sharedRouter openPage:@"first"
params:@{}
animated:YES
completion:^(BOOL f){
[DemoRouter.sharedRouter open:@"first"
urlParams:@{}
exts:@{@"animated":@(YES)}
completion:^(BOOL f){
}];
}
- (IBAction)present:(id)sender {
[DemoRouter.sharedRouter openPage:@"second"
params:@{@"present":@(YES)}
animated:YES
completion:^(BOOL f){}];
[DemoRouter.sharedRouter open:@"second"
urlParams:@{@"present":@(YES)}
exts:@{@"animated":@(YES)}
completion:^(BOOL f){}];
// [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