Question

I am developing an app in which I need " a separator line " after each row of UICollectionViewCell...(like in UITableView after each row).

Anyone having idea how to get this?

Was it helpful?

Solution

Create a UIView with a black background that is 1 pixel high and 320 pixels wide?

For Example

For Horizontal Line

UIView *horizontalLine = [[UIView alloc]initWithFrame:CGRectMake(x cordinate,y cordinate,1,linelenth)];
horizontalLine.backgroundColor = [UIColor blackColor];
[self.view addSubview:horizontalLine];
[horizontalLine release];

For Vertical Line

UIView *verticalLine = [[UIView alloc]initWithFrame:CGRectMake(x cordinate,y cordinate,linelenth,1)];
verticalLine.backgroundColor = [UIColor blackColor];
[self.view addSubview:verticalLine];
[verticalLine release];
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top