← back
JOURNAL · 2015.02.24

UILableのAutoLayoutの警告と回避策

警告内容

sb_warning.png

1
Main.storyboard: warning: Attribute Unavailable: Automatic Preferred Max Layout Width is not available on iOS versions prior to 8.0

 

発生条件

iOSのターゲットが8未満で
LabelのLines(numberOfLines)が1以外でPreferred Width(preferredMaxLayoutWidth)が未設定の場合

 

回避策

Lines(numberOfLines)を1にするかPreferred Width(preferredMaxLayoutWidth)を明示的に指定する。

sb_warning.png

参考:preferredMaxLayoutWidth

← newer
UITableViewCellのAutoLayoutの警告と回避策
older →
Objective-C의 클래스 초기화
← back to home