[TIMOB-20176] iOS: Support UIVisualEffectView (aka Blur View)
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-01-28T10:13:43.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 5.4.0 |
Components | iOS |
Labels | blureffect, blurview, ios8, qe-5.4.0 |
Reporter | Hans Knöchel |
Assignee | Hans Knöchel |
Created | 2015-12-24T13:38:27.000+0000 |
Updated | 2016-06-10T21:48:47.000+0000 |
Description
We should support the
UIVisualBlurEffectView
aka Blur View introduced in iOS 8 as a public API (instead of unrecommended solution of stretching a toolbar).
Demo architecture:
var win = Ti.UI.createWindow({
backgroundColor: "#fff"
});
/*
* Reference Image
*/
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"],
bottom: 100
});
var effects = [
Ti.UI.iOS.BLUR_EFFECT_STYLE_EXTRA_LIGHT,
Ti.UI.iOS.BLUR_EFFECT_STYLE_LIGHT,
Ti.UI.iOS.BLUR_EFFECT_STYLE_DARK,
];
tabs.addEventListener("click", function(e) {
blur.setEffect(effects[e.index]);
});
win.add(tabs);
win.add(img);
win.open();
Attachments
File | Date | Size |
---|---|---|
Simulator Screen Shot 24.12.2015, 15.04.19.png | 2015-12-24T14:09:45.000+0000 | 119830 |
Simulator Screen Shot 24.12.2015, 15.04.20.png | 2015-12-24T14:09:44.000+0000 | 121966 |
Simulator Screen Shot 24.12.2015, 15.04.21.png | 2015-12-24T14:09:45.000+0000 | 155448 |
Simulator Screen Shot 24.12.2015, 15.04.23.png | 2015-12-24T14:09:45.000+0000 | 137275 |
PR: https://github.com/appcelerator/titanium_mobile/pull/7599 Merry christmas!
Awesome gift [~hans123]! Same to you!
Agreed with [~penrique] to wait for an Android equivalent to be implemented before we merge this. The namespace would move to
Ti.UI.BlurView
. [~msamah] can we put this on the Android roadmap for Ti.SDK 6.0.0? :-) [This link](http://developers.500px.com/2015/03/17/a-blurring-view-for-android.html) looks promising!Thanks for the link [~hans123] will create a JIRA ticket for Android parity for this.
Jira ticket for Android parity created: TIMOB-20186
Talked to [~cng] a few days ago, that it's unlikely to support the Android component in the 6.0.0 timeframe, so we agreed to leave it in the (existing) Ti.UI.iOS.BlurView namespace for now and simply move it after Android supports it as well. /cc [~pec1985]
[~hansknoechel] / [~cng] - This appears to be implemented for the upcoming release however its already in the documentation. Can we either put a note on the docs or remove this from documentation until we actually have this released. Its confusing to have it in the docs and then see an error saying it doesn't exists in Titanium. Doc reference http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.iOS.BlurView
ok thanks
Verified as fixed,
Extra Light
,Light
andDark
Blur Views are now supported for iOS8. (Works for iOS9 additionally) Tested On: iPhone 6S (9.3.2) Device & iPhone 6 Plus (8.3) Device Mac OSX El Capitan 10.11.5 Ti SDK: 5.4.0.v20160608165242 Appc Studio: 4.6.0.201605201934 Appc NPM: 4.2.7-2 App CLI: 5.4.0-15 Xcode 7.3 Node v4.2.6 *Closing ticket.*