uitableview

iOS scroll to a section in a UITable View

回眸只為那壹抹淺笑 提交于 2020-02-07 19:41:09
问题 does anyone know how to programatically scroll a table view to a section at index path. what i'm trying to do is have tableview with 2 sections and an if statement for example if loading = true scroll the table view up to hide the first section when finished loading scroll table view back down to show first section 回答1: Here is the snippet: NSIndexPath * indexPath = [NSIndexPath indexPathForRow:row inSection:section]; [_tableView scrollToRowAtIndexPath:indexPath atScrollPosition

iOS scroll to a section in a UITable View

心不动则不痛 提交于 2020-02-07 19:41:04
问题 does anyone know how to programatically scroll a table view to a section at index path. what i'm trying to do is have tableview with 2 sections and an if statement for example if loading = true scroll the table view up to hide the first section when finished loading scroll table view back down to show first section 回答1: Here is the snippet: NSIndexPath * indexPath = [NSIndexPath indexPathForRow:row inSection:section]; [_tableView scrollToRowAtIndexPath:indexPath atScrollPosition

Table Will Not Load/Show CloudKit Data

杀马特。学长 韩版系。学妹 提交于 2020-02-06 10:10:38
问题 I am using CloudKit to store a few arrays, then use the arrays to fill a table. I am reloading the table, but it will not show any data. It should be connected to iCloud because I am still able to add to the database. Code is shown below: import UIKit import CloudKit var selectedCellName = "" class explore: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet var tableView: UITableView! var groupNames = [String]() var Group = [CKRecord]() override func viewDidLoad() {

Table Will Not Load/Show CloudKit Data

戏子无情 提交于 2020-02-06 10:03:25
问题 I am using CloudKit to store a few arrays, then use the arrays to fill a table. I am reloading the table, but it will not show any data. It should be connected to iCloud because I am still able to add to the database. Code is shown below: import UIKit import CloudKit var selectedCellName = "" class explore: UIViewController, UITableViewDataSource, UITableViewDelegate { @IBOutlet var tableView: UITableView! var groupNames = [String]() var Group = [CKRecord]() override func viewDidLoad() {

Draw custom separator line between UITableViewCell on iOS 7

一个人想着一个人 提交于 2020-02-06 08:41:00
问题 Because I had some troubles using the default separator line between the UITableViewCell I want to use my own. Therefore I'm using auto layout. C# is the language I used. You can of course provide solutions in Objective-C. In the constructor of my custom cell I add my view UIView : separator = new DividerView (); ContentView.Superview.AddSubview (separator); One has to add it to the superview otherwise it doesn't cover the accessory area. In updateConstraints I set up my constraints:

Draw custom separator line between UITableViewCell on iOS 7

纵饮孤独 提交于 2020-02-06 08:40:36
问题 Because I had some troubles using the default separator line between the UITableViewCell I want to use my own. Therefore I'm using auto layout. C# is the language I used. You can of course provide solutions in Objective-C. In the constructor of my custom cell I add my view UIView : separator = new DividerView (); ContentView.Superview.AddSubview (separator); One has to add it to the superview otherwise it doesn't cover the accessory area. In updateConstraints I set up my constraints:

How to show view controller on selecting row cell of tableView(as a collection view cell)?

杀马特。学长 韩版系。学妹 提交于 2020-02-06 07:54:00
问题 I have the Main View Controller which has a collection view with its collection view cells each initialized as a tableView to serve multiple rows inside of that collection view cell. If you're getting confused, below is the snapshot of the current state. The problem is when I try to tap a tableView row cell to open another view controller, It fails and a selected state of table view cell is shown. Here is the snapshot. //HomeCollectionViewCell.swift class HomeCollectionViewCell:

Dynamically set UIScrollView height and UITableView Height depending on content

为君一笑 提交于 2020-02-06 05:47:27
问题 Setup : I have a scrollview with a label, uiimage, and a tableview (grouped) nested within. The label, uiimage, and tableveiw are populated by a webservice. The last section in the grouped table view contains text that will never be the same and could be as long as 5 characters to 250+. Also, this view is pushed from a basic tableview (so it has a navigation bar. If that matters at all). Expected : The tableview should extend in height depending on the length of the content received from the

Dynamically set UIScrollView height and UITableView Height depending on content

情到浓时终转凉″ 提交于 2020-02-06 05:47:12
问题 Setup : I have a scrollview with a label, uiimage, and a tableview (grouped) nested within. The label, uiimage, and tableveiw are populated by a webservice. The last section in the grouped table view contains text that will never be the same and could be as long as 5 characters to 250+. Also, this view is pushed from a basic tableview (so it has a navigation bar. If that matters at all). Expected : The tableview should extend in height depending on the length of the content received from the

Can't determine section header from point in tableView

我是研究僧i 提交于 2020-02-05 05:20:09
问题 I have a UIButton receiving an action in each section header in a UITableView . When a tap occurs, I need to be able to get if it hit something that is not a cell so I set his code: UITouch *touch = [[event touchesForView:deleteButton] anyObject]; CGPoint location = [touch locationInView:self.tableView]; if (![self.tableView indexPathForRowAtPoint:location]) { //stuff } Everytime I tap a section header button, the function returns me the index path of the first row from the corresponding