uitableview

insertRowsAtIndexPaths: of custom UITableViewCells ends in unrecognized selector sent to instance

半腔热情 提交于 2020-01-17 02:21:34
问题 I want to insert some custom cells in my UITableView . So what I'm doing is simply this: NSMutableArray *arrayOfCells = [[NSMutableArray alloc] init]; for(int i = 0 ; i < 4 ; i++) { CustomCell *cell = [[CustomCell alloc] init:myText]; [arrayOfCells addObject:cell]; } [table insertRowsAtIndexPaths:arrayOfCells withRowAnimation:UITableViewRowAnimationTop]; But the inserting line returns this error: * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CustomCell

crash while scrolling through the TableView which haves a Collectionview in it

隐身守侯 提交于 2020-01-17 01:22:07
问题 i was having this issue (UICollectionView inside of UITableViewCell - AutoLayout) and after trying several solution which are available in the internet i came with this @Pablo Romeu's answer i tried his solution , now i got a TableView with collectionView cells in it (which can dynamically change its size according to content in it) but when am scrolling through my tableview its getting crashed with this error : 2016-06-13 22:05:51.546 WishMeluck[3507:425240] the behavior of the

Filter NSMutableDictionary data in UITableView

痴心易碎 提交于 2020-01-16 20:27:06
问题 I need to filter data in UITableview by text entered in UISearchbar . I followed this example but there data in NSMutableArray and I can't alter it under my requirements. My data is NSMutableDictionary . I'm stuck on this for long time. My data: NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSString *path = [[documentPaths lastObject] stringByAppendingPathComponent:@"data.plist"]; NSDictionary *dict = [NSDictionary

Cannot Feed UITableView with .plist

房东的猫 提交于 2020-01-16 19:21:06
问题 I am a beginner and have a probably quite simple question. I browsed through similar topics and lost a day without finding a solution. I have a Master and Detail view controllers. I created a .plist as shown below. Now I would like feed UITableView with these data. And here the problem is. I can't take continents names. All the time I see blank cells or I get some errors. Maybe I should change something in the plist? Here is my code: MasterViewController.h: @interface MasterViewController :

sort my TableViewcell with distance comes from response in swift3

荒凉一梦 提交于 2020-01-16 18:34:28
问题 im working on map and tableview. i have 4 locations and i have distance between each other, now i want that when i click on any cell then that cell should comes on 1st position and after with sort all other location will be place. func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { let indexPath = tableView.indexPathForSelectedRow let currentCell = tableView.cellForRow(at: indexPath!)! print(currentCell.textLabel!.text as Any) print(indexPath?.row as Any) print

Empty (white) line under UITableView after close MPMoviewPlayer from fullscreen mode

有些话、适合烂在心里 提交于 2020-01-16 18:26:40
问题 I have simple application with list of movies in UITableView. When I select some row, I open modal view controller what present MPMoviePlayerController. [self.navigationController presentModalViewController:playerController animated:YES]; Also I set observer to catch message when player is finish playing. When playing is finished, I make [self dismisModalViewControllerAnimated:YES]; If I click "Done" in player control, all work great. But if it's finish playing self in fullscreen mode I get

Empty (white) line under UITableView after close MPMoviewPlayer from fullscreen mode

主宰稳场 提交于 2020-01-16 18:26:10
问题 I have simple application with list of movies in UITableView. When I select some row, I open modal view controller what present MPMoviePlayerController. [self.navigationController presentModalViewController:playerController animated:YES]; Also I set observer to catch message when player is finish playing. When playing is finished, I make [self dismisModalViewControllerAnimated:YES]; If I click "Done" in player control, all work great. But if it's finish playing self in fullscreen mode I get

Multiple selection in UITableView. And the tables are dynamically generated

感情迁移 提交于 2020-01-16 17:22:05
问题 I have multiple uitableviews. I created the multiple tables by using a loop. The number of tables depend on the result of the webservice. And each table have multiple selections. I have to pass all the values selected from every table to next webservice. How can I do this task ? Thank You, 回答1: 1-> you can use check Boxes for in your UITableView for mutli section (Check box can be implemented by UIButton ). one check box per row. 2-> Use a flag ( BOOL isSelected ),set it true when user select

Multiple selection in UITableView. And the tables are dynamically generated

故事扮演 提交于 2020-01-16 17:21:41
问题 I have multiple uitableviews. I created the multiple tables by using a loop. The number of tables depend on the result of the webservice. And each table have multiple selections. I have to pass all the values selected from every table to next webservice. How can I do this task ? Thank You, 回答1: 1-> you can use check Boxes for in your UITableView for mutli section (Check box can be implemented by UIButton ). one check box per row. 2-> Use a flag ( BOOL isSelected ),set it true when user select

Multiple selection in UITableView. And the tables are dynamically generated

吃可爱长大的小学妹 提交于 2020-01-16 17:21:04
问题 I have multiple uitableviews. I created the multiple tables by using a loop. The number of tables depend on the result of the webservice. And each table have multiple selections. I have to pass all the values selected from every table to next webservice. How can I do this task ? Thank You, 回答1: 1-> you can use check Boxes for in your UITableView for mutli section (Check box can be implemented by UIButton ). one check box per row. 2-> Use a flag ( BOOL isSelected ),set it true when user select