美文网首页
swfit登录耶

swfit登录耶

作者: 970517 | 来源:发表于2018-09-16 20:22 被阅读0次

    //AppDelegate里面

        let tt = TTViewController() 
        self.window?.rootViewController=UINavigationController (rootViewController: tt)
    

    //TTViewController里面

      self.navigationItem.title="会员注册"
        
        let item1 = UIBarButtonItem(title: "<", style: UIBarButtonItemStyle.plain, target: self, action: nil)        
        self.navigationItem.leftBarButtonItem=item1
        self.view.backgroundColor=UIColor.lightGray
        
        let img = UIImageView.init(frame: CGRect(x: 150, y: 100, width: 100, height: 100))   
        img.image=UIImage.init(named: "touxiang")        
        img.layer.cornerRadius=50
        img.layer.masksToBounds=true
        self.view.addSubview(img)
        
        let textF = UITextField.init(frame: CGRect(x: 0, y: 210, width: self.view.frame.size.width, height: 40))
        textF.placeholder="请输入手机号"
        textF.backgroundColor=UIColor.white
        textF.keyboardType = UIKeyboardType.numberPad
        self.view.addSubview(textF)
        
        let textF1 = UILabel.init(frame: CGRect(x: 0, y: 251, width: self.view.frame.size.width, height: 40))
        textF1.backgroundColor=UIColor.white
        
        let imga = UIImageView.init(frame: CGRect(x: 10, y:0 , width: 100, height: 40))
        imga.image=UIImage.init(named: "touxiang")
        textF1.addSubview(imga)  
        self.view.addSubview(textF1)
        
        let textF2 = UITextField.init(frame: CGRect(x: 0, y: 292, width: self.view.frame.size.width, height: 40))
        textF2.placeholder="请输入手机号"
        textF2.backgroundColor=UIColor.white
        textF2.isSecureTextEntry = true
        self.view.addSubview(textF2)
        
        let but = UIButton.init(frame: CGRect(x: 50, y: 350, width: 300, height: 40))  
        but.setTitle("登录", for: .normal)
        but.backgroundColor=UIColor.blue
        but.layer.cornerRadius=10
        but.layer.masksToBounds=true
        self.view.addSubview(but)
        
        let but1 = UIButton.init(frame: CGRect(x: 200, y: 400, width: 80, height: 40))       
        but1.setTitle("已有账号", for: .normal)
        self.view.addSubview(but1)
        
        let but2 = UIButton.init(frame: CGRect(x: 280, y: 400, width: 80, height: 40))
        but2.setTitle("登录", for: .normal)
        self.view.addSubview(but2)
    

    相关文章

      网友评论

          本文标题:swfit登录耶

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