zoukankan      html  css  js  c++  java
  • switf重载

    import UIKit

    import Foundation

    class MyView: UIView {

     //   var acolor :UIColor

        

        /*

        // Only override draw() if you perform custom drawing.

        // An empty implementation adversely affects performance during animation.

        override func draw(_ rect: CGRect) {

            // Drawing code

        }

        */

    //    private var cancelButtonTitle: String!;

    //    private var destructiveButtonTitle: String!;

    //    private var otherButtonTitles: [String]!;

    //

        

        override init(frame: CGRect) {

    //        cancelButtonTitle = String()

    //        destructiveButtonTitle = String()

    //        otherButtonTitles=[String]()

            super.init(frame:frame)

        }

        

        required init?(coder aDecoder: NSCoder) {

            super.init(coder: aDecoder)!;

        }

            //convenience可选够造初始

        convenience init(acolor:UIColor) {

           self.init(frame: CGRect.zero)

    //        self.cancelButtonTitle = cancelButtonTitle;

    //        self.destructiveButtonTitle = destructiveButtonTitle;

    //        self.otherButtonTitles = otherButtonTitles;

            self.backgroundColor = acolor

           // prepareUI();

        }

        

    }

    一天一章
  • 相关阅读:
    NEERC 15 (10/12)
    uoj259 & 独立集问题的一些做法
    Berlekamp-Massey算法简单介绍
    树链剖分的一种用法
    长链剖分
    [黑科技]常数优化的一些技巧
    tarjan解决路径询问问题
    Comet OJ
    洛谷P3835 【模板】可持久化平衡树(FHQ Treap)
    LOJ#107. 维护全序集(FHQ Treap)
  • 原文地址:https://www.cnblogs.com/hangman/p/8403813.html
Copyright © 2011-2022 走看看