Enabling and Configuring Row Separators
Send Feedback

Glossary Item Box

Topic Overview

Purpose

This topic provides information about creating IGGridView™ row separators.

Required background

The following table lists the topics required as a prerequisite to understanding this topic.

Topic

Purpose

Adding the IG Framework File

This topic explains the requirements for adding the grid framework file to an Xcode project; a requirement for using the IGGridView control.


In this topic

This topic contains the following sections:


Creating Row Separators – Code Example

Description

In a basic IGGridView instance, the grid renders a 2 point black line separator after each row. In the event, that a line separator is insufficient for your needs the separator area between rows is completely customizable. The table below details the properties and methods used to customize the separator.

Name

Description

Type

rowSeparatorColor

Changes the color of the row separator line by assigning a UIColor.

Property

rowSeparatorHeight

Changes the height of the row separator by assigning an integer or float value.

Property

rowSeparatorHeight

Removes the row separator by setting the property to 0 (zero).

Property

viewForRowSeparatorAtPath

Displays a custom separator.

Method


Note: When working with classes using the viewForRowSeparatorAtPath delete method you must use the IGGridViewDelegate to create row separators.

Code

The code below uses the IGGridViewDelegate’s viewForRowSeparatorAtPath delegate method to return a custom row separator UIView. This custom row separator uses an image of a shelf, creating the illusion of the grid row sitting on a shelf.

In Objective-C:

-(UIView *)gridView:(IGGridView *)gridView viewForRowSeparatorAtPath:(IGRowPath *)path
{
    UIImageView* iv = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"Shelf.png"]];
    iv.contentMode = UIViewContentModeScaleAspectFit;
    return iv;
}

In C#:

public override UIView ResolveRowSeparatorView (IGGridView gridView, IGRowPath path)
{
   UIImageView iv = new UIImageView(new UIImage("Shelf.png"));
   iv.ContentMode = UIViewContentMode.ScaleAspectFit;
   return iv;

}


Related Content

Topics

The following topics provide additional information related to this topic.

Topic

Purpose

This topic provides basic information about creating an instance of the IGGridView and displaying data to help you with getting up and running with using the control.

This section serves as an introduction to the IGGridView’s key features and functionalities.