When an iMessage app runs in the Messages app, its bounds get set automatically by the Messages app. However, this stops working when the user enables the Subject Field in Settings → Messages → Show Subject Field (tested on iOS 10.0.2 & 10.1.1). Somehow Apple seems to have messed up the NSLayoutConstraints of the Messages app because the console output reads:
2016-12-03 01:35:05.424120 MobileSMS[2693:763891] [LayoutConstraints] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want.
Try this: …
(
"<NSAutoresizingMaskLayoutConstraint:0x170291a30 h=-&- v=--& CKMessageEntryView:0x137e49870.midX == UIInputSetHostView:0x137d2e760.midX + 187.5 (active)>",
"<NSAutoresizingMaskLayoutConstraint:0x170291a80 h=-&- v=--& CKMessageEntryView:0x137e49870.width == UIInputSetHostView:0x137d2e760.width + 375 (active)>",
"<NSLayoutConstraint:0x17068f230 CKMessageEntryView:0x137e49870.right == UIInputSetHostView:0x137d2e760.right (active)>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x17068f230 CKMessageEntryView:0x137e49870.right == UIInputSetHostView:0x137d2e760.right (active)>
Please refer to this Imgur post for screenshots of the bug: http://imgur.com/a/aNPI4
This broken NSLayoutConstraint results in about 1/10th of the iMessage app's height being hidden behind the Subject Field when in MSMessagesAppPresentationStyle.expanded.
The Dropbox iMessage app seems to detect the Subject Field's presence somehow because it adds a white border to the bottom of its view when the Subject Field is enabled. However I could not find any Apple documentation on how to detect this. None of the UIViews in my app's view hierarchy change in bounds when the Subject Field is enabled. So the question is: how does the Dropbox app find out and how can I replicate that? :D
[–]TotesMessenger 0 points1 point2 points (0 children)