My First iOS App

MyFirst iOS App Hello World

https://s3.amazonaws.com/swiftbook/hello-world-swift.pdf

HelloWorld -label & button & UIAlertController & autolayout

//

//  ViewController.swift

//  HelloWorld

//  Copyright © 2015 Park. All rights reserved.

//

import UIKit

class ViewController: UIViewController {

@IBOutlet weak var label1: UILabel!

 

@IBAction func showMessage(sender: AnyObject) {

label1.text = “Welcome to Swift”

let alertController = UIAlertController(title: “Welcome to my first iOS App”, message: “Hello World”, preferredStyle: UIAlertControllerStyle.Alert)

alertController.addAction(UIAlertAction(title: “OK”, style: UIAlertActionStyle.Default, handler: nil))

self.presentViewController(alertController, animated: true, completion: nil)

}

 

override func viewDidLoad() {

super.viewDidLoad()

// Do any additional setup after loading the view, typically from a nib.

}

override func didReceiveMemoryWarning() {

super.didReceiveMemoryWarning()

// Dispose of any resources that can be recreated.

}

}

Fundamental Design Patterns

Fundamental Design Patterns

https://developer.apple.com/library/mac/referencelibrary/GettingStarted/RoadMapOSX/books/StreamlineYourAppswithDesignPatterns/StreamlineYourApps/StreamlineYourApps.html

Use of the Model-View-Controller (MVC) design pattern ensures that the objects you create now can be reused or updated easily in future versions of your application. http://developer.apple.com/library/mac/#documentation/General/Conceptual/DevPedia-CocoaCore/MVC.html#//apple_ref/doc/uid/TP40008195-CH32

The delegation design pattern allows you to change the runtime behavior of an object without subclassing. Delegation is a pattern where one object sends messages to another object—specified as its delegate—to ask for input or to notify the it that an event is occurring.
http://developer.apple.com/library/mac/#documentation/General/Conceptual/DevPedia-CocoaCore/Delegation.html#//apple_ref/doc/uid/TP40008195-CH14

Controls use the target-action design pattern to notify your application of user interactions. Target-Action is a design pattern in which an object holds the information necessary to send a message to another object when an event occurs.
http://developer.apple.com/library/mac/#documentation/General/Conceptual/Devpedia-CocoaApp/TargetAction.html#//apple_ref/doc/uid/TP40009071-CH3

Other Design Patterns
http://developer.apple.com/library/mac/#documentation/General/Conceptual/MOSXAppProgrammingGuide/CoreAppDesign/CoreAppDesign.html#//
apple_ref/doc/uid/TP40010543-CH3-SW1

http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/CocoaDesignPatterns.html#//apple_ref/doc/uid/TP40002974-CH6-SW6

The Launch Cycle

https://developer.apple.com/library/prerelease/ios/documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/StrategiesforHandlingAppStateTransitions/StrategiesforHandlingAppStateTransitions.html

When your app is launched (either into the foreground or background), use your app delegate’s application:willFinishLaunchingWithOptions: and application:didFinishLaunchingWithOptions: methods.

At launch time, the system automatically loads your app’s main storyboard file and loads the initial view controller. For apps that support state restoration, the state restoration machinery restores your interface to its previous state between calls to the application:willFinishLaunchingWithOptions: and application:didFinishLaunchingWithOptions: methods.

 

Individual Assignment 3

Individual Assignment (Midterm Presentation on 2016/10/25)

서보일 – Tobias Langlotz, Stefan Mooslechner, Stefanie Zollmann, Claus Degendorfer, Gerhard Reitmayr, Dieter Schmalstieg, Sketching up the world: In-situ authoring for mobile Augmented Reality, Personal and Ubiquitous Computing, August 2012, Volume 16, Issue 6,  pp 623–630.

김대섭 – Javier Irizarrya, Masoud Gheisaria, Graceline Williamsb, Bruce N. Walker, InfoSPOT: A mobile Augmented Reality method for accessing building information through a situation awareness approach, Automation in Construction, Volume 33, August 2013, pp 11–23.

민선환 – Philip Geiger, Marc Schickler, Rüdiger Pryss, Johannes Schobel, Manfred Reichert, Location-based Mobile Augmented Reality Applications: Challenges, Examples, Lessons Learned, 10th Int’l Conference on Web Information Systems and Technologies (WEBIST 2014), Special Session on Business Apps, April 3-5, 2014, Barcelona, Spain.

김동해 – Rémi Paucher, Matthew Turk, Location-based augmented reality on mobile phones, IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops(CVPRW), pp 9– 16.

김상수 – Thomas Olsson, Else Lagerstam, Tuula Karkkainen, Kaisa Vaananen-Vainio-Mattila, Expected user experience of mobile augmented reality services: a user study in the context of shopping centres, Personal and Ubiquitous Computing, February 2013, Volume 17, Issue 2,  pp 287–304.

곽지민 – Georg Waltner, Michael Schwarz, Stefan Ladstätter, Anna Weber, Patrick Luley, Horst Bischof, Meinrad Lindschinger, Irene Schmid, Lucas Paletta, MANGO – Mobile Augmented Reality with Functional Eating Guidance and Food Awareness, New Trends in Image Analysis and Processing (ICIAP) 2015 Workshops, Volume 9281 of the series Lecture Notes in Computer Science, pp 425-432.

 

 

 

Guide to Reference

ARC is a compile time feature that is Apple’s version of automated memory management. It stands for Automatic Reference Counting. This means that it only frees up memory for objects when there are zero strong references/ to them.

A guide to reference: when to use Strong reference, Weak reference, Unowned reference, ImplicitlyUnwrappedOptional property

  Optional non-Optional
Optional strong reference &

weak reference

 strong reference &

unowned reference

non-Optional strong reference &

unowned reference

 unowned reference &

implicitly unwrapped optional property

Extension

extension String {

func toFloat() -> Float {

if let unwrappedNum = Float(self) {

return unwrappedNum

}

else {

print(“Error converting \”” + self + “\” to Float”)

return 0.0

}

}

}

// Double to String with Format

var text = String.localizedStringWithFormat(“%.2f”, doubleValue)

// String to Float/Double

var floatValue = text.toFloat()