Shark Deng

Interactive Designer @Shanju Design in Shanghai

touched caffe / mxnet / python / wordpress / bootstrap / Arduino / Raspberry Pi / webgl / three.js / PIXI / 3dMax

Email

Github

GMAT题库项目规划

2019-11-18 21:22:02

一)数据表。

做了gmat数据表,cr题型插入/修改/删除没有问题。

rc涉及一个stem多个question,还需要测试下,有无bug。

sc要显示下划线,这个没解决。

ds选项都是一样的,我想存在xml文件,节省数据表存储。

ps同cr,就是数学题有时有图片,输入框能支持图片。发布post这个功能有,如何移植到textarea?

二)爬虫

用beautifulsoup把题目抓取下来,并按照我设计的数据表格式存储。

三)app端显示

apns功能,websocket聊天功能,做题功能。

前个项目spritekit接触较多,uikit较少。现借这个项目把uikit基础补上。

附UINavigationController的简单实现:

AppDelegate.swift

import UIKit

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
  
  var window: UIWindow?
  var vc: UIViewController!
  var nav: UINavigationController!
 
  
  func applicationDidFinishLaunching(_ application: UIApplication) {
    
    vc = NavViewController()
    nav = UINavigationController(rootViewController: vc)
    
    window = UIWindow(frame: UIScreen.main.bounds)
    window?.makeKeyAndVisible()
    window?.rootViewController = nav
 
  }

}

 

NavViewController.swift

import UIKit

class NavViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

      UINavigationBar.appearance().tintColor = UIColor.red
      self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "goNext", style: .done, target: self, action: #selector(goNext(sender:)))
      self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "Left", style: .done , target: self, action: #selector(goLeft(sender:)))
      self.title = "Main Page"
      self.navigationItem.backBarButtonItem = UIBarButtonItem(title: "Back", style: .done, target: self, action: #selector(goBack(sender:)))
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    @objc func goNext(sender: AnyObject){
      print("go next")
      let cr = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "cr") as UIViewController
      self.navigationController?.pushViewController(cr, animated: true)
      cr.view.backgroundColor = UIColor.blue
    }
  
    @objc func goLeft(sender: AnyObject){
      print("go left")
    }
  
    @objc func goBack(sender: AnyObject){
    print("go back")
    
  }

}

 

 



——By SharkDeng
如果你喜欢我的文章,欢迎红包赞赏

Leave a Reply

Your email address will not be published. Required fields are marked *