Sunday, 15 June 2014

iphone - Mixing Auto-layout and non auto-layout views in iOS -


I have a view that uses auto-layout and is configured in the interface builder. This scene contains two sub-ideas, each of which is occupying halfway on the screen. . To achieve this goal, I am setting the height of one of the scenes to be the height of the Super View of the program.

  NSLayoutConstraint * constraint2 = [NSLayoutConstraint constraintWithItem: bottomView attribute: NSLayoutAttributeHeight relatedBy: NSLayoutRelationEqual toItem: contentInner Attribute: NSLayoutAttributeHeight Multiplier: 0.5 Continuous: 0]; [ContentInner addConstraint: constraint2];   

Issues I'm coming up, this view which is not used by another view controller is called auto layout ie

  - see main - - Scene 1 (status using auto-layout for children) ---- Topview ---- bottomView   

I set it for manually and then the size of scene 1 Want to be able to update the kids using auto-layout rules, it's currently set in UIBuilder The new counts of sizes depending on the external frame size

Is there a way to get it or what I'm going the wrong way about it?

You can get it after loading View1 after loading < / Code> : You just need [Yes ViewTranslatesAutoresizingMaskIntoConstraints].

No comments:

Post a Comment