• 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();

        }

        

    }

    一天一章
  • 相关阅读:
    UVaLive 7362 Farey (数学,欧拉函数)
    UVaLive 7361 Immortal Porpoises (矩阵快速幂)
    UVaLive 7359 Sum Kind Of Problem (数学,水题)
    CodeForces 706D Vasiliy's Multiset (字典树查询+贪心)
    负载均衡服务器
    集群-如何理解集群?
    架构规划
    领域模型
    状态图
    E-R图
  • 原文地址:https://www.cnblogs.com/hangman/p/8403813.html
Copyright © 2020-2023  润新知