Coder Social home page Coder Social logo

unityview's Introduction

UnityView

基于UGUI开发的UI框架,提供坐标布局、动画、高性能可复用的列表视图


注意事项:

场景中需要挂载一个<UIViewManager>对象

UI视图的坐标原点被重定义为左上角(与Android、iOS相同)


Animation 动画组件

动画组件采用了与cocoa框架类似的调用方式,iOS开发者可以轻松上手

// 默认为0.25秒
UIAnimation.Animate(() =>
{
    RotateAngleView.RotateAngle(45);
});

ListView 可变高度列表组件

ListView与Android的实现类似,采用视图-适配器的使用方案
TableView(不可变高度列表)、GridView实现基本类似

public class MyAdapter : IListAdapter
{
    public int GetCount()
    {
        return 50;
    }

    public ILayout GetConvertView(int position, ILayout convertView)
    {
        ButtonView cell = convertView as ButtonView;
        if (cell == null)
        {
            cell = new ButtonView();
        }
        cell.Title = "Item:" + position;
        return cell;
    }

    public float GetItemSize(int index)
    {
        return RandomHeight[index];
    }
}

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.