<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_App_Development_2022W_Lecture_7</id>
	<title>Mobile App Development 2022W Lecture 7 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/index.php?action=history&amp;feed=atom&amp;title=Mobile_App_Development_2022W_Lecture_7"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_7&amp;action=history"/>
	<updated>2026-04-06T01:53:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_7&amp;diff=23774&amp;oldid=prev</id>
		<title>Soma: Created page with &quot;==Video==  Video from the lecture given on February 2, 2022 is now available: * [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec07-20220202.m4v...&quot;</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=Mobile_App_Development_2022W_Lecture_7&amp;diff=23774&amp;oldid=prev"/>
		<updated>2022-02-02T18:44:54Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Video==  Video from the lecture given on February 2, 2022 is now available: * [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec07-20220202.m4v...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Video==&lt;br /&gt;
&lt;br /&gt;
Video from the lecture given on February 2, 2022 is now available:&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec07-20220202.m4v video]&lt;br /&gt;
* [https://homeostasis.scs.carleton.ca/~soma/mad-2022w/lectures/comp1601-2022w-lec07-20220202.cc.vtt auto-generated captions]&lt;br /&gt;
Video is also available through Brightspace (Resources-&amp;gt;Zoom Meetings (Recordings, etc.)-&amp;gt;Cloud Recordings tab).  Note that here you&amp;#039;ll also see chat messages.&lt;br /&gt;
&lt;br /&gt;
==Notes==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Lecture 7&lt;br /&gt;
---------&lt;br /&gt;
&lt;br /&gt;
Midterm will be on Assignments 1 &amp;amp; 2&lt;br /&gt;
Assignment 2 is on tutorials 3-5&lt;br /&gt;
  - Tutorial 5 will be textAnalyzer-3, which is using UIKit rather than SwiftUI&lt;br /&gt;
&lt;br /&gt;
Midterm format will be the same as the assignments&lt;br /&gt;
 - submit a text file that will be split up for grading&lt;br /&gt;
&lt;br /&gt;
For A1, if you don&amp;#039;t follow the format, you&amp;#039;ll get a stern warning message from me.  After A1 (for A2, midterm, and later), not following the directions can get you a zero grade.&lt;br /&gt;
&lt;br /&gt;
Image: a view to display an image in the app&amp;#039;s assets&lt;br /&gt;
AsyncImage: loads image in the background from the Internet and then displays it&lt;br /&gt;
  - note that accessing resources over the net can take arbitrary amounts of&lt;br /&gt;
    time, so you have two choices: wait for the load to finish, or load it&lt;br /&gt;
    in the background&lt;br /&gt;
  - &amp;quot;sync&amp;quot; refers to synchonous I/O, i.e., blocking I/O (wait until&lt;br /&gt;
    the operation finishes)&lt;br /&gt;
  - in many online contexts, we more do &amp;quot;async&amp;quot;, or asynchronous I/O&lt;br /&gt;
    (so input and output happens in the background while our program&lt;br /&gt;
     does other things)&lt;br /&gt;
&lt;br /&gt;
Note that most of the I/O you&amp;#039;ve seen has been synchonous&lt;br /&gt;
 - on the line after &amp;quot;print&amp;quot;, you can be sure the print had finished doing&lt;br /&gt;
   its work&lt;br /&gt;
&lt;br /&gt;
What&amp;#039;s the key difference between JPEG and PNG images?&lt;br /&gt;
 - PNGs are lossless compressed (no information lost)  &amp;lt;--- so will be bigger&lt;br /&gt;
 - JPEGs are lossy compressed (information lost)&lt;br /&gt;
&lt;br /&gt;
 - JPEGs are normally used for photographs because what is lost isn&amp;#039;t noticable&lt;br /&gt;
to the human eye&lt;br /&gt;
 - PNGs are used for interface elements, as they are much simpler and compression artifacts are much more noticable&lt;br /&gt;
 - when people talk about &amp;quot;raw&amp;quot; images, those are images from a camera&lt;br /&gt;
   before they&amp;#039;ve been compressed (turned into JPEGs), so they are&lt;br /&gt;
   much larger but have all possible details&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Device screens run at different sizes and resolutions, so it is common&lt;br /&gt;
to include assets at different scales so they can be properly optimized&lt;br /&gt;
for different screens&lt;br /&gt;
 - ideally, though, you&amp;#039;d use vector formats for whatever you can,&lt;br /&gt;
   as those don&amp;#039;t have a resolution: they look perfect at any resolution&lt;br /&gt;
   because they are defined from lines and areas, not pixels&lt;br /&gt;
&lt;br /&gt;
Adobe Photoshop or the GIMP are for images made of pixels (PNG, JPEG)&lt;br /&gt;
Adobe Illustrator or Inkscape are for images made of vectors (SVG)&lt;br /&gt;
&lt;br /&gt;
PDFs are a container format that can contain vector and pixel data&lt;br /&gt;
 - good PDFs are mostly vectors&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you can&amp;#039;t treat AsyncImage as an Image directly&lt;br /&gt;
 - because initially there is no image at all!&lt;br /&gt;
 - you only get an image after the asset has loaded&lt;br /&gt;
 - you can display an alternate image while the loading happens,&lt;br /&gt;
   or just show something to indicate the asset is loading&lt;br /&gt;
&lt;br /&gt;
In Swift, struct&amp;#039;s are immutable&lt;br /&gt;
  (class&amp;#039;s are mutable)&lt;br /&gt;
  - but if you declare something with @State, that property becomes mutable&lt;br /&gt;
    (and has lots of other things going on underneath so views get updated&lt;br /&gt;
     when they are changed)&lt;br /&gt;
&lt;br /&gt;
AsyncImage is only available on MacOS 12&lt;br /&gt;
 - so it is there in Monterey, but not Big Sur&lt;br /&gt;
 - I can&amp;#039;t build things with AsyncImage to work on my mac!  I have to&lt;br /&gt;
   compile as an iOS app and run in the simulator&lt;br /&gt;
&lt;br /&gt;
The @available decoration is needed when you use features that may not be&lt;br /&gt;
available on some platforms&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Soma</name></author>
	</entry>
</feed>