Class

HSWidgetGridPositionConverterCache

An object that coverts between various widget structures and grid positions.


Declaration


@interface HSWidgetGridPositionConverterCache : NSObject

Overview

HSWidgetGridPositionConverterCache provides a set of convenient methods to convert between various widget structures and grid structures. When convertions are performed, the results are stored in a cache to improve performance. However, this cache is very small in order to not take a big chunk of memory while also providing some speed benefits for subsequent calls.

Even though the name suggests its a converter cache, it provides a lot more convenience methods than that. For instance, originForWidgetOfSize:inGridPositions: can be used to find the origin position where the given size could be added. And one of the canFitWidgetofSize:inGridPositions: or canFitWidget:inGridPositions: can be used for checking placement within grid positions.

Topics


Getting Grid Positions


Getting Origin


Checking Placement

Related Links


Positions


Structures

  • HSWidgetFrame

    A structure that contains location and dimensions of widget in grid positions.

  • HSWidgetSize

    A structure that contains dimensions in grid positions.