xcode11搭建基本框架

前言

整理下😄

内容

  • 删除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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。