呼び出し時にエラーが発生するpresentViewController
制約と関係があるかのように機能しますが、すべてを削除しても発生します。
クラッシュの原因となるコード行は次のとおりです。[[self sourceViewController] presentViewController:[self destinationViewController] animated:NO completion:nil];
デバイスが横向きの場合のみエラーが発生しますが、この行を縦向きで呼び出している間はすべて正常に動作します。
私が得るエラーは次のとおりです。
*** Assertion failure in -[UIView _edgeExpressionInContainer:vertical:max:], /SourceCache/UIKit/UIKit-2935.137/NSLayoutConstraint_UIKitAdditions.m:2815
これはセグエ クラスの最後の行であることに注意してください。
編集:これまでのところ、エラーは次の行にあるようです:self.view setTranslatesAutoresizingMaskIntoConstraints:NO];
ソースビューコントローラー内。ただし、この行は、設計目的でビューを切り上げるために重要です。それに関するコードのブロック全体は次のとおりです。
[refreshNotes setAutoresizingMask:(UIViewAutoresizingFlexibleRightMargin|UIViewAutoresizingFlexibleLeftMargin)];
[[refreshNotes.subviews objectAtIndex:0] setFrame:CGRectMake(refreshNotes.bounds.origin.x, 17, refreshNotes.bounds.size.width, refreshNotes.bounds.size.height)];
[[refreshNotes.subviews objectAtIndex:0] setTintColor:[UIColor colorWithRed:95.0/255.0 green:49.0/255.0 blue:187.0/255.0 alpha:1]]; // lighter purple so it doesn't appear black
[self.view setTranslatesAutoresizingMaskIntoConstraints:NO];