uitableview

I'm trying to sort my files by date, how can I get the result into a table view?

半城伤御伤魂 提交于 2020-01-17 15:02:15
问题 I have a tableview that's is been filled with .csv files from document directory. So far I'm able to get the date and sort them but not sure how to get the result in to an array and then into the tableview . EDIT: i'm able to get it into an array but now when i try to get the files in the table view i got this error: Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSURL length]: unrecognized selector sent to instance 0x1c00ba040' Code: --data NSMutableArray

Access results from google places api ios for auto completion

南笙酒味 提交于 2020-01-17 13:46:03
问题 I am using this method to get suggestions and i need to show them in tableview: - (void)placeAutocomplete:(NSString *)autoCompleteString { [self.autoCompleteSuggestionsList removeAllObjects]; GMSAutocompleteFilter *filter = [[GMSAutocompleteFilter alloc] init]; filter.type = kGMSPlacesAutocompleteTypeFilterCity; [_placesClient autocompleteQuery:(NSString *)autoCompleteString bounds:nil filter:filter callback:^(NSArray *results, NSError *error) { if (error != nil) { NSLog(@"Autocomplete error

Access results from google places api ios for auto completion

廉价感情. 提交于 2020-01-17 13:44:24
问题 I am using this method to get suggestions and i need to show them in tableview: - (void)placeAutocomplete:(NSString *)autoCompleteString { [self.autoCompleteSuggestionsList removeAllObjects]; GMSAutocompleteFilter *filter = [[GMSAutocompleteFilter alloc] init]; filter.type = kGMSPlacesAutocompleteTypeFilterCity; [_placesClient autocompleteQuery:(NSString *)autoCompleteString bounds:nil filter:filter callback:^(NSArray *results, NSError *error) { if (error != nil) { NSLog(@"Autocomplete error

Swift JSON tableview

放肆的年华 提交于 2020-01-17 12:37:06
问题 I'm really struggling to parse this JSON (https://www.kimonolabs.com/api/7flcy3qm?apikey=gNq3hB1j0NtBdAvXJLEFx8JaqtDG8y6Y) and populate a tableview with the " Date " text, " Event " text, " Hasta " text and " Location " text. I realize this is probably easy for a non-newb. Here's my probably terrible code: import UIKit import Foundation class MasterTableViewController: UITableViewController { var vigoData = [String]() override func viewDidLoad() { super.viewDidLoad() splitViewController!

Tableview javaFX - The type of getColumns() is eroneous

给你一囗甜甜゛ 提交于 2020-01-17 12:24:49
问题 I have a problem with a getColumns error I simply can't figure out myself. I have searched the internet with no luck. I hope some of you have a great answer for this! Because I am stuck... I have created a Create Member scene where I want to store the information in a TableView after it has been created. I have made a class called Person which makes the getters and setters. In my TableView class I have made a TableView ArrayList which should hold the objects, but with NO luck! The code is

Can't set properties in Custom UITableViewCell

心不动则不痛 提交于 2020-01-17 08:33:09
问题 I made a custom table view cell - i have a header, implementation, and nib. In the nib I set the style to custom, dragged a label on it and made an outlet in the nibs file owner. From my UITableView Controller I have this code: static NSString *CellIdentifier = @"adbActivityCell"; adbActivityCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (!cell) { NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:CellIdentifier owner:self options:nil]; cell =

Search for sub child in firebase database

≡放荡痞女 提交于 2020-01-17 08:19:09
问题 Firebase Structure Hi, I am try to work out how to query jobBrand & jobName in my Firebase Database (Structure Attached) and store it in a tableView. I am going to store more information under each Job Brand so I would like to keep the structure this way if possible? So far, I can get tableView to read the 2 fields if they are one level up, so the structure would be: tbaShootApp -> Jobs -> Job Brand > data. I cannot work out to query down another level and store it in the tableView. Is this

number of rows in section

隐身守侯 提交于 2020-01-17 07:10:23
问题 I have a table view which populates from a plist. in a plist I have a Categories array: Catgeories - Array item 0 - Maths item 1 - English .... in the same plist i have a Notes array Notes - Array item 0 - Dictionary Title - My maths note 1 Text - This is algebra Category - Maths item 1 - Dictionary Title - My English Text - This is algebra Category - English in number of sections i have... - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections.

Want accessory checkmark to show only when tapped on the right

好久不见. 提交于 2020-01-17 07:01:33
问题 I have a TableView with cells that when pressed anywhere in the cell, it adds a checkmark on the right. I only want the checkmark to show up if the cell is tapped on the right side. Here's the pertinent section of code from the TableViewController: override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdentifier: "TaskCell", for: indexPath) as! TaskCell let task = tasks[indexPath.row] cell.task =

UITableViewCell reusability issue. Modifying one cell is affecting others

一笑奈何 提交于 2020-01-17 06:38:10
问题 Whenever a cell from section 3 is selected. I'm updating the DataSource array, and the cell's background color is thus changing correctly. However, whenever I scroll back up I start seeing random cells with the modified background color, knowing that I don't even mention it in my cellForRowAtIndexPath method and each section in my tableView is populated from a separate DataSource Array/Dictionary ! (I'm using a Storyboard to handle all UI setup) Here's my code (focus on Section 3) -