美文网首页
xcode11搭建基本框架

xcode11搭建基本框架

作者: 幻想无极 | 来源:发表于2020-07-07 11:14 被阅读0次

前言

整理下😄

内容

  • 删除SceneDelegate文件,删除AppDelegate中的多余代码
  • 删除Main.storyboard
  • 修改info.plist为如图


    image.png
  • 修改General为如图
    image.png
  • 创建pch文件,并将它的路径添加到配置中(其中/dewu/core是你的路径名)
$(SRCROOT)/dewu/core/IMEPrefixHeader.pch
image.png
  • 在AppDelegate中写下代码测试是否成功
@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (nonatomic,strong) UIWindow *window;

@end

#import "AppDelegate.h"
#import "ViewController.h"

@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds];
    self.window.backgroundColor = [UIColor whiteColor];
    ViewController *vc = [[ViewController alloc]init];
    vc.view.backgroundColor = [UIColor redColor];
    self.window.rootViewController = vc;
    [self.window makeKeyAndVisible];
    return YES;
}

  • 工程目录展示


    image.png

使用cocopods

具体方法看我以前的文章或者百度

# Uncomment the next line to define a global platform for your project
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '11.0'

target 'dewu' do
  use_frameworks!
  pod 'SVProgressHUD'         #指示器

end
image.png

相关文章

网友评论

      本文标题:xcode11搭建基本框架

      本文链接:https://www.haomeiwen.com/subject/ouhaqktx.html