Когда я добавляю tableView в viewController, по умолчанию прокрутки tableView, но я хочу, чтобы он был статичным. Является ли это возможным?Как отключить прокрутку таблицы TableView?
Вот мой код:
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{
return names.count
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let cell = tableview.dequeueReusableCellWithIdentifier("cell") as! TableViewCell
cell.username.text = names[indexPath.row]
return cell
}
func numberOfSectionsInTableView(tableView: UITableView) -> Int
{
return 1
}
func tableView(tableView: UITableView, heightForRowAtIndexPath indexPath: NSIndexPath) -> CGFloat
{
return 50.0
}
вы можете объяснить, что вы имеете в виду строк движется? – Shubhank
Вы хотите отключить прокрутку таблицыView? –
yess @ Umair Afzal – Bansal