iOS
-
1005 - iOS 앱개발 기초 - UINavigationBar & BarbuttonItemiOS/iOS기초(네이버edwith*obj-c) 2022. 3. 20. 23:03
Navigation Controller는 Navigation Bar를 통해 외부와 연결 - 3가지로 구성 1) 가운데 label (title, title view) 2) left / right bar button item 화면의 view들은 view의 최상위 객체인 표준 UIView 를 상속받고 있음 But navigation item들은 표준 UIView를 상속받지 않음. ==> UIBarbutton Item이라는 클래스를 사용해서 화면을 밀어넣어야 함 1. Navigation Bar에 올라가는 3가지 요소 묶음을 Barbutton Item을 통해 제어 touchMap: 에서 : 콜론은 뒤에 인자가 있다는 의미 2. detailViewController가 WorldPhotosModel을 참조하는 것 처..
-
UIPageControl / UIPageViewControliOS/UICatalog 2022. 3. 16. 10:06
In this tutorial, we’ll be discussing and implementing the UIPageControl element in our iOS Application. UIPageControl UIPageControl is inherited from UIControl. A UIPageControl displays horizontal dots with each dot corresponding to a different Page in the ViewController. A UIPageViewController is used to browse through different pages where each page is a Child View Controller. UIPageControl P..
-
1005 - iOS 앱개발 기초 - 화면전환iOS/iOS기초(네이버edwith*obj-c) 2022. 3. 10. 00:06
1. 두번째 화면에 해당하는 detailViewController 생성 detailViewController.xib에서 attribute - 배경색상 red로 변경 (확인용) 2. 화면전환을 언제하나? - 사용자가 tableview의 특정 셀을 touch했을 때 - 일반적인 버튼을 통한 target-action이 아니라 delegate패턴을 이용 - UITableViewDelegate 프로토콜에 정의되어 있는 메시지(tableView: DidSelectRowAtIndexPath)로 2번째화면 등록 1) MainTableViewController에서 pushViewController를 통해 DetailViewController를 등록 (MainTable에서 바로 DetailView를 ..
-
1005 - iOS 앱개발 기초 - UITableViewController moreiOS/iOS기초(네이버edwith*obj-c) 2022. 3. 9. 21:46
1. 모델 생성 & 할당 2. model을 사용하기 위해 MainTableViewController에서 멤버변수로 model을 생성 & 할당 참고) UITableViewController란? UIViewController가 UITableViewDataSource와 UITableViewDelegate를 conforming하는 구조를 UITableViewController로 대체하고 있다 동일 3. table view를 구성하기 위한 세가지 메소드 구현 (섹션 개수 / 한 섹션 당 row 개수 / cell의 내용) 4. navigation bar의 title변경 5. cell의 악세사리 변경 ( > 표시를 통해 다음에 화면이 있음을 알려주기) 앞서 tableView는 기본적으로 4개의 데이터를 표시할 수 있..
-
1005-iOS앱개발 기초>화면 전환구조와 NavigationControlleriOS/iOS기초(네이버edwith*obj-c) 2022. 3. 5. 02:41
- Navigation Controller는 뒷단에서 화면들이 전환될 수 있게 도와주는 역할 - container controller view이기 때문에 하단의 contant view ( 실제 화면에 보여질 view )는 별도의 view가 들어가서 보여주고 이 view를 관리하는 별도의 view controller가 존재 1. Navigation Controller window안에는 root view controller라는 프로퍼티가 존재 --> 화면 맨 처음에 보여줄 view를 관리 - Navigation Controller와 연결 Navigation Controller는 자신이 관리하는 navigation bar를 제외하고는 스스로 데이터를 표현하지는 않음 상단의 navigation bar를 제외한 ..
-
1004-iOS앱개발 기초>UITableView & Delegate Pattern 2iOS/iOS기초(네이버edwith*obj-c) 2022. 3. 4. 04:56
- tableview가 datasource를 delegating - table에 보여질 사람들의 목록이 들어있는 model 객체 필요 1. model 객체에 사람들의 정보를 담을 array 선언 2. array의 초기화 작업 수행 3. AppDelegate와 Model을 연결 - model객체 생성 - model을 할당 --> 구현부의 didFinishLaunchingWithOptions 메소드 내에서 앱이 시작하자마자 model 객체를 할당할 수도 있지만 필요한 시점에(좀 늦게) 할당할 수 도 있음 (lazy instance) --> getter를 사용 시작할 때 미리 만들어놔도 되지만, 당장 필요없으니 필요한 시점이 되었을때 (쓸려고 할때) 만들겠다 getter를 통해서 modelHR이 생성되었는지 ..
-
1004-iOS앱개발 기초>UITableView & Delegate Pattern 1iOS/iOS기초(네이버edwith*obj-c) 2022. 3. 4. 04:46
* tableView : 반복되는 구조의 데이터를 불러올 때 사용 - section, row, cell 로 구성됨 * delegate pattern - 테이블뷰는 1) 화면구성 데이터(section, row, cell) 와 2) 사용자와의 interaction (터치, 드래그, 스크롤 등) 의 두가지 요소로 구성됨 따라서 두 개의 프로토콜을 사용해서 delegating을 진행 - UITableViewDataSource / UITableViewDelegate 프로토콜 1. 화면구성은 UITableViewDataSource 프로토콜을 이용 : tableview의 cell들을 표현 - AppDelegate가 시스템 처리 담당 (UIApplicationDelegate) 뿐 아니라 추가적으로 tableView도 ..
-
1003-iOS앱개발 기초> Property with Collection ObjectiOS/iOS기초(네이버edwith*obj-c) 2022. 3. 4. 02:22
1. property란? 클래스의 멤버변수는 캡슐화가 되어있어 외부에서 접근이 불가 --> 멤버변수들에 대해 property로 재 선언 가능 --> getter/setter accessor 메소드가 자동으로 선언됨 19번째 property선언문은 17,18번째 문장과 완전 동일 ==> 최신화 이후에는 클래스의 멤버변수를 선언하지 않아도 property가 알아서 클래스 내부에 멤버변수도 선언해주고, getter/setter 메서드도 선언해줌 2. synthesize 로 재선언 property로 선언된 멤버변수에 대해 sythesize 선언 --> getter/setter가 자동으로 "구현" 됨 ==> 최신화 이후 sythesize도 알아서 자동으로 넣어줌 - sythesize가 필요한 경우? 멤버변수 이름..