[Xamarin Blog] - Adding View Effects in iOS 8

MichaelBluesteinMichaelBluestein Michael BluesteinUSMember, Insider, University, Developer Group Leader Xamurai
edited July 2014 in iOS

Just posted: Adding View Effects in iOS 8 on the Xamarin Blog.

Read the full article to learn how to add dynamic view effects in iOS 8.

Use this thread to discuss or ask questions.

Posts

  • LuisReyesLuisReyes Luis Reyes USMember

    Is this only available for iOS8?

  • DannyCDannyC Danny Cabrera USMember ✭✭✭

    Very cool @MichaelBluestein‌ thanks for sharing the blog post.

  • MichaelBluesteinMichaelBluestein Michael Bluestein USMember, Insider, University, Developer Group Leader Xamurai

    @LuisReyes‌ Yes, it's an iOS 8 specific API

  • nodoidnodoid Paul Johnson GBMember, Beta ✭✭✭

    Cracking piece that Mike - thanks :)

  • MichaelBluesteinMichaelBluestein Michael Bluestein USMember, Insider, University, Developer Group Leader Xamurai

    @DannyC@nodoid thanks guys, glad you liked it

  • evan.stoddardevan.stoddard Evan Stoddard USMember
    edited July 2014

    I'm having a slight issue with obj-c. I subclassed UIVisualEffectView and when I add it as a subview there is no blur.

    blurView * blur = [[blurView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]];
    
    [self.view addSubview:blur.viewForBaslineLayout];
    
  • evan.stoddardevan.stoddard Evan Stoddard USMember

    Oops. Forgot to set the frame :)

  • IvanMejiaIvanMejia Ivan Mejia USMember

    Hi,
    I am implementing this same behaviour but on a renderer, my problem is moving all the subviews into the vibrancyView so the vibrancy effect can be shown, is there a way in a renderer to specify which one is the content view so I can set the vibrancyView.ContentView and all the subviews (e.i. controls like Entry, Text, etc.) can be added directly to that view and the vibrancy effect works fine from a renderer?

    Thanks
    Ivan.

  • MichaelBluesteinMichaelBluestein Michael Bluestein USMember, Insider, University, Developer Group Leader Xamurai

    I'm not sure how to go about this from Xamarin.Forms. cc'ing @TheRealJasonSmith as he'll likely know.

  • donimonidonimoni doni moni ILMember

    I whould add this as well

    bool IsRunningiOS8OrLater()
    {
    string systemVersion = UIDevice.CurrentDevice.SystemVersion;

            return systemVersion.Contains("8");
        }
    
  • victoriavictoria Victoria Stahlman SEMember ✭✭

    bool IsRunningiOS8OrLater()
    {
    string systemVersion = UIDevice.CurrentDevice.SystemVersion;
    return systemVersion.Contains("8");
    }

    Uhm. How do you think that will work when iOS 9.0 is released?

    You should probably use this instead:

    if (UIDevice.CurrentDevice.CheckSystemVersion(8, 0))
        . . .
    
  • LuisGinanjarLuisGinanjar Luis Ginanjar IDMember

    I try to set alpha but not work , any suggestion ?

Sign In or Register to comment.