Welcome, Guest Login

Support Center

Pattern Block

Last Updated: Jun 13, 2017 03:23PM EDT

Pattern

Version: 4.00

Lays out blocks according to a repeating pattern against a data source.

Click Here to View How-To Video

Usage

Drag this block into your app and then you can edit it's settings by right clicking on the block with your mouse.

Version: 4.0

The Pattern Layout is a very powerful Layout which will iterate upon a data source. Step one is to create the Blocks that will make up the pattern and thus will be repeated in the layout. Once these Blocks have been created and laid out, you can create a pattern with these Block using the Pattern Layout. Just select the Blocks, then right click on the selected block(s) and choose 'Create Pattern' and a Pattern Block will automatically be created and added to My Blocks which you can then add to any view. Please note that every item in the pattern will use a different record in the data source. If you want multiple items to use the same record, you must first select all of the different items and right-click on the selection and choose Make Group. Each Group is considered one item in the pattern and thus each item uses the same record.

Examples

Example 1: If you were trying to make a traditional repeating list with a background image behind each row, a thumbnail picture on the left and a title text on the right. You would need to create all three items and position them as your design dictates. If the background image isn't already behind the other two items, just right click on it and choose the "Send to Back" option. Then select all the items and right-click again and choose Group. Since all of these items use the same record from the data source they need to be grouped otherwise each item will use a different record from the data source.

Example 2: If you needed one ad to appear every five news items in a List, you could make one row that makes up one news item. Right-click on the items and choose Group -- and provide a name. This will make the grouped item show up in My Blocks. Drag out 4 more copies of the named group into the view. Position the 5 grouped row items along with the Ad as you want them, then right-click on the 6 items and choose Generate Pattern -- and provide a name. This will make the grouped item show up in My Blocks. Drag the newly created Pattern from out of My Blocks and into your view. We need to edit the Pattern block however because each item in the pattern will use a record out of the Data Source. Since the ad currently is an item in the pattern that would mean that every 6th article would go missing from the list since that record's content would be applied to the Ad block. To fix this problem, right-click on the pattern and choose Edit on the named block that you specified as the pattern -- it should be at the top of the tree of blocks. On the Specific tab scroll down the Blocks section and on the 6th block check the box that says, Ignores Data Source.

Parameters

Data Source The data source the blocks are created against.
Data Source Start Record The first record to use for the first pattern.
Layout Direction (iOS ONLY)Determines how the blocks are laid out.
Layout Overlap (iOS ONLY)If specified the amount of pixels each iteration of the layout should overlap.
Show Scroll Indicator If checked, the scrolling indicator will appear when the user scrolls.
White Scroll Indicator If checked, the scrolling indicator will be white instead of the default black color.
Reload Image (iOS ONLY)The reload image. If supplied, pull-to-reload functionality is enabled.
Reload Text Color (iOS ONLY)Color of the reload text if this feature is enabled.
More Item Image Replaces the default loading indicator for ____
Blocks The number of blocks.
Block The custom block to use for this place in the pattern.
Left Offset Distance between the left edge of the block and the left edge of the layout container. (optional)
Top Offset Distance between the top edge of the block and the top edge of the layout container. (optional)
Cell Width The width of the cell that will contain the block. The block width will be adjusted appropriately.
Cell Height The height of the cell that will contain the block. The block height will be adjusted appropriately.
Rotate X (iOS ONLY)Rotation (clockwise) around the X axis (horizontal center of the image).
Rotate Y (iOS ONLY)Rotation (clockwise) around the Y axis (vertical center of the image).
Rotate Z (iOS ONLY)Rotation (clockwise) around the Z axis (the center point of the image).
Perspective Depth (iOS ONLY)Controls the depth of the perspective transform. Larger values give a less dramatic perspective. (Defaults to 1000.)
Tap Animation (iOS ONLY)Animation to execute when a child is tapped.
Ignores Data Source If checked, this setting does not use a record from the data source. Good for placing ads in your pattern
First Block Optional block to appear before pattern blocks.
First Block Extent The width or height of the first block (width for a horizontal layout, height for a vertical layout.)
Last Block Optional block to appear after pattern blocks.
Last Block Extent The width or height of the bottom block (width for a horizontal layout, height for a vertical layout.)
Center (ANDROID ONLY) This will center the pattern in the block. If it is horizontal pattern then it will center the pattern vertically, if vertical pattern it will center the pattern horizontally.
Automatic Data Source Pagination If checked, the pattern layout will automatically load the next page of the data source when it scrolls far enough.
Paging Enabled If checked, the view will stop on screen-sized boundaries.
Track Data Source Position if checked, the block will scroll to keep the current data source item in view, even if it changes in another view.
Pull Down to Refresh Image If provided, then pull down to refresh will be enabled and use the given image.
Refresh Pull Text Text that is displayed when pulling down the list view.
Refresh Release Text Text that is displayed when the user should release the list view.
Pull Text Font Font for the Pull to Refresh Text
Release Text Font Font for the Release to Refresh Text
Disable Refresh Optimization (ANDROID ONLY) For Android, this block was optimized for scrolling. As a side effect, if the block is used as a static type block with datasource, then refreshing of the block might fail. Check this block in that case.

Event(s)

Before Draw, After Draw, Tap, Page Change, Refresh Start, Refresh Finish

Help us improve! Rate this article:

Yes I found this article helpful

Ask a Question   

support@eachscape.com
http://assets1.desk.com/
false
eachscape
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete