Use of undeclared identifier 'NSLineBreakByWordWrapping' using xCode 4.3.3
Asked Answered
V

2

6

I get "Use of undeclared identifier 'NSLineBreakByWordWrapping'" on xCode 4.3.3 which doesn't appear on the beta one.

It happens on this code:

[text sizeWithFont:font constrainedToSize:textConstraintRect.size lineBreakMode: NSLineBreakByWordWrapping].height);

What do I need to import to solve this one?

Please help,

Viator answered 9/7, 2012 at 17:56 Comment(0)
H
8

Use UILineBreakModeWordWrap instead.

Hellcat answered 9/7, 2012 at 18:0 Comment(1)
facing the same problem in xcode 4.2 ...use of undeclared identifier nslinebreakbywordwrapping in my CCImage.mmDietary
K
9

Or NSLineBreakMode.ByWordWrapping in swift

Knightly answered 9/7, 2014 at 17:34 Comment(2)
Swift in Xcode 4.3.3? Why did you bump this old question?Cookie
NSLineBreakMode.byWordWrapping in Swift 4.0Peake
H
8

Use UILineBreakModeWordWrap instead.

Hellcat answered 9/7, 2012 at 18:0 Comment(1)
facing the same problem in xcode 4.2 ...use of undeclared identifier nslinebreakbywordwrapping in my CCImage.mmDietary

© 2022 - 2024 — McMap. All rights reserved.