[TIMOB-23509] iOS10: Expose new visual effects on Ti.UI.iOS.BlurView
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | High |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2016-07-06T00:05:54.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Release 5.5.0 |
| Components | iOS |
| Labels | ios10, qe-5.5.0 |
| Reporter | Hans Knöchel |
| Assignee | Hans Knöchel |
| Created | 2016-06-13T22:44:12.000+0000 |
| Updated | 2016-08-15T20:56:23.000+0000 |
Description
There are two new properties in iOS 10 to change the blurring behavior:
-
UIBlurEffectStyleProminent
- UIBlurEffectStyleRegular
We should expose them as part of our existing API Ti.UI.iOS.BlurView.
PR: https://github.com/appcelerator/titanium_mobile/pull/8060 Demo:
var win = Ti.UI.createWindow({ backgroundColor: "#fff" }); // Reference image (or view) var img = Ti.UI.createImageView({ image: "/default_app_logo.png", top: 100, width: 300, height: 300 }); // Blur view var blur = Ti.UI.iOS.createBlurView({ width: Ti.UI.FILL, height: Ti.UI.FILL }); img.add(blur); // Effect controls var tabs = Ti.UI.iOS.createTabbedBar({ labels: ["Extra light", "Light", "Dark", "Regular", "Prominent"], bottom: 100 }); // Available blur effects var effects = [ Ti.UI.iOS.BLUR_EFFECT_STYLE_EXTRA_LIGHT, Ti.UI.iOS.BLUR_EFFECT_STYLE_LIGHT, Ti.UI.iOS.BLUR_EFFECT_STYLE_DARK, Ti.UI.iOS.BLUR_EFFECT_STYLE_REGULAR, Ti.UI.iOS.BLUR_EFFECT_STYLE_PROMINENT ]; tabs.addEventListener("click", function(e) { blur.setEffect(effects[e.index]); }); win.add(tabs); win.add(img); win.open();PR (5_5_X): https://github.com/appcelerator/titanium_mobile/pull/8214
Verified as fixed, new BlurView styles for iOS10 are now supported (Regular, Prominent). However a non-descriptive error is returned when attempting to use these styles on devices < iOS10, an improvement ticket has been created in this regard. (TIMOB-23778) Tested On: iPhone 6S (10.0, 9.3.3) Device & Simulator Mac OSX El Capitan 10.11.6 Ti SDK: 5.5.0.v20160815115302 Appc Studio: 4.7.0.201607250649 Appc NPM: 4.2.7 App CLI: 6.0.0-25 Xcode 8.0 beta 5 (8S193k) Node v4.4.7 *Closing ticket.*