titanium-sdk icon indicating copy to clipboard operation
titanium-sdk copied to clipboard

feat(ios): add iOS 17+ symbol effects

Open hansemannn opened this issue 1 year ago • 2 comments

The PR adds the new iOS 17+ symbol effect API to bounce / scale / fade images natively with peak-performance. Example video:

https://github.com/tidev/titanium-sdk/assets/10667698/5d0c239d-782e-46e6-9846-248581a76759

const win = Ti.UI.createWindow({ backgroundColor: '#fff' });

const imageView = Ti.UI.createImageView({
	image:  Ti.UI.iOS.systemImage('folder'),
	height: Ti.UI.FILL
});

imageView.addSymbolEffect({
	symbolEffect: 'bounce',
	animated: true,
	options: { repeatCount: 4 }
});

win.add(imageView);
win.open();

hansemannn avatar Feb 03 '24 21:02 hansemannn

Awesome addition! — Excited to test this out 🥽 — Question: could this work for Button views as well? — I mainly use iOS Symbols with the Button element as they make excellent icon buttons and support a 'pressed' effect (on touch) with tintColor and a disabled state (grayed-out color)...

designbymind avatar Apr 12 '24 01:04 designbymind

Yes, that could be implemented exactly the same way.

hansemannn avatar Apr 12 '24 08:04 hansemannn