Strange Dots in the transparent grid header


#1

Hi,

Please check this image :

strange dots

I’m using shinobi grid with custom cell for header

//SDCustomHeaderCell.h
@interface SDCustomHeaderCell : SGridCell ................................

//SDCustomHeaderCell.m

- (id)initWithReuseIdentifier:(NSString *)identifier{
    if (self = [super initWithReuseIdentifier:identifier]) {
        label = [[UILabel alloc] init];
        label.backgroundColor = [UIColor clearColor];
        label.textAlignment = NSTextAlignmentCenter;
        label.numberOfLines = 3;
        label.adjustsLetterSpacingToFitWidth = NO;
        label.adjustsFontSizeToFitWidth = YES;
        label.textColor = [UIColor whiteColor];
        [self addSubview:label];
        self.backgroundColor = [UIColor colorWithRed:10.0/255.0 green:60.0/255.0 blue:85.0/255.0 alpha:0.5];
        
        //UIImageView *iv = [[UIImageView alloc] initWithFrame:cell.frame];
        //[iv setImage:[UIImage imageNamed:@"gradient.png"]];
        //[cell addSubview:iv];
    }
    return self;
}

Please note that the cell background color has alpha = 0.5 which cause the problem … if I put alpha  = 1.0 it solves the problem … but I need this alpha to be less than 1.0

Please advice … thanks…


#2

Hi Ssaeed,

Unfortunately this is a known issue with our grids. Our developers are working on it and hope to have it fixed soon. In the meantime, you can use this code to hide the header text.

-(NSString *)shinobiGrid:(ShinobiGrid *)grid titleForHeaderInSection:(int)section {
    return @"";
}

Regards,
Chris


#3

Hi Chris,

I did it and it works for me…

Thank you  :laughing: