3
UIAlertController *alert =
[UIAlertController alertControllerWithTitle:@"What would you like to do?"
                                    message:@""
                             preferredStyle:UIAlertControllerStyleActionSheet];

[alert addAction:...] //left out for brevity of post

UIPopoverPresentationController *pop = [alert popoverPresentationController];
pop.sourceView = self.view;
pop.sourceRect = self.view.frame;
pop.permittedArrowDirections = UIPopoverArrowDirectionAny;

[self presentViewController:alert
                   animated:true
                 completion:^{
                 }];

にリストされている UIView の UIConstraintBasedLayoutDebugging カテゴリのメソッドも役立つ場合があります。2014-10-22 13:33:17.966 Project[2995:40175] 制約を同時に満たすことができません。おそらく、次のリストの制約の少なくとも 1 つが望ましくないものです。これを試してみてください: (1) 各制約を見て、どれが予期しないものかを把握してみてください。(2) 不要な制約を追加したコードを見つけて修正します。(注: 理解できない NSAutoresizingMaskLayoutConstraints が表示されている場合は、UIView プロパティ translatesAutoresizingMaskIntoConstraints のドキュメントを参照してください) ( "=44)]>", "", "", "", "" )

制約を破って回復を試みます =44)]>

これは何を意味するのでしょうか?>=44 とは何ですか?

iPad、iOS8でUIAlertControllerを提示しようとしています

4

2 に答える 2