swiftでテキストを変更する

class ViewController: UIViewController {
    
    
    @IBOutlet weak var myLabel: UILabel!
    @IBAction func changeLabel(sender: AnyObject) {
        myLabel.text = "you changed me"
    }

    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.
    }


}

ああああ、mac買い換えて〜
誰か譲ってくれないかな

iOSでtopに戻る

ViewController.swift

class ViewController: UIViewController {
    
    @IBAction func unwindToTop(seque: UIStoryboardSegue){
        
    }

    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.
    }


}

Main.storyboard
control でexitにもっていき、unwindToTopを設定する

Gif class

class Gif {
	let url: NSURL
	let videoURL: NSURL
	let caption: String?
	let gifImage: UIImage?
	var gifData: NSData?

	init(url:NSURL, videoURL: NSURL, caption: String?){

		self.url = url
		self.videoURL = videoURL
		self.caption = caption
		self.gifImage = UIImage.gifWithURL(url.absoluteString)!
		self.gifData = nil
	}

	init(name: String){
		self.gifImage = UIImage.gifWithName(name)
	}
}
#import <UIKit/UIKit.h>
#import "Gif.h"

@interface GifEditorViewController : UIViewController<UITextFeildDelegate>

@property (nonatomic) Gif *gif;
@property (weak, nonatomic) IBOutlet UIImageView *gifImageView;

@end

UITextFieldDelegate Methods

func textFieldDidBeginEditing(textField: UITextField){
	textField.placeholder = ""
}

func textFieldShoudReturn(textField: UITextField) -> Bool {
	textField.resignFirstResponder()
	return true
}

Research

Brain Storm -> Create a Skelelon UI -> Research APIs and Libraries
Choose an Idea -> Create a paper prototype -> get user feedback -> Build APP

Developing nice graphic design
Building the user interface with UIKit
Downloading data from an API
Persisting the data
Working through problems and bug to get the app working well.
Posting the app to the App Store

-Create a Paper Prototype

Breakpoints and Visual Tools

override func viewDidLoad(){
	super.viewDidLoad()
	let singleTapRecognizer = UITapGestureRecognizer
	(target: self, action: "handleSingleTap:")
	view.addGestureRecognizer(singleTapRecognizer)
}
@IBAction func popToMasterView(){
	self.navigationController?.popToRootViewControllerAnimated(true)
}

LLDB and Breakpoint Actions

override func motionEnded(motion: UIEventSubtype,
	withEvent event: UIEvent){
		if motion == .MotionShake
		{
			disperseBugsAnimation()
		}
	}
	func handleSignleTap(recognizer:
		UITapGestureRecognizer){
		addBugToView()
		addButToView()
		}

thread backtrace all

Apple’s LLDB Quick Start Guide
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/gdb_to_lldb_transition_guide/document/lldb-command-examples.html#//apple_ref/doc/uid/TP40012917-CH3-SW1

The Debug Bar

func addBugToView(){
if bugs.count < maxBugs { let newBug = bugFactory.createBug() bug.append(newBug) moveBugsAnimation() } } func emptyBugsFromView(){ for bug in self.bugs { bug.removeFromSuperview() } self.bugs.removeAll(keepCapacity: true) } [/code] Getting Help with Bugs Stack Overflow
-be specific as possible
-provides steps leading to the problems
– can use text, code, images, gifts…