2016-03-28 9 views
5

तालिका को कैसे प्राप्त करें UITableViewController में अनुभाग दृश्य देखें।UITableView अनुभाग छाया

+0

इस प्रयास करें http://stackoverflow.com/questions/13395362/shadow-around-a-section-of- है uitableview? rq = 1 – dip

+0

इसे पहले से चेक किया गया है यह अनुभागों में छाया नहीं बनाता है .. यह अनुभाग शीर्षलेख में छाया ड्रॉप करता है – nik

+0

क्या आप अनुभाग हेडर लिखने में यह छाया चाहते हैं? या पूरे खंड में – HardikDG

उत्तर

3

UITableView धारा की ड्रॉप छाया पाने के लिए इस विधि जोड़ें इस उत्तर Swift3

में
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { 
    let shadowView = UIView() 
    let gradient = CAGradientLayer() 
    gradient.frame.size = CGSize(width: myTab.bounds.width, height: 15) 

    let stopColor = UIColor.gray.cgColor  
    let startColor = UIColor.white.cgColor  

    gradient.colors = [stopColor, startColor]  
    gradient.locations = [0.0,0.8] 

    shadowView.layer.addSublayer(gradient)  

    return shadowView 
} 
संबंधित मुद्दे