{"id":2926,"date":"2020-08-06T21:56:53","date_gmt":"2020-08-06T21:56:53","guid":{"rendered":"http:\/\/4310.mynmi.net\/?page_id=2926"},"modified":"2026-03-21T22:01:23","modified_gmt":"2026-03-21T22:01:23","slug":"homework-assignment-one","status":"publish","type":"page","link":"https:\/\/nmi.cool\/appdev\/homework-assignment-one\/","title":{"rendered":"Homework Assignment One"},"content":{"rendered":"\n<p>In this assignment, you&#8217;ll build a SwiftUI app with a <code>ContentView<\/code> that links to three additional views. Each view demonstrates a different concept: text styling, SF Symbols, and image display. Read through all the requirements before you start.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Get Started<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li>Create a new Xcode project. Name it <strong>HomeworkOne<\/strong> or something similar.<\/li>\n<li>Add three new SwiftUI view files to your project \u2014 you&#8217;ll link to each from <code>ContentView<\/code>.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">View 1: Text Styling<\/h2>\n\n\n\n<p>In one of your three views, include each of the following:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>A text field using a <strong>custom font<\/strong> with a fixed font size.<\/li>\n<li>A second text field with a large amount of text and a <strong>line limit of 2<\/strong>. It should contain more text than it actually shows on screen.<\/li>\n<li><strong>Padding<\/strong> applied to at least one text field.<\/li>\n<li>A <strong>font color<\/strong> applied to one text field.<\/li>\n<li>A third text field with a <strong>background color<\/strong>. Hint: <code>.background(Color.yellow)<\/code> is a good starting point.<\/li><\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">View 2: SF Symbols<\/h2>\n\n\n\n<p>In a second view:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Display an <strong>airplane SF Symbol<\/strong>. Set the font size to around 300 so it nearly fills the screen.<\/li>\n<li>Apply a <strong>rotation effect<\/strong> so the airplane points straight up. (See Chapter 2 on text modifiers.)<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/nmi.cool\/appdev\/wp-content\/uploads\/sites\/10\/2020\/08\/img_5f2c71f821b71.png\" alt=\"Example: airplane symbol rotated to point straight up\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">View 3: Image<\/h2>\n\n\n\n<p>In your third view:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Display a <strong>large image<\/strong> of your choosing.<\/li>\n<li>Make the image <strong>resizable<\/strong> and apply <code>.scaledToFit()<\/code> so it scales proportionally. It may not fill both dimensions \u2014 that&#8217;s expected.<\/li>\n<li>Add an <strong>overlay<\/strong> to the image. Set the color to black and the opacity to a value that darkens the image while still keeping it visible. (See Chapter 3: Applying an Overlay to an Image.)<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>In this assignment, you&#8217;ll build a SwiftUI app with a ContentView that links to three additional views. Each view demonstrates a different concept: text styling, SF Symbols, and image display. Read through all the requirements before you start. Get Started View 1: Text Styling In one of your three views, include each of the following: &hellip; <a href=\"https:\/\/nmi.cool\/appdev\/homework-assignment-one\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Homework Assignment One<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2926","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/pages\/2926","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/comments?post=2926"}],"version-history":[{"count":11,"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/pages\/2926\/revisions"}],"predecessor-version":[{"id":4162,"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/pages\/2926\/revisions\/4162"}],"wp:attachment":[{"href":"https:\/\/nmi.cool\/appdev\/wp-json\/wp\/v2\/media?parent=2926"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}