How to fix iMessage orientation crash

Leave a comment

iMessage will crash in mysterious ways if you start in portrait, change to landscape, and then select something from your conversation.

My buddy kevski figured out that you can fix this by dismissing yourself every time you send a message.


- (void)didStartSendingMessage:(MSMessage *)message conversation:(MSConversation *)conversation
[self dismiss];

Just another weird iMessage thing. But this seems to be what most apps do and it fixed an annoying bug I had. Merci kevski!

How to pin UI element to the top layout guide using autolayout

Leave a comment

Say you have a SearchBar that you want to pin to the top of your screen and have it stay there regardless of whether you are in collapsed or expanded mode.

Add your search bar, and then control drag a constraint to the top of the view like so

Screen Shot 2017-01-08 at 7.04.42 AM.pngScreen Shot 2017-01-08 at 7.04.48 AM.png

This will add a constraint that will bind the searchbar to the ‘Top Layout Guide’ property of your view controller. Top layout guide is a special property Apple provides to automatically keep your view below nav bars and things like this.

Screen Shot 2017-01-08 at 7.06.22 AM.png

Now just set the value of that constraint to zero (0) by double clicking on it.

Screen Shot 2017-01-08 at 7.07.04 AM.png

Add two more constraints to in the search bar to the sides (click the left and right red bars and then ‘Add 2 constraints’ at the bottom.

Screen Shot 2017-01-08 at 7.08.37 AM.png

Screen Shot 2017-01-08 at 7.09.33 AM.png

And then press Cmd + Alt + = to automatically reposition everything.

Screen Shot 2017-01-08 at 7.10.09 AM.png

Your searchbar should now be pinned to the top and stay there regardless of whether you are in expanded or collapsed iMessage mode.

Screen Shot 2017-01-08 at 7.11.15 AM.png


Screen Shot 2017-01-08 at 7.11.22 AM.png


iMessage Not Delivered

Leave a comment

If you get this error message on your childs iPad try the following:

Goto Settings -> General -> Date & Time

And turn on ‘Set Automatically’. If it’s already on turn it off and on again.
If you are still stuck go

Settings -> Messages and logout and log back in again.

For some reason this has fixed my kids iPad problems multiple times.

Links that help

%d bloggers like this: