Bug 16920 - constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant: improperly bound
Summary: constraintWithItem:attribute:relatedBy:toItem:attribute:multiplier:constant: ...
Status: RESOLVED DUPLICATE of bug 16279
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 7.0.4.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-12-20 12:28 UTC by Todd Berman
Modified: 2013-12-20 17:50 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 16279

Description Todd Berman 2013-12-20 12:28:27 UTC
the withItem: and toItem: parameters are (id) in the native objc binding, which allows you to pass the object you get back from UIViewController.TopLayoutGuide. However, in Xamarin.iOS, the parameters are NSObject, which TopLayoutGuide is not, so you can't pass it into the function.

So you can't emulate:

[NSLayoutConstraint constraintWithItem:self.button
                             attribute:NSLayoutAttributeTop
                             relatedBy:NSLayoutRelationEqual
                                toItem:self.topLayoutGuide
                             attribute:NSLayoutAttributeBaseline
                            multiplier:1.0
                              constant:0.0];

which is necessary to use topLayoutGuide with auto layout.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2013-12-20 17:50:23 UTC
This fix will be in 7.0.6, which is about to be released to the beta channel in the next days.

*** This bug has been marked as a duplicate of bug 16279 ***