Git Product home page Git Product logo

fanhaofei / fhfscreenadaptation Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 89 KB

作为一个简单的布局文件,FHFScreenAdatation实现了简单布局,你只需要嵌入FHFScreenAdatation包,就只需要简单的设置控件在iphone5尺寸下的frame就能够实现所有屏幕的尺寸的布局效果完全一样,而且完全按照设计图给出的frame来赋值,不用一次计算.设计**非常简单,就是根据其他屏幕与iphone5屏幕尺寸比来重新给出frame

License: Apache License 2.0

Objective-C 100.00%

fhfscreenadaptation's Introduction

#FHFScreenAdaptation ##实例: UIButton *testBtn = [[UIButton alloc] initWithFrame:CGRectMakeEx(0, 100, 640, 300)];

640为4.0寸的两倍像素点宽度;这句话的效果可以让testBtn占整个屏幕的宽度,高度根据300适配 注意:CGRectMakeEx(0, 100, 640, 300)里面的值全是实际值得两倍 你会发现这些值完全是设计图上面给出的值。不用你在苦逼的除以2.。。。。。。。 ![iPhone6p]

fhfscreenadaptation's People

Contributors

fanhaofei avatar

Watchers

 avatar

fhfscreenadaptation's Issues

注意点:

1234
UIButton *testBtn = [[UIButton alloc] initWithFrame:CGRectMakeEx(0, 100, 640, 300)]; testBtn.backgroundColor = [UIColor orangeColor]; [self.view addSubview:testBtn];

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.