スクロールビューとその背後にある画像ビューがあり、ペン先を配置しています。自動レイアウトを使用しています。両方のビューで、スーパービューするための下部スペースとスーパービューするための上部スペースがあります。画像ビューは、私が望んでいることを正確に実行します。iphone 5の場合、それは私が望むところです。また、他のiPhoneの場合は、画面の下部より上にあるため、サイズが正しく変更されます。スクロールビューはiphone5で正しく表示されますが、他の電話ではサイズが変更されないため、アプリのビューの下にスクロールダウンします。ログに次のメッセージが表示されます。
2012-11-21 10:42:38.576 LCHApp[12604:907] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this: (1) look at each constraint and try to figure out which you don't expect;
(2) find the code that added the unwanted constraint or constraints and fix it.
(Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer
to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints)
"<NSLayoutConstraint:0x1d8ea080 UIScrollView:0x1d8413b0.bottom == UIImageView:0x1d892110.bottom>",
"<NSAutoresizingMaskLayoutConstraint:0x1d8cca10 h=-&- v=-&- ScheduleViewNib:0x1d853630.height == UIScrollView:0x1d8413b0.height - 386>",
"<NSLayoutConstraint:0x1d8e5340 V:[UIImageView:0x1d892110]-(64)-| (Names: '|':ScheduleView:0x1d8efc30 )>",
"<NSAutoresizingMaskLayoutConstraint:0x1d8cf520 h=--& v=--& V:[ScheduleView:0x1d8efc30(480)]>",
"<NSLayoutConstraint:0x1d8eaed0 V:|-(45)-[UIScrollView:0x1d8413b0] (Names: '|':ScheduleView:0x1d8efc30 )>"
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x1d8ea080 UIScrollView:0x1d8413b0.bottom == UIImageView:0x1d892110.bottom>
私はすでに試しました
[self setTranslatesAutoresizingMaskIntoConstraints:YES];
と
[self.myScrollView setTranslatesAutoresizingMaskIntoConstraints:YES];
私が見ることができることから、これはビューからすべての制約を取り除くだけです。そして、それは私が望むものではありません。