<doc>
	<legacy_id></legacy_id>
	<name>iphoneSetRedrawInterval</name>
	<type>command</type>

	<syntax>
		<example>iphoneSetRedrawInterval <i>frameInterval</i></example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Synchronizes LiveCode redraws with the device's refresh rate.</summary>

	<examples>
<example>iphoneSetRedrawInterval 1 -- Redraw with every iOS redraw request</example>
<example>iphoneSetRedrawInterval 2 -- Redraw on every other iOS redraw request</example>
<example><p>iphoneSetRedrawInterval 0 -- Don't use the redraw interval feature</p></example>
	</examples>

	<history>
		<introduced version="5.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		
	</history>

	<objects>
		<stack/>
	</objects>

	<platforms>
		<ios/>
	</platforms>

	<classes>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
	</classification>

	<references>
		<property tag="compositorCacheLimit">compositorCacheLimit Property</property>
		<property tag="compositorTileSize">compositorTileSize Property</property>
		<property tag="compositorType">compositorType Property</property>
		<property tag="layerMode">layerMode Property</property>
	</references>

	<description>
	<overview>Use the <b>iphoneSetRedrawInterval</b> command to improve screen update performance and smoothness on iOS devices by tying LiveCode redraw calls to the device's refresh rate.</overview>

		<parameters>
<parameter>
<name>frameInterval</name>
<description>A number specifying how often LiveCode should update the screen in line with the screen's refresh rate. </description>
<options title="">
<option>
<item>0</item>
<description>Turn off synchronized redraws and revert to default LiveCode redrawing behavior.</description>
</option>
<option>
<item>1</item>
<description>Redraw every time iOS redraws.</description>
</option>
<option>
<item>2</item>
<description>Redraw on every other iOS redraw.</description>
</option>
<option>
<item>x</item>
<description>Redraw every x iOS redraws.</description>
</option>
</options>
</parameter>		</parameters>

	<value></value>
	<comments>By default, LiveCode updates the screen immediately after any command that requires it. This means that several small screen updates may occur in quick succession when animation is combined with other dynamic screen elements. On mobile devices this can affect smoothness of animation where it would be better if multiple frequent redraws were replaced with a single periodic redraw. Setting the <b>iphoneSetRedrawInterval</b> enables this behaviour, where the screen is updated at a fixed interval tied to iOS's redraw rate.<p></p><p>WHEN TO USE</p><p>This feature should be used for applications that cause the screen to be redrawn often or where redraws are being called by various application elements. For example, scrollers, dragging and the move command all independently request redraws causing a build up which can lead to 'judders' and other unwanted drawing issues.</p><p></p><p></p><warning>When the this feature, updates <u><b>do not</b></u> occur after each command. </warning><p></p><p></p><warning>This feature should not be used if your scripts prevent system messages from being processed. For example, tight loops using the wait command. Screen redraws are dependent on LiveCode receiving iOS redraw calls.</warning></comments>
	</description>
</doc>