How to take advantage of Xcode 8 new live previews - xcode8

I can't find any documentation of how to get interface builder to render UI as it will be at runtime (a new feature as shown here. Does anyone know how?

This functionality comes for free, without any need to enable it. Rendering iOS content in the Interface Builder canvas now includes effects such as blurs and vibrancy.
If you have custom views, using IBDesignable and IBInspectable (introduced in Xcode 6) are a great way to enable design-time rendering inside IB. Here are some starting points:
http://help.apple.com/xcode/mac/8.0/#/devf60c1c514
http://nshipster.com/ibinspectable-ibdesignable/

Related

Embedded camera in Xamarin Forms

I have a client that adamantly insists on a solution with embedded camera in terms of having a ContentPage with an camera stream and custom buttons and icons, similar to https://github.com/pierceboggan/Moments, or at very least as I understand it seeing as it is a Snapchat clone. And my client wants similar swipe capabilities as to how navigation works in Snapchat.
However, as far as I can tell most of what is utilized in that solution has been deprecated.
I have suggested using the Media Plugin https://github.com/jamesmontemagno/MediaPlugin but they're not satisfied with the camera being pushed on the stack.
I've looked into implementing it natively and using dependency injections but it appears to be an overwhelming amount of work just to implement the most basic functions, particularly for Android's Camera2.
I'm hoping someone can provide me with good news of an easier alternative or an alteration to either Moments or Media Plugin or anything similar that will facilitate the requirements or if my only option is time consuming and complex?
From the code of Moment, you can do what you want to achieve. I did this for iOS.
You will have to create a custom renderer to display the camera page. You will be able to add buttons on top of it.
You could try this example which use custom renderer to add a take photo button and switch camera button on the camera view. Which is able to use on iOS and Android platform.
Main Page:
Camera View with custom button page:

Where can I find a source code skeleton for an OS X app using Apple's new UI?

Using Xcode it is easy to get create a skeleton app for OS X. However, Apple's skeleton code is rather old style with a single view and menu bar. I am looking for skeleton code / best practices which create an app that has the basic pieces such as left navigation panel, toolbar, right panel with format inspector and middle work area. I.e., the new UI style apple deploys with their keynote, pages and numbers.
I have searched but not found a comprehensive example that shows the major components and how these are linked/interacting. I don't see it in the Apple developer area either. I'd rather bootstrap my Mac OS X UI programming skills by learning from others than wading through new territory by myself.
Either Objective-C or Swift would be fine. I am targeting Yosemite.
There's not an Xcode template for this.
You just add an NSToolBar in IB
SUper easy.
Then the details of the rest can vary tremendously.
But, it can easily be a 3 pane NSSplitview with view controllers managing each pane's views.
A navigation pane could easily be an NSTableView or outline view. Or it could be NSCollectionView.
An inspector could be a conglomerate of view controllers swapped in based on context or interaction.
Take a look at github and cocoacontrols.com to find some ideas.
The center pane would most likely be at a minimum an NSScrollView with a custom document view.
I have a post on SO detailing an NSClipView subclass that handles centering right when zoomed out or when the document is smaller.

Creating a custom NSWindow interface

I am trying to create an instance of NSWindow that has a style similar to that of Pixelmator, pictured below:
http://ideaorange.com/files/2010/12/pixelmato-sprinklebig.jpg>">
Basically, I would like to know how to create a window similar to that style, with the black title bar. Would I have to write the entire window out in code? Or is it possible to do in interface builder? Much appreciated.
The HUD appearance is what you're looking for. Note, however, that it only applies to panels (like Pixelmator's palettes), not standard windows (such as document windows). It also does not apply to controls, such as buttons; Pixelmator's are undoubtedly custom.
This tutorial is a good place to start: http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html
There's a load of work involved in developing your own windows so be sure you're up for the challenge.
And another note, be sure to review your code against Apple's AppStore policies, as some of the window theming examples out on the web do use private API's which Apple won't approve for distribution through the app store.

How do I programatically get a large iPad window on startup with MonoTouch?

I have the latest Ipad compatible Monotouch library. I have upgraded my projects to use 3.2 SDK and MonoTouch 1.9 Alpha.
The docs say you need to change the Window in your XIB for the large iPad Window. I don't use XIB. I build my interface from code by constructing the object programatically. What should I be doing to get the large iPad style Window?
Nothing (I assume).
[UIScreen mainScreen].bounds (and its equivalent on MonoTouch) will be 768x1024 in iPad mode and 320x480 in iPhone mode. If your windows and views do not have any hard-coded values they should adopt to the new size naturally.
After further investigation, I found that I needed to add an entry into the info.plist file like so:
Information Property List
UIDeviceFamily
item 0 2
Once this is present the dynamic Window class that I create is the full iPad screen size.
I think it is basically telling the system that my app supports that device. Will have to find our more in the docs.

How to make an iTunes like (playlists, library) left-sided (collapsible) navigation bar?

I am talking about the navigation area on the left side of iTunes for Library and Playlists. I'm wondering if this is a built in class (which I couldn't find documented) or something custom implemented by Apple.
I'm working an a mac application where I want to include that type of navigation. I want to allow people to "fold" the categories up by using the triangles. Do I need to write a custom implementation of this, or can I use some control in Interface Builder or some open source library?
Thanks!
The bar is called a source list. In 10.5, you can use an NSTableView for this, as described here. Before 10.5, you'll have to resort to third-party implementations.
See also: "How would one implement a sidebar similar to Mail/iTunes/Finder/etc in Cocoa/IB?"
You can also use NSOutlineView, as shown in this example