2016-03-30 15 views

cevap

5

senin viewDidLoad() bu satırı ekleyin:

yourtableView.tableFooterView = UIView() 

veya

yourtableView.tableFooterView = UIView(frame: CGRectZero) 
0

böyle bu temsilci yöntemi uygulamak kullanın: Sorun aslında o kaynaklanan olabilir

func tableView(tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { 
     return 0.1 
    } 
    func tableView(tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { 
     return UIView() 
    } 
1

UITableView’da daha fazla satır belirtmeniz gerekir. o veriyi doldur. Bir Dizideki UITableView'u doldurduğunuz varsayılarak, muhtemelen satır sayısını dizi sayısı olarak ayarlamanız gerekir. Bir UITableViewUIViewController kendine UITableView temsilci ayarlayabilir ve bu yöntemi uygulamak gömülü ise

Bir UITableViewController geçersiz kıl bu yöntemi

override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 
return yourArray.count 

} 

kullanıyorsanız.

func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { 
    return yourArray.count 
} 
1

Aşağıdaki kodu deneyin. Bu size yardımcı olabilir.

override func viewDidLoad() { 
     super.viewDidLoad() 
     tableView.tableFooterView = UIView() 
    } 
1

yazma bu kod

self.tableView.tableFooterView = UIView(frame: CGRectZero) 
İlgili konular