uitableview

Changing only the body colour of UITableView or changing only the status bar colour

不羁岁月 提交于 2020-01-06 23:50:33
问题 I wanted to get a specific colour to the iOS status bar ,I understand it will take the colour of the top view controllers view . And hence I can get this by applying the colour I want for the status bar to the table view ,which would look like this But when it doesn't have any rows then whole table view gets that color (Obvious! but thats not what i want) Is there any way to give colour only to the top part of the tableview so that status bar gets that colour or can i change the status bar

Reorder dynamic UITableView by NSDate

我只是一个虾纸丫 提交于 2020-01-06 23:50:23
问题 In my app I have a UITableView which will be fill with core date items. As you can see in this post, I have already asked for a sorting function: https://stackoverflow.com/a/36703648/6012187 func ReSort() { CoreDataItems.sortInPlace({sortAscending ? $0.RowName < $1.RowName : $0.RowName > $1.RowName}) sortAscending = !sortAscending tableView.reloadData() } Now my question is, how can I set dynamically the RowName Value? for example. I save the the RowName in the user defaults. but $0.defaults

TableView Height can not resize in IOS

蓝咒 提交于 2020-01-06 23:44:52
问题 I am trying to do something like this, i have a UIViewControler . So in my story board i drag and drop a UITableView to the view. I'm supposed to show few customized rows in that table view. but i want to dynamically change the height of that table view.(According to the row count inside the table view). i tried like below code, but nothing worked so far. CGRect tvframe = [tableView frame]; [tableView setFrame:CGRectMake(tvframe.origin.x, tvframe.origin.y, tvframe.size.width, tvframe.size

Passing Data Between Controllers in Swift

时光总嘲笑我的痴心妄想 提交于 2020-01-06 22:43:04
问题 I want to passing data between TableViewController and ViewController the program does not go into the method My swift code: override func unwind(for unwindSegue: UIStoryboardSegue, towardsViewController subsequentVC: UIViewController) { let destView : ViewController = unwindSegue.destination as! ViewController destView.min = Int(minTable) destView.tableText = unitsText } I take data: override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let tableCell =

Passing Data Between Controllers in Swift

落爺英雄遲暮 提交于 2020-01-06 22:42:00
问题 I want to passing data between TableViewController and ViewController the program does not go into the method My swift code: override func unwind(for unwindSegue: UIStoryboardSegue, towardsViewController subsequentVC: UIViewController) { let destView : ViewController = unwindSegue.destination as! ViewController destView.min = Int(minTable) destView.tableText = unitsText } I take data: override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let tableCell =

Change second table content based on first table row selected in swift

老子叫甜甜 提交于 2020-01-06 21:12:26
问题 I have a view with two tables (propertyTypeList & propertyDetailList) and a text view (propertyDetailView) What I'm trying to do is have propertyDetailList populate with an array based upon the selection made in propertyTypeList, then have propertyDetailView populate based upon the selection in propertyDetailList. I can view the currently selected row using my bottom function and indexPath.row, but I can't get that call to work in the function above. here is my code: class NewProjectView:

Swift Converting PFQuery to String Array for TableView

南笙酒味 提交于 2020-01-06 21:09:30
问题 I am trying to query all of the Parse users in my database and then display each individual user in their own cell in a tableview. I have set up my tableview, but I'm stuck on saving the user query to a string array that can be used within the tableview. I have created a loadParseData function that finds the objects in the background and then appends the objects queried to a string array. Unfortunately I am given an error message on the line where I append the data. Implicit user of 'self' in

UITableView Expandable + Dynamic cell height (According to the UITextView inside UITableViewCell)

旧城冷巷雨未停 提交于 2020-01-06 21:06:34
问题 I am working on a project where I have to implement same as news application. I mean initially all cells will contain News Title and when user clicks on any title then the content will display by expanding the cell. Please suggest some tutorials for this. I am using following code for expansion of cell. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { BOOL isChild = currentExpandedIndex > -1 && indexPath.row > currentExpandedIndex && indexPath.row

How to make uitableview indexes and sections from Array of stings [closed]

♀尐吖头ヾ 提交于 2020-01-06 21:01:19
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I have an array of names I want to make section headers as alphabets such as A B C. Also the indexes. What's the most efficient way of making Sections out of an array of names 回答1: Here are i developed method that process on NSArray and created NSDictionary that you aspected. -

Change UITableViewCell height touch up inside

六眼飞鱼酱① 提交于 2020-01-06 20:35:41
问题 As the title says, I'd like to make my cells dynamically change height. I try to be as clear that I can. When I touch up inside a cell (prototype cell), the cell change height (from 44 to 88);in the cell there is an UIImage (88px height) partially hidden and where the cell is hidden there is view, touching up starts a segue to a second tableView; when I touch up inside an other cell the previous cell return to 44px height an this other cell change height as the previous one. Follow a scheme