Change navigation bar bottom border color Swift

前端 未结 8 1295
时光取名叫无心
时光取名叫无心 2020-12-30 21:36

It works with

import UIKit

class ViewController: UIViewController {

override func viewDidLoad() {
    super.viewDidLoad()
    // Do any additional setup a         


        
8条回答
  •  灰色年华
    2020-12-30 22:29

    for Swift 3.0 just change this line:

    CGContextFillRect(ctx, CGRect(x: 0, y: 0, width: 1, height: 1))
    

    to this:

    ctx?.fill(CGRect(x: 0, y: 0, width: 1, height: 1))
    

提交回复
热议问题