创建一个单视图应用swift工程,删除main.storyboard,修改工程中的Deployment info中的Main interface中的Main
AppDelegate.swift 中的 didFinishLaunchingWithOptions修改为以下代码
//
// AppDelegate.swift
// 反射
//
// Created by targetcloud on 2017/2/13.
// Copyright © 2017年 targetcloud. All rights reserved.
//
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool