[Mono-bugs] [Bug 534412] New: NSString missing sizeWithFont / constrainedToSize / lineBreakMode

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Aug 26 08:46:05 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=534412


           Summary: NSString missing sizeWithFont / constrainedToSize /
                    lineBreakMode
    Classification: Mono
           Product: MonoTouch
           Version: unspecified
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Enhancement
          Priority: P5 - None
         Component: Class Libraries
        AssignedTo: gnorton at novell.com
        ReportedBy: jondick at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.6 Safari/532.0

There is no binding to any of the NSString's sizeWithFont / constrainedToSize /
lineBreakMode.

For example, If I want to make a UITableView have variable row heights, I
create a UITableViewDelegate which implements GetHeightForRow(UITableView
tableView, NSIndexPath indexPath).

Typically in obj-c I could do something like this to measure the size of a
string and get the height for the row:

CGSize labelSize = CGSizeMake(200.0, 20.0);

labelSize = [string sizeWithFont: [UIFont boldSystemFontOfSize: 17.0]
constrainedToSize: CGSizeMake(labelSize.width, 1000) lineBreakMode:
UILineBreakModeWordWrap];


Please add bindings to this functionality.  I can't make variable height rows
without it.

Reproducible: Always

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list