본문 바로가기
728x90
반응형

전체 글185

[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.
[swift를 이용한 ios 앱 개발] UILable을 이용하여 Text 넣기 프로젝트를 생성한 후 UILable 을 이용하여 Text를 추가 123456789101112131415161718192021222324252627282930313233343536import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. // Get width, height Frame Size -- 프레임의 가로와 세로 사이즈 var width : CGFloat = self.view.frame.size.width var height : CGFloat =.. 2015. 12. 30.
728x90
반응형