2014-10-02 14 views
6

Uważam, że dokumentacja jest trochę skąpa. Oto przykładWyjaśnienie NSLayoutAttribute

NSLayoutAttributeTrailing 
    The trailing edge of the object’s alignment rectangle. 
    Available in iOS 6.0 and later. 
    Declared in NSLayoutConstraint.h 

Konkretnie Chcę wszystko wyjaśnić

NSLayoutAttributeLeft 
NSLayoutAttributeRight 
NSLayoutAttributeTop 
NSLayoutAttributeBottom 
NSLayoutAttributeLeading 
NSLayoutAttributeTrailing 
NSLayoutAttributeWidth 
NSLayoutAttributeHeight 
NSLayoutAttributeCenterX 
NSLayoutAttributeCenterY 
NSLayoutAttributeBaseline 
NSLayoutAttributeLastBaseline 
NSLayoutAttributeFirstBaseline 
NSLayoutAttributeLeftMargin 
NSLayoutAttributeRightMargin 
NSLayoutAttributeTopMargin 
NSLayoutAttributeBottomMargin 
NSLayoutAttributeLeadingMargin 
NSLayoutAttributeTrailingMargin 
NSLayoutAttributeCenterXWithinMargins 
NSLayoutAttributeCenterYWithinMargins 

Odpowiedz

20

constraint-nouns

Malowane że na rozmowę. Mogłoby być lepiej. Oto PSD.

+0

LOL! Uwielbiam to, że już to przygotowałeś. ALE! Ten przykład to chińska postać. Trailing and Leading powinno być odwrotnie. Ponadto masz błędnie oznaczony górny i dolny. Brakuje również lewej i prawej strony. – Fogmeister

+1

Zmieniłem nazwę na górę i na dół. Czy rząd chiński nie nakazał od lewej do prawej, od początku do końca, pisząc dekady temu? (Szczerze mówiąc nie jestem pewien) – Jano

+0

Ach, może masz rację co do kierunku. Zawsze zakładałem, że jest to język rtl. – Fogmeister