Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25684] iOS: Expose UIInterpolatingMotionEffect Horizontal and Vertical

GitHub Issuen/a
TypeNew Feature
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2018-05-16T00:00:45.000+0000
Affected Version/sRelease 7.0.1
Fix Version/sRelease 7.3.0
ComponentsiOS
Labelscommunity, demo_app, feature, ios
ReporterCarlos Henrique Zinato
AssigneeHans Knöchel
Created2018-01-18T15:12:39.000+0000
Updated2018-11-15T16:51:35.000+0000

Description

Adds iOS homescreen like parallax effect to views based on Marcel Pociot's module https://github.com/mpociot/TiMotionEffects How to use it:
var win = Ti.UI.createWindow({
    backgroundColor: '#fff'
});

var background = Ti.UI.createImageView({
	image: 'http://web-features.net/pb-examples/rainbow-at-sea/bg.jpg',
	horizontalMotionEffect: {
		min: -50,
		max: 50
	},
	verticalMotionEffect: {
		min: -50,
		max: 50
	}
});
win.add(background);

win.open();

Comments

  1. Carlos Henrique Zinato 2018-01-18

    PR: https://github.com/appcelerator/titanium_mobile/pull/9748
  2. Hans Knöchel 2018-11-15

    I would like to expose a "clearMotionEffects()" method. We use the API exposed by this ticket but see some glitches when switching tabs. This is the natively, but requires some handling to remove the motion-effect on blur and re-add it on focus. Using this API will solve it.

JSON Source