본문 바로가기
728x90
반응형

전체 글186

[TypeScript] 타입스크립트란? TypeScript MS에 의해 만들어졌으며, 자바스크립트를 대체하기보다는 부족한점을 보완하여 편리성, 확장성, 생산성 향상을 도모한 어플리케이션 규모의 개발 프로젝트입니다. TypeScript로 작성된 코드를 자바스크립트로 컴파일 가능하며, 모든 JavaScript는 TypeScript로 프로그램 가능합니다. 특징 1. 해당변수객체 멤버를 찾아서 사용할 수 있습니다. 123function f() { return "hello"; }cs -> f() 의 리턴 타입은 string -> f() 의 리턴 타입이 string이므로 string객체의 멤버 함수를 사용할 수 있도록 해줍니다. 2. 해당 변수에 타입에 대한 주석이 없이 명시적으로 표시할 수 있습니다. 12345function f(s: string) {.. 2015. 12. 30.
[swift를 이용한 ios 앱 만들기] 화면 전환 버튼을 클릭 시 새로운 화면으로 전환되는 이벤트를 실행합니다. 1. AppDelegate.swift에 메인 페이지인 ViewController를 rootViewController로 설정합니다. AppDelegate.swift 123456789101112131415161718class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? var naviController : UINavigationController? func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool .. 2015. 12. 30.
[swift를 이용한 ios 앱 만들기] 버튼 만들기 텍스트 만들기에 이어 버튼 만들기 입니다. 123456789101112131415161718var btn = UIButton() // btn width, height Size -- 버튼 크기 설정btn.frame.size.width = 50btn.frame.size.height = 50// btn alignment Center -- 중앙 정렬btn.frame = CGRectMake(width/2 - btn.frame.size.width/2, height/2 - btn.frame.size.height/2, btn.frame.size.width, btn.frame.size.height);// btn Background Color -- 백그라운드 색상 설정btn.backgroundColor = UIColor(.. 2015. 12. 30.
[swift를 이용한 ios 앱 만들기] 백그라운드 색상 변경하기 백그라운드 색상 변경하기 1234567891011121314151617181920212223242526272829303132333435363738import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. // BackGround Color -- R, G, B, Alpha self.view.backgroundColor = UIColor(red: 0.9, green: 0.3, blue: 0.5, alpha: 0.3) // Get width, height .. 2015. 12. 30.
728x90
반응형