在 iOS 设计器中生成用户界面Building User Interfaces with the iOS Designer

Xamarin Designer for iOS 是 iOS 情节提要的可视化设计器和与 Visual Studio for Mac 和 Visual Studio 完全集成的 Interface Builder 格式。IOS 设计器与情节提要和 xib 格式保持完全兼容,因此除了 Xcode 的 Interface Builder 以外,还可以在 Visual Studio for Mac 或 Visual Studio 中编辑文件。此外,Xamarin Designer for iOS 还支持高级功能,如编辑器中设计时呈现的自定义控件。The Xamarin Designer for iOS is a visual designer for the iOS Storyboard and Interface Builder formats that is fully integrated with Visual Studio for Mac and Visual Studio. The iOS Designer maintains full compatibility with the Storyboard and .xib formats, so that files can be edited in either Visual Studio for Mac or Visual Studio in addition to Xcode's Interface Builder. Additionally, the Xamarin Designer for iOS supports advanced features such as custom controls that render at design-time in the editor.

可用性Availability

在 Windows 上的 Visual Studio 2017 Visual Studio for Mac 和中提供 Xamarin Designer for iOS。The Xamarin Designer for iOS is available in Visual Studio for Mac and in Visual Studio 2017 on Windows.

这些指南假设你熟悉Xamarin 入门指南中所述的内容。These guides assumes a familiarity with the contents covered in the Xamarin.iOS Getting Started guides.

iOS 设计器基本知识iOS Designer Basics

本指南涵盖 Xamarin iOS 设计器的功能。This guide covers the features of the Xamarin iOS designer. 它介绍了设计器的基础知识,并演示了如何使用设计器直观地布局控件,以及如何编辑属性。It covers designer basics, showing how to use the designer to lay out controls visually and how to edit properties.

设计控件概述Designable Controls Overview

本指南深入探讨自定义控件、创建它们的方式以及在设计图面上呈现这些控件所必须满足的要求。This guide looks in depth at custom controls, how they are created and what requirements they must meet to be rendered on the design surface. 此外,它还演示了如何调试使用可设计的控件时可能出现的常见问题。Additionally, it shows how to debug common issues that can occur when using Designable Controls.

演练-使用 iOS 设计器的自定义控件Walkthrough - Using Custom Controls with iOS Designer

本文提供了分步演练,演示如何创建自定义控件并在 iOS 设计器中使用它。This article provides a step-by-step walkthrough showing how to create a custom control and use it in the iOS designer. 它演示如何使控件在设计器的工具箱中可用,以便可以将其拖放到视图上。It shows how to make a control available in the designer’s Toolbox so it can be drag/dropped onto a view. 此外,它还演示如何实现控件,使其在设计时和运行时正确呈现,以及如何创建可在设计时设置的属性。Additionally, it shows how to implement a control so it renders properly at design time and runtime, as well as how to create properties that can be set at design time.

用 Xamarin iOS 设计器自动布局Auto Layout with the Xamarin iOS Designer

本指南介绍 ios 自动布局和 iOS 设计器中提供的新约束工作流。This guide introduces iOS Auto Layout and the new constraints workflow available in the iOS designer.