Saturday, July 25, 2015

Single View Application Tips

When you create your first application there are different types you can do, but in this case I will do The SingleViewApplication where everything is displayed on one screen. Other choices are the Master Detail which is a List Page with Details navigation. Page based, Tabbed Based, and Game are other choices. In this case I will be using swift and Device type will be universal. After clicking create, you will see the project setting. You will see Deployment Info under General. In there you can specify the supported orientations. Moreover, the App Icons information is under General further down the page, Click on the arrow button and you can supply the icons. There is iPad settings, spotlight, and app icons to drag into the project. Likewise, there is iPhone phone, app, and spotlight icons to provide. Also, it is on this panel where you can drag images into the project by just dragging them in. Next step is on the right hand side of XCode is where I'll add an Image View form the object library. After dragging an image onto the storyboard, will fill in the attributes (inspector at top looks like a pencil. Select an image from your asset catalog for image box. The mode input has items like Aspect Fit (which maintains ratio to fit in your image view) and many others. There is also a size (inspector looks like a ruler) where you can increase the height and things such as Y attribute which positions the image vertically. In bottom left of storyboard, there is a way to show additional details of storyboard by clicking the Show Document Outline button. It shows the UI components on your screen. There are additional items in the tree that is displayed such as Top Layout Guide, Bottom Layout Guide. You can set constraints with your GUI objects such as vertical spacing. Also, there is view component in the tree where you can create constraints such as Leading or Trailing space to container margin.

No comments:

Post a Comment