tableview

TabBarController switch views in TabBarItem

二次信任 提交于 2019-12-13 03:24:25
问题 I have a app based off the default xcode "Tab Bar Application" template. It has 3 tabBar Items that each load their own xib FirstView.xib, SecondView.xib, and ThirdView.xib. What i would like is a UIButton on the FirstView.xib that loads the FirstAltView.xib where the FirstView.xib is. Can someone please post some sample code on how to do this or a complete xCode project because i cannot figure out how to link the view controllers together. Here is a flow chart of how the flow of my app

how to sort 2 attributes called from coredata in a tableview cell (swfit4)

天涯浪子 提交于 2019-12-13 03:08:54
问题 The code below prints 2 core data attributes in a single tableview cell. I would like each cell to be sorted in a this way. attr 1 a - z attr 2 z -a. Meaning that if the sets are (b,b),(b,a),(a,a). It would print (a,a),(b,a),(bb). func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let title = itemsName[indexPath.row] let cell = tazbleView.dequeueReusableCell(withIdentifier: "cell", for : indexPath) let attr1 = title.value(forKey: "lorde") as?

JavaFX: Force individual column width in TableView

筅森魡賤 提交于 2019-12-13 03:04:07
问题 How can an individual column width be forced in a TableView? Let's say I have a button to reset the width of all my columns to a pre-defined value. My TableView is configured to have UNCONSTRAINED_RESIZE_POLICY . Right now, if I resize two columns manually and then hit the reset button, nothing happens. I'm using setPrefWidth() to set the preferred column width. I even checked the value before and after, it changes as desired. The visual representation, however, stays the same. Is there any

Swift 2 tableview scrolling changes data

梦想与她 提交于 2019-12-13 02:26:50
问题 I am having trouble getting the data to load correctly! The top cells load well then when I scroll down and back up the once dark icons that had to phone number are lit and when they are touched they call a random number. This is odd, as the other cells with a phone number do not change only the ones that are left equalling "". This is from the ViewController.swift func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return contactList.count } func tableView

Qt tablView with model containg pointer to custom class

倾然丶 夕夏残阳落幕 提交于 2019-12-13 02:18:58
问题 I created my custom class (CustomObject), that inherit from QGraphicsItem. I use those object to draw on scene (rectangles, polygons and stuff) and I store pointers to them in QList. Now I need to display all my CustomOBjects in tableView, but there are 2 conditions: When I select and interact with object in tableview - I must be able to interact with "real" CustomObject represented by it (example: I selected obj1 in tableview and click button "delete" or "edit" - and I want to be able to

UITableView datasource functions not called (swift)

余生长醉 提交于 2019-12-13 01:51:20
问题 So I had this working a hot second ago, but for some reason it's stopped working and the tableview just appears blank. I set the Detail View Controller as a UITableViewDataSource and UITableViewDelegate and did tableview.datasource = self as well as for the delegate but the methods are just not called. It's builds and runs and everything though. It stopped working when I changed the style to grouped, I'm not sure if that has anything to do with it although I can't see a problem in the code.

How do I remove empty cells in table view? iOS Swift

守給你的承諾、 提交于 2019-12-13 01:44:52
问题 My table view currently looks like this: Note: I have blurred out actually names. I import a json file and retrive names from it. The names appear on the table view. In my ViewController I return an empty cell if the location field is nil in the json file. How do I remove the empty cells? I have tried tableView.tableFooterView = UIView() But that does not work Here is my ViewController class: import UIKit class ViewController: UITableViewController, UITableViewDataSource, UITableViewDelegate,

JavaFx: Get the new and old values from TableView

♀尐吖头ヾ 提交于 2019-12-13 01:23:18
问题 I have the data in a TreeMap and I use ObservableList to render the map data. I need to edit the String value direct on my TableView. The problem is, how can I change the real data on TreeMap, i.e. how can I get the old and new str values from data list to put it in map key. private Map<String, Long> map = new TreeMap<>(); private ObservableList<TableBean> data = FXCollections.observableArrayList(); .... articles.setCellFactory(TextFieldTableCell.forTableColumn()); articles.setOnEditCommit( t

Default CellAccessory

天涯浪子 提交于 2019-12-13 01:16:30
问题 How can I set first row of tableview checkmarked when the app started? I mean when I start app now, there are few rows in tableview and when I click on some of them its accessory change to checkmark. When click another one, the another one comes checkmarked and previous checkmark dissapears. So now I want first row of tableview to be checkmarked when app is started and then when I click another row it 'uncheckmark' and 'checkmark' new row etc... 回答1: Try the options suggested in these posts

Update the data of a TableViewController after add item

人走茶凉 提交于 2019-12-13 00:48:31
问题 I have tableView (A) responsible for listing items CoreData and viewController (B) to add new item. To create a ViewController (B) custom, they chose to use the following Present Modally to use presentation Over Current Context to enable transparent background and be able to apply the blur. From tableView (A) press the button to add a new item, the viewController (B) appears. Add a new item and saved in CoreData The viewController (B) execute self.dismissViewControllerAnimated(true,