grouped-table

Frame of viewForHeaderInSection is always the same size

半腔热情 提交于 2020-01-12 04:10:49
问题 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { if(section != 0) { UIView *view = [[[UIView alloc] initWithFrame:CGRectMake(10, 10, 100, 30)] autorelease]; view.backgroundColor = [UIColor redColor]; return view; } else { return tableView.tableHeaderView; } } This is my implementation of viewForHeaderInSection but whatever frame I make it's always showing me the same red frame. Do you see any problem with my code? Image: UPDATE: Mhm now my red block

Pushing View Controllers in UITableViewController Grouped

China☆狼群 提交于 2019-12-26 03:55:11
问题 So, i have 3 section like i said in my previous question, "A", "B", "C", for example. This is the code i'm using: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { switch (indexPath.row) { case 0: [self.navigationController pushViewController:[[[FirstViewController alloc] initWithNibName:nil bundle:nil] autorelease] animated:YES]; break; case 1: [self.navigationController pushViewController:[[[SecondViewController alloc] initWithNibName:nil bundle

Arrange a grouped_df by group variable not working

早过忘川 提交于 2019-12-17 17:57:08
问题 I have a data.frame that contains client names, years, and several revenue numbers from each year. df <- data.frame(client = rep(c("Client A","Client B", "Client C"),3), year = rep(c(2014,2013,2012), each=3), rev = rep(c(10,20,30),3) ) I want to end up with a data.frame that aggregates the revenue by client and year. I then want to sort the data.frame by year then by descending revenue. library(dplyr) df1 <- df %>% group_by(client, year) %>% summarise(tot = sum(rev)) %>% arrange(year, desc

Height of tableHeaderView seems to be 0

老子叫甜甜 提交于 2019-12-11 07:59:24
问题 I tried to override the second tableHeaderView. But it seems that the height of it in the method heightForHeaderInSection seems to be 0. Can't explain it, do I have to put it in a iVar because in the viewForHeaderInSection I can set the view without any problems. - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { if(section == 0) return @"Adding a new list"; else return @"Other lists"; } - (UIView *)tableView:(UITableView *)tableView

R: Compute a rolling sum on irregular time series grouped by id variables with time-based window

白昼怎懂夜的黑 提交于 2019-12-09 11:47:40
问题 I love R but some problems are just plain hard. The challenge is to find the first instance of a rolling sum that is less than 30 in an irregular time series having a time-based window greater than or equal to 6 hours. I have a sample of the series Row Person DateTime Value 1 A 2014-01-01 08:15:00 5 2 A 2014-01-01 09:15:00 5 3 A 2014-01-01 10:00:00 5 4 A 2014-01-01 11:15:00 5 5 A 2014-01-01 14:15:00 5 6 B 2014-01-01 08:15:00 25 7 B 2014-01-01 10:15:00 25 8 B 2014-01-01 19:15:00 2 9 C 2014-01

Frame of viewForHeaderInSection is always the same size

青春壹個敷衍的年華 提交于 2019-12-03 04:58:31
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { if(section != 0) { UIView *view = [[[UIView alloc] initWithFrame:CGRectMake(10, 10, 100, 30)] autorelease]; view.backgroundColor = [UIColor redColor]; return view; } else { return tableView.tableHeaderView; } } This is my implementation of viewForHeaderInSection but whatever frame I make it's always showing me the same red frame. Do you see any problem with my code? Image: UPDATE: Mhm now my red block is higher but my first tableHeader is now somehow hidden. The first one was implemented with the

iPhone : form like new contact

微笑、不失礼 提交于 2019-11-29 23:57:16
I have some questions about the Apple iPhone Contact App. I want to use the same methode to create and modify information. Here's two pics : alt text http://grab.by/4ZjQ alt text http://grab.by/4ZjR So we have the creation and the edition. The form looks like an UITableView with a groupedStyle but I don't know how to re-creat all of this. Have you got an idea or a tutorial that might explain how to do it ? Thanks a lot ! the top bit is a UIView with a UIImageView and a UITableView, this view is set as the header of the overall UITableView. As for the editing, you need to swap out the UILabel,

iPhone : form like new contact

徘徊边缘 提交于 2019-11-28 20:35:44
问题 I have some questions about the Apple iPhone Contact App. I want to use the same methode to create and modify information. Here's two pics : alt text http://grab.by/4ZjQ alt text http://grab.by/4ZjR So we have the creation and the edition. The form looks like an UITableView with a groupedStyle but I don't know how to re-creat all of this. Have you got an idea or a tutorial that might explain how to do it ? Thanks a lot ! 回答1: the top bit is a UIView with a UIImageView and a UITableView, this

Arrange a grouped_df by group variable not working

房东的猫 提交于 2019-11-28 05:47:27
I have a data.frame that contains client names, years, and several revenue numbers from each year. df <- data.frame(client = rep(c("Client A","Client B", "Client C"),3), year = rep(c(2014,2013,2012), each=3), rev = rep(c(10,20,30),3) ) I want to end up with a data.frame that aggregates the revenue by client and year. I then want to sort the data.frame by year then by descending revenue. library(dplyr) df1 <- df %>% group_by(client, year) %>% summarise(tot = sum(rev)) %>% arrange(year, desc(tot)) However, when using the code above the arrange() function doesn't change the order of the grouped