Code Monkey home page Code Monkey logo

Comments (15)

Kureev avatar Kureev commented on July 18, 2024

Nope, we can rewind it back to 8.0! Should I do it or you want to commit it by yourself?

from react-native-blur.

grabbou avatar grabbou commented on July 18, 2024

I can do it, thanks 💃

(We do support iOS9 only, but I have that feeling client will request iOS8 resulting in removing quick-actions support, but want to avoid warnings from side menu)

from react-native-blur.

Kureev avatar Kureev commented on July 18, 2024

So, any progress so far?

from react-native-blur.

grabbou avatar grabbou commented on July 18, 2024

Yes, I will get back on that today.

from react-native-blur.

Kureev avatar Kureev commented on July 18, 2024

It's a long day "today", isn't it? 😄

from react-native-blur.

grabbou avatar grabbou commented on July 18, 2024

It is, indeed 💃

from react-native-blur.

9mm avatar 9mm commented on July 18, 2024

So I'm kind of confused on this (and new to RN), will this work on iOS 7? Will it fail spectacularly or gracefully if its not?

from react-native-blur.

9mm avatar 9mm commented on July 18, 2024

As a follow up question, how do I detect <= iOS 7 so I can fall back to something else (sweet library btw)

from react-native-blur.

Kureev avatar Kureev commented on July 18, 2024

yo @9mm! Unfortunately, it doesn't support iOS < 8, because it relies on UIVisualEffects.

from react-native-blur.

grabbou avatar grabbou commented on July 18, 2024

Based on http://stackoverflow.com/a/18568657 @9mm, it will run flawlessly when Base SDK >= 9.0. As long as you do not render component with <BlurView>, it won't fail at all. So best you could do is to detect in React Native what version you are running and then - based on that, either display it or not.

On the other hand, if there's demand, we could add in a support for older devices, by wrapping setBlur function with:

if(NSClassFromString(@"UIBlurEffect")) {
   // method goes here
} else {
  _visualEffectView = [UIView new];
  _visualEffectView.backgroundColor = [UIColor blackColor];
  _visualEffectView.alpha = 0.2 // or 0.6, 0.9 depending on string `blurType
}

and fall back to using opacity with black background in other case.

from react-native-blur.

Kureev avatar Kureev commented on July 18, 2024

@grabbou I think it'll be more valuable if we can eventually rewrite this one in a favor of custom blur implementation we can share between iOS and Android

from react-native-blur.

grabbou avatar grabbou commented on July 18, 2024

I am not sure if there's any way to share custom blur implementation between Android & iOS. AFAIK there were few attempts back in the day to support blur effects on IOS prior to UIVisualEffects but I am not sure it's worth reinventing something, that works quite nice on system level and (hopefully) is well optimised.

from react-native-blur.

9mm avatar 9mm commented on July 18, 2024

@grabbou that is very interesting... great piece of information to know. Is there a way to detect iOS version in React Native, without the use of 3rd party libs?

from react-native-blur.

grabbou avatar grabbou commented on July 18, 2024

Yeah, if you are on Discord, ping me (same nickname) and I'll send you over some snippets tomorrow from work. I've done it in the past, just need to find it :)

from react-native-blur.

Kureev avatar Kureev commented on July 18, 2024

This one looks a bit outdated now.

from react-native-blur.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.