uitableview

Table view inside of a collection view

徘徊边缘 提交于 2021-02-20 04:33:07
问题 I have a collection view, and each collection view cell will have a table view which will have different data for each collection view cell. The collection view is done using a storyboard and works fine, but I can not seem to get a UITableView to work inside of it. The Collection view code is below and any help is appreciated. Ideally a technique that allows me to use storyboard to customise the tableview cell, and I am using Swift 4. extension StoryboardViewController:

Loading Data Asynchronously into UITableView

心不动则不痛 提交于 2021-02-20 04:24:50
问题 I am using xCode 7 beta and swift, and storing my data using Parse.com. In which method in the UITableViewController should I be asking for data from my database? I need to ensure it is all present by the point in the lifecycle of the controller at which the cells need to be presented. Is there anyway to guarantee this if I am loading data asynchronously? 回答1: viewDidLoad would be a good place for this but there might be a few second difference between displaying a blank tableView and when it

Loading Data Asynchronously into UITableView

≯℡__Kan透↙ 提交于 2021-02-20 04:24:18
问题 I am using xCode 7 beta and swift, and storing my data using Parse.com. In which method in the UITableViewController should I be asking for data from my database? I need to ensure it is all present by the point in the lifecycle of the controller at which the cells need to be presented. Is there anyway to guarantee this if I am loading data asynchronously? 回答1: viewDidLoad would be a good place for this but there might be a few second difference between displaying a blank tableView and when it

UICollectionView inside an UITableViewCell

感情迁移 提交于 2021-02-19 07:04:00
问题 I've noticed iOS it's very mean when using UICollectionView inside an UITableViewCell . What I'm trying to achieve, it's to have a Collection of Images ( UICollectionView approach) inside a UITableViewCell . I'm trying to mimic Facebook post style, I think, they have an UITableView , with custom cells and so on, but here's the Problem... I've managed to put the UICollectionView inside an UITableViewCell , and It worked correctly and perfectly, no problem, everything showing fine, it's

How to modify a cell of UITableView from another ViewController

烈酒焚心 提交于 2021-02-19 04:19:23
问题 In VC#1, I have a UITableView. When I tap on a cell, I am brought to VC#2 where information about that cell is displayed. I want to be able to press a button in VC#2 which changes the title of the cell it corresponds with in VC#1, but I am confused on how to do this? Should I create a variable in VC#2 to save the indexPath for the cell that was tapped, and then call a function in VC#1 from VC#2 that uses that indexPath to update the cell? If I did this, wouldn't VC#1 need to be static so I

How to modify a cell of UITableView from another ViewController

和自甴很熟 提交于 2021-02-19 04:19:15
问题 In VC#1, I have a UITableView. When I tap on a cell, I am brought to VC#2 where information about that cell is displayed. I want to be able to press a button in VC#2 which changes the title of the cell it corresponds with in VC#1, but I am confused on how to do this? Should I create a variable in VC#2 to save the indexPath for the cell that was tapped, and then call a function in VC#1 from VC#2 that uses that indexPath to update the cell? If I did this, wouldn't VC#1 need to be static so I

didSelectRowAtIndexPath indexpath after filter UISearchController - Swift

只谈情不闲聊 提交于 2021-02-19 04:18:02
问题 I’m implementing a search bar with an UISearchController within a sectioned table. So far so good. The main issue is that when the the filtered results come along, it’s a whole new table with no sections and fewer rows. When selecting the row, I perform a segue to that position in the array, but the detailed view is expecting that exact row or index from the main array, which I can’t get from the filtered array of objects, which may be [0] [1] [2] in 300 elements. I guess I can compare the

didSelectRowAtIndexPath indexpath after filter UISearchController - Swift

会有一股神秘感。 提交于 2021-02-19 04:17:33
问题 I’m implementing a search bar with an UISearchController within a sectioned table. So far so good. The main issue is that when the the filtered results come along, it’s a whole new table with no sections and fewer rows. When selecting the row, I perform a segue to that position in the array, but the detailed view is expecting that exact row or index from the main array, which I can’t get from the filtered array of objects, which may be [0] [1] [2] in 300 elements. I guess I can compare the

How to add programmatic constraints to a UITableView?

我怕爱的太早我们不能终老 提交于 2021-02-19 03:38:24
问题 I have a class set up as follows: class SettingsController: UITableViewController { I would like to be able to add constraints to the UITableView so that there is equal spacing either side of the table (it is currently a full width table, so a little ugly on iPad). I have read that I can't add constraints to a UITableViewController , and instead I must add a UIViewController to my class, add a UITableView to that, and then I should be able to add the constraints to the TableView. I've amended

UIsearchController inside UIViewController using Auto Layout

ぐ巨炮叔叔 提交于 2021-02-18 14:15:34
问题 Has anyone been successful implementing a UIViewController that contais both a UISearchController searchBar and a UItableView while laying everything out using Auto Layout? I'm trying to achieve something similar to what 1Password does on the iPhone: a fixed searchBar on top of a tableView (not part of its tableHeaderView ). When the UISearchController that owns the searchBar gets activated, its searchBar animates to show the scope buttons and thus the tableView moves down a bit. I have got