tvOS use of multi-layered images

Source: Internet
Author: User

Camp David Education original articles, reproduced please indicate the source. Our dream is to do the best iOS development training!

When the button or cell in Apple TV gets focus, there are some interesting shadow animations. This effect can be easily achieved through parallax images.

apple TV Human-Computer Interaction guide describes tvOS in the uiimage supports two proprietary stacked picture formats, LSR and LCR. The LSR is mainly used to directly put into the project resources, and LCR is mainly placed on the server, at run time on demand load. On the production of stacked images, Apple provides us with three ways to do this:

    • A plugin for photoshop named "Parallaxexporter_apps". This plugin seems to support only Photoshop 2014 and Photoshop 2015.

    • A separate "Parallax previewer" application allows you to create parallax images directly.

    • The assets.xcassets of Xcode is created directly.

When making parallax images, what we need to do is to prepare a picture for each layer. You can refer to the Apple TV HMI guide for a dimension relationship between each layer of images, which you can refer to in the tvOS Programming Guide.

It is important to note that the LSR files that we make must be placed in the assets.xcassets. If you pull directly into a project like a normal picture, UIImage the imageNames: method does not load successfully.

Can load LSR files in Assets.xcassets//Cannot load other LSR files in mainbundle let image = UIImage (imagenamed: "Test")
LSR files in Assets.xcassets can be loaded//cannot load other LSR files in mainbundle UIImage *image = [UIImage imagenamed: @ "Test"];

Camp David Academy (Advanced Development Video): http://v.diveinedu.com

The club of Great concentration (iOS interview required): Http://divein.club

650) this.width=650; "src=" http://io.diveinedu.com/images/qrcode-diveinedu-mp-weixin.jpg "style=" width:200px; height:200px; "/>


tvOS use of multi-layered images

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.