小编Pav*_*vel的帖子

TableView titleForHeaderInSection

我的应用程序在4.3.1模拟器和5.0模拟器中显示了这一点.

4.3.1模拟器5.0模拟器

这是代码:

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
   return @""; 
}
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    return [[Singleton sharedInstance] getTitleSectionView:segmentedControl.selectedSegmentIndex inDay:section];
}
-(UIView *)getTitleSectionView:(int)week inDay:(int)day;
{
UILabel *lab=[[[UILabel alloc]init]autorelease];
lab.frame=CGRectMake(5, 0,320,20);
lab.text=[[Singleton sharedInstance] getTitleSection:week inDay:day];
lab.backgroundColor=[UIColor clearColor];
lab.textColor=[UIColor whiteColor];
lab.font = [UIFont fontWithName:@"Arial" size:14];

UIImageView * imv = [[[UIImageView alloc]initWithFrame:CGRectMake(0,0, 320, 20)]autorelease];
imv.image=[UIImage imageNamed:@"section-header-bg.png"];

UIView *view = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 20)]autorelease];
[view addSubview:imv];
[view addSubview:lab];

    Week *currentWeek = nil;
    if(week)    
        currentWeek = nechetNedel;
    else        
        currentWeek = chetNedel; …
Run Code Online (Sandbox Code Playgroud)

iphone objective-c ios

1
推荐指数
1
解决办法
5473
查看次数

NSMutableArray排序

在此输入图像描述

我在单元格中有5个NSMutableArrays.我需要按一个值对单元格进行排序.示例我需要按时间对单元格进行排序.

[MyArray1 sortUsingSelector:@selector(compare:)];
Run Code Online (Sandbox Code Playgroud)

但我将如何与其他4个NSMutableArray在单元格?

sorting objective-c uitableview nsmutablearray ios

-2
推荐指数
1
解决办法
1141
查看次数

标签 统计

ios ×2

objective-c ×2

iphone ×1

nsmutablearray ×1

sorting ×1

uitableview ×1