What is NSLayoutAnchor?

devquora
devquora

Posted On: Feb 22, 2018

 

When Apple brought iOS 9, with it was introduced the NSLayoutAnchor class to that made writing auto-layout easier with the code.

There are three subclasses of NSLayoutAnchor:

  • NSLayoutYAxisAnchor This subclass is used to create vertical constraints
  • NSLayoutDimension This subclass is used to create the width and height constraints
  • NSLayoutXAxisAnchor This subclass is used to create horizontal constraints

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    IOS Interview Questions

     What is the method for preventing the QuickTime Player from capturing streaming videos of iOS 8 apps on Yosemite while screen recording is on?

    The QuickTime Player on Yosemite cannot record encrypted media by the HTTP Live Streams during screen recording. As a r..

    IOS Interview Questions

    How can a user respond or react to the state transitions on the app?

    A user can state changes in the most apt way in order to respond to the state transitions. Calling the corresponding me..

    IOS Interview Questions

    What are extra features added in iOS 9?

    Learning user habits and most importantly, acting on the information gathered has never been easier! With the excellent ..