Understood, is great that you guys get tutorial out in such a short timespan. My motivation was only to help other students. Content is very good, although quite a lot to take in at once, I may have to watch, follow along multiple times.
I downloaded the materials and in the MessagesViewController, the compiler keeps trying to replace calls of “presentViewController(forConversation:,withPresentationStyle:)” with " …(conversation:, animated:)" it doesn’t seem to recognize the extension
This project was written with an early beta of Xcode 8 and iOS 10. I suggest that you check out the project that accompanies the iOS 10 by Tutorials book, which will be updated with the latest Xcode when it is released.
I have been playing with a custom iMessage app and I am trying to ad a CNContactPickerViewController as a view in my app. For some reason when the controller comes up in expanded mode, the search bar and top part of controller is hidden behind the iMessage Nav bar. How can i constrain the controller properly so that the top of CNContactPickerViewController starts at the bottom of Nav Bar?
@digimarktech I’m pretty sure that I read somewhere in the release notes for iOS 10 betas that this was a known issue and the suggested workaround was to update the constraint on the content to add a margin at the top.
Not a very nice answer I appreciate, but I’m pretty sure that this was what Apple was recommending to do…
@samdavies gotcha! I guess I must have missed that. With that being said how do you go about adding a constraint to something that doesn’t exist in the storyboard? I am for the most part using the same methodology that the wenderPic app is using as far as adding a child view controller, creating constraints around it, using didMove to parentviewcontroller and using the presentViewController function in the willtransition and willBecomeActive to display the child controller. I was under the impression that as long as I instantiate the controller the same way my other view controllers are being called, the constraints defined in my presentViewController method would take place for all views. The storyboard for my CNContactPickerViewController is blank as I am creating the controller programmatically. Do I add constraints within the same section that I define the controller? When I tried that I received all types of constraint errors and illegal operation messages. I can confirm that if I create a basic label on the same viewcontroller that I am trying to add my contact picker to, and I constrain it within the storyboard, when that controller comes up in expanded mode, it does show up properly. This confirms that if I add constraints, everything should work. It’s just a matter of figuring that out programmatically…
The really important thing to remember is that you need to set translatesAutoresizingMaskIntoConstraints to false for views that you create in code when you’re adding constraints.
If you need more info on this, check out the auto layout video series, or some of the other layout tutorials on raywenderlich.com.
Even after setting this up in my viewDidLoad method, my contact picker still shows up behind the nav bar. I tried adding a breakpoint and this code does get called yet the constraint is not being applied…