Bladeren bron

添加navigationController支持

tags/0.0.10+1
Weller 3 jaren geleden
bovenliggende
commit
6a941f95dd
4 gewijzigde bestanden met toevoegingen van 67 en 4 verwijderingen
  1. +6
    -0
      example/ios/Runner.xcodeproj/project.pbxproj
  2. +5
    -4
      example/ios/Runner/Base.lproj/Main.storyboard
  3. +18
    -0
      example/ios/Runner/FNBaseFlutterViewController.h
  4. +38
    -0
      example/ios/Runner/FNBaseFlutterViewController.m

+ 6
- 0
example/ios/Runner.xcodeproj/project.pbxproj Bestand weergeven

@@ -10,6 +10,7 @@
0AE1282E2855C01A7663C354 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A860D105A09AEA74261219D2 /* libPods-Runner.a */; };
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
1F2F55D7256DFF5400A97630 /* app_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 1F2F55D6256DFF5400A97630 /* app_icon.png */; };
1F5407E52616FE4800C6A831 /* FNBaseFlutterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F5407E42616FE4800C6A831 /* FNBaseFlutterViewController.m */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
@@ -41,6 +42,8 @@
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
1F2F55D6256DFF5400A97630 /* app_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = app_icon.png; sourceTree = "<group>"; };
1F5407E32616FE4800C6A831 /* FNBaseFlutterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FNBaseFlutterViewController.h; sourceTree = "<group>"; };
1F5407E42616FE4800C6A831 /* FNBaseFlutterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FNBaseFlutterViewController.m; sourceTree = "<group>"; };
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
3CF5E07C1CDF5F802B057127 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; };
5F28AF46041AA2464EF2701A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; };
@@ -123,6 +126,8 @@
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
1F5407E32616FE4800C6A831 /* FNBaseFlutterViewController.h */,
1F5407E42616FE4800C6A831 /* FNBaseFlutterViewController.m */,
9F5F7EA525626514009BD779 /* Runner.entitlements */,
9FFCE2F3251ADE0600F4F353 /* 项目资源 */,
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
@@ -362,6 +367,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1F5407E52616FE4800C6A831 /* FNBaseFlutterViewController.m in Sources */,
978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
97C146F31CF9000F007C117D /* main.m in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,


+ 5
- 4
example/ios/Runner/Base.lproj/Main.storyboard Bestand weergeven

@@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15705" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
<device id="retina6_1" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15706"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="17703"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<!--Base Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<viewController id="BYZ-38-t0r" customClass="FNBaseFlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
@@ -20,6 +20,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<navigationItem key="navigationItem" id="Nba-kd-4am"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>


+ 18
- 0
example/ios/Runner/FNBaseFlutterViewController.h Bestand weergeven

@@ -0,0 +1,18 @@
//
// FNBaseFlutterViewController.h
// Runner
//
// Created by FNUser on 2020/10/28.
//

#import <UIKit/UIKit.h>
#import "Flutter/FlutterViewController.h"

NS_ASSUME_NONNULL_BEGIN

@interface FNBaseFlutterViewController : FlutterViewController


@end

NS_ASSUME_NONNULL_END

+ 38
- 0
example/ios/Runner/FNBaseFlutterViewController.m Bestand weergeven

@@ -0,0 +1,38 @@
//
// FNBaseFlutterViewController.m
// Runner
//
// Created by FNUser on 2020/10/28.
//

#import "FNBaseFlutterViewController.h"

@interface FNBaseFlutterViewController ()


@end

@implementation FNBaseFlutterViewController


- (void)viewDidLoad {
[super viewDidLoad];
UIWindow *window = [UIApplication sharedApplication].delegate.window;
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self];
window.rootViewController = navController;
navController.navigationBar.hidden = YES;
}

- (void)viewWillDisappear:(BOOL)animated {
[super viewWillDisappear:animated];
[self.navigationController setNavigationBarHidden:NO animated:animated];
}

- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self.navigationController setNavigationBarHidden:YES animated:animated];
}


@end

Laden…
Annuleren
Opslaan