tableview

iOS 7 Custom TableView Is Under TabBar

谁说胖子不能爱 提交于 2019-12-17 21:55:25
问题 Im trying port my app to iOS7 , but my custom TableViewController is showing the last row (cell) under the TabBar :( Im searching a lot for it, but i dont find any solution. Can anyone help me? My Custom Table View class The error is shown in the blow screenshot (only is showing a part of last product because im draging to up to show the hidden product under the tabbar): Thanks. 回答1: I found the answer to your question on another post, answered by dariaa, here: Tab Bar covers TableView cells

UITableView: hide header from empty section

落爺英雄遲暮 提交于 2019-12-17 21:43:11
问题 i have a UITableView, that displays expenses from a current month (see screenshot): My problem is with the header for empty sections. is there any way to hide them? The data is loaded from coredata. this is the code that generates the header title: TitleForHeader -(NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ if ([tableView.dataSource tableView:tableView numberOfRowsInSection:section] == 0) { return nil; } else { NSDate *today = [NSDate date ]; int

Keep getting nil from dequeueReusableCellWithIdentifier?

左心房为你撑大大i 提交于 2019-12-17 20:22:12
问题 I've created a prototype cell with identifier "mainViewTableCell" in storyboard file and connected the main table view with a custom controller class named "NTTableViewController". I've implemented function "tableView cellForRowAtIndexPath" in NTTableViewController.m as follows: - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString* MAINVIEW_CELLIDENTIFIER = @"mainViewTableCell"; UITableViewCell *newCell = [tableView

Xcode Imageview Aspect Fit Remove Extra Space

元气小坏坏 提交于 2019-12-17 20:19:30
问题 I have an imageview inside a UITableViewCell. Imageview with Aspect Fit creates a lot of extra space in the top and bottom if the image is large. The extra space (gray background color) is shown in the picture below. How do I remove the extra space? A few notes: This particular image is 890 x 589 and the screenshot was taken on a iphone 6S simulator. I am using UITableViewAutomaticDimension for automatic table cell height. There is no height constraint on the imageview so it can resize

Binding hashmap with tableview (JavaFX)

浪尽此生 提交于 2019-12-17 19:46:37
问题 I want to display HashMap contents in a JavaFX Tableview . Please find below the code I used to set the HashMap contents into the table columns. The problem I'm having is that it's displaying only one row. The for loop is iterating only 5 times: each time it is picking up the first value of the HashMap . If I ignore the return SimpleObjectProperty line, the for loop is iterating over all the content in the HashMap . final ObservableList<Map> data = FXCollections.observableArrayList(); data

auto numbered table rows (javafx)

爷,独闯天下 提交于 2019-12-17 19:23:24
问题 My question is how to make a new Table in JavaFX with in the first column the index of the tableRow. So i've created a class: NrCellFactory. public class NrCellFactory<S, String> extends TableCellFactory<S,String> { private class NrCell<S,String> extends TableCell<S,String>{ public NrCell(){ setText(this.getTableRow().getIndex()+""); } } @Override protected TableCell<S, String> createTableCell(TableColumn<S, String> column) { return new NrCell(); } } and then i set my column where the numbers

TableView rounded corners and shadow

别等时光非礼了梦想. 提交于 2019-12-17 18:22:18
问题 I have a tableview with three rows. I am trying to make the table rows have rounded corners and also a shadow effect around the entire tableview. For some reason, I cannot make the tableview both have the rounded corners and shadow effect but I could do them separately if I comment out the code responsible for one of the features. Here is the code I am using: //this is for shadow effect tableView.backgroundColor = UIColor.clearColor() tableView.layer.shadowColor = UIColor.darkGrayColor()

How to change height of grouped UITableView header?

回眸只為那壹抹淺笑 提交于 2019-12-17 17:24:27
问题 I know how to change the height of the section headers in the table view. But I am unable to find any solution to change the default spacing before the first section. Right now I have this code: - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ if (section == 0){ return 0; } return 10; } 回答1: Return CGFLOAT_MIN instead of 0 for your desired section height. Returning 0 causes UITableView to use a default value. This is undocumented behavior. If you

JavaFX, how to freeze the position of some columns in TableView

£可爱£侵袭症+ 提交于 2019-12-17 16:07:23
问题 The idea is: on a TableView of N columns to have the first M columns always visible even when you use the horizontal scroller. The only thing near my requirement is this Binding two tableviews together such that they scroll in sync. The idea to put side by side two tables is not the best by my point of view because 1) The sort of the column is partially indipendent between the two tables: if you use the same observableList the rows are sorted in both tables but it is not possible the sort on

The table cells are empty in my tableview. JavaFX + Scenebuilder

放肆的年华 提交于 2019-12-17 14:22:27
问题 I am trying to get the table cells to show the string when i create new rows. But all the rows are just empty. Do anyone know what i am doing wrong? Here is the main class: package application; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Cursor; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage; public class Main extends Application { @Override public void start(Stage primaryStage) throws Exception{ Parent root =