GithubHelp home page GithubHelp logo

qimuya3 / cuslayout Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jjmm/cuslayout

0.0 1.0 0.0 3.64 MB

iOS Layout Manager.Open source auto layout Manager,which is similar to Android,SWT,SWING API. ios layout

License: Other

Ruby 0.56% Objective-C 99.44%

cuslayout's Introduction

CUSLayout

CUSLayout for iOS managed positioning mechanism, the iOS SDK provides absolute positioning is very inconvenient to use, in addition to the emergence of 4-inch screen of the iPhone and iPad to make iOS developer need to spend more time in the layout, however iOS6.0 AutoLayout the mechanism is disappointing, I refer to Android, SWT, Swing layout mechanism, the preparation of for iOS CUSLayout, use CUSLayout has the following advantages:

  • Simplify coding, you do not need to take into account the pixel level, only for regional programming, which greatly improves the efficiency of programming
  • Good readability, layout type can be a preliminary understanding of layout intent and child controls roughly placed, eliminating the need for a very tedious restore coordinate steps
  • When the the UIView container Flip, size change, supporting multiple resolutions, automatic processing
  • UIView category which makes it easy to create layout constraints in old code
  • The API is simple and easy-to-use, low cost learning through the sample program to preliminary master

How To Get Started

###Use static library

  • 1.Open your existing project (or create a new one)

  • 2.Drag and drop the CUSLayoutExample.xcodeproj file downloaded from github previously from Finder to your project (either root or under Frameworks)

  • 3.In YOUR project configuration:
    in the Build Phases, Add CUSLayout (the lib, not the example app) as a Target Dependency
    in the Link Binary With Libraries section, add the libCUSLayout.a library

  • 4.In YOUR Prefix.pch file, add:

    #import “CUSLayout.h”

  • 5.In YOUR project configuration, on the “Build Settings” tab

  • locate the “User Header Search Paths” setting, and set the Release value to "${PROJECT_DIR}/CUSLayout" (including quotes!) and check the “Recursive” check box.

  • The Debug value should already be set, but if it’s not, change that as well.

  • Also locate the “Always Search User Paths” value and set it to YES.

  • Finally, find the “Other Linker Flags” option, and add the value -ObjC (no quotes).

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like CUSLayout in your projects. See the "Getting Started" guide for more information.

Podfile

platform:ios
pod "CUSLayout"

API

###Base Layout CUSFillLayout
CUSStackLayout
CUSLinnerLayout
###Advanced Layout CUSRowLayout
CUSTableLayout
CUSGridLayout


Basic usage

###CUSFillLayout

//only one code,auto set the frame of parent to the subview.
view.layoutFrame = [[CUSFillLayout alloc]init];

Example

image
image
image
image
image
image
image

License

CUSLayout is licensed under the terms of the Apache License, version 2.0. Please see the LICENSE file for full details.

Contributions

Contributions are totally welcome. We'll review all pull requests and if you send us a good one/are interested we're happy to give you push access to the repo. Or, you know, you could just come work with us.

Please pay attention to add Star, your support is my greatest motivation, thank you.

cuslayout's People

Contributors

jjmm avatar

Watchers

 avatar

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.