GithubHelp home page GithubHelp logo

casatwy / handyautolayout Goto Github PK

View Code? Open in Web Editor NEW
1.3K 1.3K 250.0 36 KB

handy categories for generate NSLayoutConstraint programmatically, and layout your Frame easy

License: Other

Ruby 29.37% Objective-C 70.63%

handyautolayout's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

handyautolayout's Issues

重复添加constraint后警告Unable to simultaneously satisfy constraints.

code

[self.view addConstraints:[self.view1 constraintsSize:CGSizeMake(50, 30)]];
[self.view addConstraints:[self.view1 constraintsTopInContainer:10.0f]];
[self.view addConstraints:[self.view1 constraintsTopInContainer:20.0f]];

console

2016-09-02 19:53:50.192 FaiChouTest[3223:179657] Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x7faad0d452c0 UIView:0x7faad306b8f0.top == UIView:0x7faad3017670.top + 10>",
    "<NSLayoutConstraint:0x7faad0d2daf0 UIView:0x7faad306b8f0.top == UIView:0x7faad3017670.top + 20>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7faad0d2daf0 UIView:0x7faad306b8f0.top == UIView:0x7faad3017670.top + 20>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

这样会使得添加动画变得困难,我们需要手动移除原先的constraint,再添加之。
我们可以在原封装方法里添加判断。

不能随意改动啊

大哥啊,你一言不合就改方法调用,这样对我们使用这影响很大啊,height 改成了ct_height,大哥能不能不要这么任性

缺文档

以下这些方法从名称上不能准确的知道其作用,要写代码验证。

- (void)fromTheTop:(CGFloat)distance ofView:(UIView *)view;

- (void)fromTheRelativeTop:(CGFloat)distance ofView:(UIView *)view screenType:(UIScreenType)screenType;

- (void)relativeTopInContainer:(CGFloat)top shouldResize:(BOOL)shouldResize screenType:(UIScreenType)screenType;

pod 搜不到啊

pod search HandyAutoLayout

显示并没有这个库,请问目前只能通过podfile 指定git地址的方式使用么?

为毛不起作用啊

[self addConstraints:[all constraintsLeft:15.0 FromView:self]];
[self addConstraint:[all constraintWidth:62]];
[self addConstraint:[all constraintHeight:30]];
[self addConstraint:[all constraintCenterYEqualToView:self]];
[self addConstraint:[good constraintWidthEqualToView:all]];
[self addConstraint:[good constraintHeightEqualToView:all]];
[self addConstraint:[good constraintCenterYEqualToView:self]];
[self addConstraints:[good constraintsLeft:15+margin FromView:self]];
[self addConstraint:[normol constraintHeightEqualToView:all]];
[self addConstraint:[normol constraintWidthEqualToView:all]];
[self addConstraint: [normol constraintCenterYEqualToView:self]];
[self addConstraints: [normol constraintsLeft:15+2_margin FromView:self]];
[self addConstraint: [bad constraintWidthEqualToView:all]];
[self addConstraint: [bad constraintHeightEqualToView:all]];
[self addConstraint: [bad constraintCenterYEqualToView:self]];
[self addConstraints: [bad constraintsRight:15.0 FromView:self]];
[self addConstraints: [bad constraintsLeft:15+3_margin FromView:self]];

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.