11 분 소요

iOS 4주차 워크북 (TableView & CollectionView)

📝 학습 목표


  1. ScrollView를 이해한다.
  2. ScrollView의 개념을 기반으로 TableView를 이해하고 활용할 수 있다.
  3. CollectionView를 이해하고 활용할 수 있다.
  4. protocol과 delegate에 대해 이해하여 화면(ViewController)간의 데이터를 전달할 수 있다.

✍🏻 수업 내용 정리


테이블 뷰와 컬렉션 뷰

프로토콜

1️⃣테이블 뷰 이론

동일한 UI가 반복이 될 때 필요

목록 형태의 뷰를 구성하는데 용이

재사용 큐 reusable queue를 이용(메모리 문제가 적다)

ScrollView를 상속받아 스크롤이 가능하다

2️⃣컬렉션 뷰 이론

3️⃣일자 목록이 아니라 격자 형태라면 이거 사용 4주1

쓰는 방식은 테이블 뷰와 비슷

3️⃣프로토콜(Protocol)이론

protocol 치킨메뉴얼 
{
  func 반죽을한다()
  func 재료를섞는다()
  func 튀긴다()
  func 장식을한다()

}

본사에서 내려온 메뉴얼이 위의 방식

그러나 사장님 마다 방식이 다를 수 있다.

즉 청사진이다

구현은 하지 않지만 틀, 가이드라인이 있는…

*️⃣ Protocol Delegate 패턴

데이터를 전달하고 뷰와 뷰간의 관계 맺어줌

지난주의 데이터 전달과의 차이점은 화면이 넘어갈 때 데이터가 전달되는 것이 아니라, 이전화면으로 다시 돌아올 때 데이터를 넘길 것이다.

Delegate

대리자, 위임자

무언가를 다른 사람이 대신하는…그런 느으낌

이전 화면에 프로토콜 구현


import UIKit

protocol labelChangeProtocol { //프로토콜 이렇게 정의
  func onChange(text: String) // 실제로 사용하는 거는 자식 뷰
}

class FirstViewContorller: UIViewController, labelChangeProtocol {
//이렇게 프로토콜 채택
//최소 요구사항 구현 안하면 에러 뜸
func onChange(text: String) {
   label.text = text

}

@IBOutlet weak var label: UILabel!

override func viewDidLaod(){
   super.viewDidLoad()
    }

@IBAction func buttonDidTap(_ sender: Any) {
    guard let SecondViewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier:"SecondViewController") as? SecondViewController else {return}
    SecondViewController.modalPresentationStyle = .fullScreen
    SecondViewController.delegate = self
    present(SecondViewController, animated: true)

   }
}
  

import UiKit

class SecondViewController: UiVIewController {
  @IBOutlet weak var textField: UITextField!
  var delegate: labelChangeProtocol?

  override func viewDidLoad() {
    super.viewDidLoad()
   }

@IBAction func backButtonDidTap(_ sender: Any){
     guard let text = textField.text else { return }

      delegate?.onChange(text: text)
      dismiss(animated: true)
    }
}

🎯 핵심 키워드


  • TableView

    # tableView

    Returns the table view managed by the controller object.

    iOS 2.0+iPadOS 2.0+Mac Catalyst 13.0+tvOS 9.0+

    ## Declaration

    var tableView: UITableView! { get set }

  • CollectionView

    # collectionView

    The collection view object managed by this view controller.

    iOS 6.0+iPadOS 6.0+Mac Catalyst 13.0+tvOS 9.0+

    ## Declaration

    var collectionView: UICollectionView! { get set }

    ## Discussion

    If you assign a new collection view object to this property and that view’s data source or delegate aren’t yet set, the collection view controller makes itself the delegate or data source or both.

    ## See Also

    **Getting the collection view**

    [var collectionViewLayout: UICollectionViewLayout](https://developer.apple.com/documentation/uikit/uicollectionviewcontroller/1623980-collectionviewlayout)

    The layout object used to initialize the collection view controller.

  • ScrollView

    struct ScrollView<Content> where Content : [View](https://developer.apple.com/documentation/swiftui/view)

    ## Overview

    The scroll view displays its content within the scrollable content region. As the user performs platform-appropriate scroll gestures, the scroll view adjusts what portion of the underlying content is visible. ScrollView can scroll horizontally, vertically, or both, but does not provide zooming functionality.

    In the following example, a ScrollView allows the user to scroll through a [VStack](https://developer.apple.com/documentation/swiftui/vstack) containing 100 [Text](https://developer.apple.com/documentation/swiftui/text) views. The image after the listing shows the scroll view’s temporarily visible scrollbar at the right; you can disable it with the showsIndicators parameter of the ScrollView initializer.

    var body: some View { ScrollView { VStack(alignment: .leading) { ForEach(0..<100) { Text("Row \($0)") } } }}

    To perform programmatic scrolling, wrap one or more scroll views with a [ScrollViewReader](https://developer.apple.com/documentation/swiftui/scrollviewreader).

    ## Topics

    **Creating a scroll view**

    [init(Axis.Set, showsIndicators: Bool, content: () -> Content)](https://developer.apple.com/documentation/swiftui/scrollview/init(_:showsindicators:content:))

    Creates a new instance that’s scrollable in the direction of the given axis and can show indicators while scrolling.

    **Configuring a scroll view**

    [var content: Content](https://developer.apple.com/documentation/swiftui/scrollview/content)

    The scroll view’s content.

    [var axes: Axis.Set](https://developer.apple.com/documentation/swiftui/scrollview/axes)

    The scrollable axes of the scroll view.

    [var showsIndicators: Bool](https://developer.apple.com/documentation/swiftui/scrollview/showsindicators)

    A value that indicates whether the scroll view displays the scrollable component of the content offset, in a way that’s suitable for the platform.

    **Supporting types**

    [var body: some View](https://developer.apple.com/documentation/swiftui/scrollview/body-swift.property)

    The content and behavior of the scroll view.

    [typealias Body](https://developer.apple.com/documentation/swiftui/scrollview/body-swift.typealias)

    The type of view representing the body of this view.

    **Default Implementations**

    View Implementations

  • TableViewCell

    # UITableViewCell

    The visual representation of a single row in a table view.

    iOS 2.0+iPadOS 2.0+Mac Catalyst 13.1+tvOS 9.0+

    ## Declaration

    @MainActor class UITableViewCell : UIView

    ## Overview

    UITableViewCell object is a specialized type of view that manages the content of a single table row. You use cells primarily to organize and present your app’s custom content, but UITableViewCell provides some specific customizations to support table-related behaviors, including:

    • Applying a selection or highlight color to the cell
    • Adding standard accessory views, such as a detail or disclosure control
    • Putting the cell into an editable state
    • Indenting the cell’s content to create a visual hierarchy in your table

    Your app’s content occupies most of the cell’s bounds, but the cell may adjust that space to make room for other content. Cells display accessory views on the trailing edge of their content area. When you put your table into edit mode, the cell adds a delete control to the leading edge of its content area, and optionally swaps out an accessory view for a reorder control.

    https://docs-assets.developer.apple.com/published/54966b99b3/content-only@2x.png

    Every table view must have at least one type of cell for displaying content, and tables may have multiple cell types to display different types of content. Your table’s data source object handles the creation and configuration of cells immediately before they appear onscreen. For information about how to create your table’s cells, see Filling a table with data.

    ### Configure your cell’s content

    Configure the content and layout of your cells in your storyboard file. Tables have one cell type by default, but you can add more by changing the value in the table’s Prototype Cells attribute. In addition to configuring the cell’s content, make sure you configure the following attributes:

    • Identifier. Use this identifier (also known as a reuse identifier) to create the cell.
    • Style. Choose one of the standard types or define a custom cell.
    • Class. Specify a UITableViewCell subclass with your custom behavior.

    To configure the content and appearance of your cell, you can set its [contentConfiguration](https://developer.apple.com/documentation/uikit/uitableviewcell/3601057-contentconfiguration) and [backgroundConfiguration](https://developer.apple.com/documentation/uikit/uitableviewcell/3601055-backgroundconfiguration).

    ## Topics

    **Creating a table view cell**

    [init(style: UITableViewCell.CellStyle, reuseIdentifier: String?)](https://developer.apple.com/documentation/uikit/uitableviewcell/1623276-init)

    Initializes a table cell with a style and a reuse identifier and returns it to the caller.

    [enum UITableViewCell.CellStyle](https://developer.apple.com/documentation/uikit/uitableviewcell/cellstyle)

    An enumeration for the various styles of cells.

    [init?(coder: NSCoder)](https://developer.apple.com/documentation/uikit/uitableviewcell/1623220-init)

    Creates a table view from data in an unarchiver.

    **Reusing cells**

    [var reuseIdentifier: String?](https://developer.apple.com/documentation/uikit/uitableviewcell/1623246-reuseidentifier)

    A string for identifying a reusable cell.

    [func prepareForReuse()](https://developer.apple.com/documentation/uikit/uitableviewcell/1623223-prepareforreuse)

    Prepares a reusable cell for reuse by the table view’s delegate.

    **Configuring the background**

    [func defaultBackgroundConfiguration() -> UIBackgroundConfiguration](https://developer.apple.com/documentation/uikit/uitableviewcell/4013362-defaultbackgroundconfiguration)

    Retrieves a background configuration with system default values.

    [var backgroundConfiguration: UIBackgroundConfiguration?](https://developer.apple.com/documentation/uikit/uitableviewcell/3601055-backgroundconfiguration)

    The current background configuration of the cell.

    [var automaticallyUpdatesBackgroundConfiguration: Bool](https://developer.apple.com/documentation/uikit/uitableviewcell/3600584-automaticallyupdatesbackgroundco)

    A Boolean value that determines whether the cell automatically updates its background configuration when its state changes.

    [var backgroundView: UIView?](https://developer.apple.com/documentation/uikit/uitableviewcell/1623260-backgroundview)

    The view to use as the background of the cell.

    [var selectedBackgroundView: UIView?](https://developer.apple.com/documentation/uikit/uitableviewcell/1623226-selectedbackgroundview)

    The view to use as the background for a selected cell.

    [var multipleSelectionBackgroundView: UIView?](https://developer.apple.com/documentation/uikit/uitableviewcell/1623275-multipleselectionbackgroundview)

    The background view to use for a selected cell when the table view allows multiple row selections.

    **Managing the content**

    [func defaultContentConfiguration() -> UIListContentConfiguration](https://developer.apple.com/documentation/uikit/uitableviewcell/3601058-defaultcontentconfiguration)

    Retrieves a default list content configuration for the cell’s style.

    [var contentConfiguration: UIContentConfiguration?](https://developer.apple.com/documentation/uikit/uitableviewcell/3601057-contentconfiguration)

    The current content configuration of the cell.

    [var automaticallyUpdatesContentConfiguration: Bool](https://developer.apple.com/documentation/uikit/uitableviewcell/3600585-automaticallyupdatescontentconfi)

    A Boolean value that determines whether the cell automatically updates its content configuration when its state changes.

    [var contentView: UIView](https://developer.apple.com/documentation/uikit/uitableviewcell/1623229-contentview)

    The content view of the cell object.

    **Managing the state**

    [var configurationState: UICellConfigurationState](https://developer.apple.com/documentation/uikit/uitableviewcell/3601056-configurationstate)

    The current configuration state of the cell.

    [func setNeedsUpdateConfiguration()](https://developer.apple.com/documentation/uikit/uitableviewcell/3600590-setneedsupdateconfiguration)

    Informs the cell to update its configuration for its current state.

    [func updateConfiguration(using: UICellConfigurationState)](https://developer.apple.com/documentation/uikit/uitableviewcell/3601059-updateconfiguration)

    Updates the cell’s configuration using the current state.

    [var configurationUpdateHandler: UITableViewCell.ConfigurationUpdateHandler?](https://developer.apple.com/documentation/uikit/uitableviewcell/3751735-configurationupdatehandler)

    A block for handling updates to the cell’s configuration using the current state.

    [typealias UITableViewCell.ConfigurationUpdateHandler](https://developer.apple.com/documentation/uikit/uitableviewcell/configurationupdatehandler)

    The type of block for handling updates to the cell’s configuration using the current state.

    **Managing accessory views**

    [var accessoryType: UITableViewCell.AccessoryType](https://developer.apple.com/documentation/uikit/uitableviewcell/1623228-accessorytype)

    The type of standard accessory view for the cell to use in the table view’s normal state.

    [var accessoryView: UIView?](https://developer.apple.com/documentation/uikit/uitableviewcell/1623219-accessoryview)

    The view to use on the right side of the cell, typically as a control, in the table view’s normal state.

    [var editingAccessoryType: UITableViewCell.AccessoryType](https://developer.apple.com/documentation/uikit/uitableviewcell/1623266-editingaccessorytype)

    The type of standard accessory view for the cell to use in the table view’s editing state.

    [var editingAccessoryView: UIView?](https://developer.apple.com/documentation/uikit/uitableviewcell/1623264-editingaccessoryview)

    The view to use on the right side of the cell, typically as a control, in the table view’s editing state.

    [enum UITableViewCell.AccessoryType](https://developer.apple.com/documentation/uikit/uitableviewcell/accessorytype)

    The type of standard accessory control used by a cell.

    **Managing cell selection and highlighting**

    [var selectionStyle: UITableViewCell.SelectionStyle](https://developer.apple.com/documentation/uikit/uitableviewcell/1623221-selectionstyle)

    The style of selection for a cell.

    [enum UITableViewCell.SelectionStyle](https://developer.apple.com/documentation/uikit/uitableviewcell/selectionstyle)

    The style of selected cells.

    [var isSelected: Bool](https://developer.apple.com/documentation/uikit/uitableviewcell/1623263-isselected)

    A Boolean value that indicates whether the cell is selected.

    [func setSelected(Bool, animated: Bool)](https://developer.apple.com/documentation/uikit/uitableviewcell/1623255-setselected)

    Sets the selected state of the cell, optionally animating the transition between states.

    [var isHighlighted: Bool](https://developer.apple.com/documentation/uikit/uitableviewcell/1623241-ishighlighted)

    A Boolean value that indicates whether the cell is highlighted.

    [func setHighlighted(Bool, animated: Bool)](https://developer.apple.com/documentation/uikit/uitableviewcell/1623280-sethighlighted)

    Sets the highlighted state of the cell, optionally animating the transition between states.

    **Editing the cell**

    [var isEditing: Bool](https://developer.apple.com/documentation/uikit/uitableviewcell/1623268-isediting)

    A Boolean value that indicates whether the cell is in an editable state.

    [func setEditing(Bool, animated: Bool)](https://developer.apple.com/documentation/uikit/uitableviewcell/1623222-setediting)

    Toggles the cell into and out of editing mode.

    [var editingStyle: UITableViewCell.EditingStyle](https://developer.apple.com/documentation/uikit/uitableviewcell/1623234-editingstyle)

    The editing style of the cell.

    [enum UITableViewCell.EditingStyle](https://developer.apple.com/documentation/uikit/uitableviewcell/editingstyle)

    The editing control used by a cell.

    [var showingDeleteConfirmation: Bool](https://developer.apple.com/documentation/uikit/uitableviewcell/1623211-showingdeleteconfirmation)

    A Boolean value that indicates whether the cell is currently showing the delete-confirmation button.

    [var showsReorderControl: Bool](https://developer.apple.com/documentation/uikit/uitableviewcell/1623243-showsreordercontrol)

    A Boolean value that determines whether the cell shows the reordering control.

    **Dragging the row**

    [var userInteractionEnabledWhileDragging: Bool](https://developer.apple.com/documentation/uikit/uitableviewcell/2897414-userinteractionenabledwhiledragg)

    A Boolean value indicating whether users can interact with a cell while it is being dragged.

    [func dragStateDidChange(UITableViewCell.DragState)](https://developer.apple.com/documentation/uikit/uitableviewcell/2897452-dragstatedidchange)

    Notifies the cell that its drag status changed.

    [enum UITableViewCell.DragState](https://developer.apple.com/documentation/uikit/uitableviewcell/dragstate)

    Constants indicating the current state of a row involved in a drag operation.

    **Adjusting to state transitions**

    [func willTransition(to: UITableViewCell.StateMask)](https://developer.apple.com/documentation/uikit/uitableviewcell/1623240-willtransition)

    Notifies the cell that it’s about to transition to a new cell state.

    [func didTransition(to: UITableViewCell.StateMask)](https://developer.apple.com/documentation/uikit/uitableviewcell/1623274-didtransition)

    Notifies the cell that it transitioned to a new cell state.

    [struct UITableViewCell.StateMask](https://developer.apple.com/documentation/uikit/uitableviewcell/statemask)

    Constants used to determine the new state of a cell as it transitions between states.

    **Managing content indentation**

    [var indentationLevel: Int](https://developer.apple.com/documentation/uikit/uitableviewcell/1623252-indentationlevel)

    The indentation level of the cell’s content.

    [var indentationWidth: CGFloat](https://developer.apple.com/documentation/uikit/uitableviewcell/1623247-indentationwidth)

    The width for each level of indentation of a cell’s content.

    [var shouldIndentWhileEditing: Bool](https://developer.apple.com/documentation/uikit/uitableviewcell/1623214-shouldindentwhileediting)

    A Boolean value that controls whether the cell background is indented when the table view is in editing mode.

    [var separatorInset: UIEdgeInsets](https://developer.apple.com/documentation/uikit/uitableviewcell/1623250-separatorinset)

    The inset values for the separator line drawn beneath the cell.

    [enum UITableViewCell.SeparatorStyle](https://developer.apple.com/documentation/uikit/uitableviewcell/separatorstyle)

    The style for cells to use as separators.

    **Managing focus**

    [var focusStyle: UITableViewCell.FocusStyle](https://developer.apple.com/documentation/uikit/uitableviewcell/1623248-focusstyle)

    The appearance of the cell when focused.

    [enum UITableViewCell.FocusStyle](https://developer.apple.com/documentation/uikit/uitableviewcell/focusstyle)

    The style of focused cells.

    **Deprecated**

    ~~[var textLabel: UILabel?](https://developer.apple.com/documentation/uikit/uitableviewcell/1623210-textlabel)~~

    The label to use for the main textual content of the table cell.

    Deprecated

    ~~[var detailTextLabel: UILabel?](https://developer.apple.com/documentation/uikit/uitableviewcell/1623273-detailtextlabel)~~

    The secondary label of the table cell, if one exists.

    Deprecated

    ~~[var imageView: UIImageView?](https://developer.apple.com/documentation/uikit/uitableviewcell/1623270-imageview)~~

    The image view of the table cell.

    Deprecated

  • CollectionViewCell

    # UICollectionViewCell

    A single data item when that item is within the collection view’s visible bounds.

    iOS 6.0+iPadOS 6.0+Mac Catalyst 13.1+tvOS 9.0+

    ## Declaration

    @MainActor class UICollectionViewCell : UICollectionReusableView

    ## Overview

    You can use UICollectionViewCell as-is or subclass it to add additional properties and methods. The layout and presentation of cells is managed by the collection view and its corresponding layout object.

    To configure the content and appearance of your cell, you can set its [contentConfiguration](https://developer.apple.com/documentation/uikit/uicollectionviewcell/3600949-contentconfiguration) and [backgroundConfiguration](https://developer.apple.com/documentation/uikit/uicollectionviewcell/3600947-backgroundconfiguration). Alternatively, add the views needed to present the data item’s content as subviews to the view in the [contentView](https://developer.apple.com/documentation/uikit/uicollectionviewcell/1620133-contentview) property. Don’t directly add subviews to the cell itself. The cell manages multiple layers of content, of which the content view is only one. In addition to the content view, the cell manages two background views that display the cell in its selected and unselected states.

    You typically don’t create instances of this class yourself. Instead, you register your specific cell subclass (or a nib file containing a configured instance of your class) using a cell registration. When you want a new instance of your cell class, call the [dequeueConfiguredReusableCell(using:for:item:)](https://developer.apple.com/documentation/uikit/uicollectionview/3600423-dequeueconfiguredreusablecell) method of the collection view object to retrieve one.

  • protocol

    https://zeddios.tistory.com/8

  • delegate

    https://zeddios.tistory.com/8

    https://velog.io/@zooneon/Delegate-패턴이란-무엇일

    여기가 제일 이해 잘 됨

  • DataSource

    # dataSource

    The object that acts as the data source of the table view.

    iOS 2.0+iPadOS 2.0+Mac Catalyst 13.0+tvOS 9.0+

    ## Declaration

    weak var dataSource: UITableViewDataSource? { get set }

    ## Discussion

    The data source must adopt the [UITableViewDataSource](https://developer.apple.com/documentation/uikit/uitableviewdatasource) protocol. The data source isn’t retained.

    ## See Also

    **Providing the data and cells**

    [var prefetchDataSource: UITableViewDataSourcePrefetching?](https://developer.apple.com/documentation/uikit/uitableview/1771763-prefetchdatasource)

    The object that acts as the prefetching data source for the table view, receiving notifications of upcoming cell data requirements.

    [var isPrefetchingEnabled: Bool](https://developer.apple.com/documentation/uikit/uitableview/3801922-isprefetchingenabled)

    A Boolean value that indicates whether to allow cell and data prefetching.

    [protocol UITableViewDataSource](https://developer.apple.com/documentation/uikit/uitableviewdatasource)

    The methods that an object adopts to manage data and provide cells for a table view.

    [protocol UITableViewDataSourcePrefetching](https://developer.apple.com/documentation/uikit/uitableviewdatasourceprefetching)

    A protocol that provides advance warning of the data requirements for a table view, allowing you to start potentially long-running data operations early.

    **Related Documentation**

    [var delegate: UITableViewDelegate?](https://developer.apple.com/documentation/uikit/uitableview/1614894-delegate)

    The object that acts as the delegate of the table view.

📢 4주차 수업 후기


  • 프로토콜 자바 시간에 배운 것과 비슷하다….
  • 실습 난이도가 올라간 것이 체감됐다.

⚠️ 스터디간 주의사항


  1. 과제 피드백 기반 진행입니다 - 한명씩 본인의 과제를 발표하는 시간 그리고 해온 과제에 대한 피드백을 하는 시간 (ex:전 이렇게 생각해서 이런 부분 다르게 해왔는데 저것도 괜찮은 것 같아요!)이 무조건 기반이 되어야 합니다!
  2. 부가적으로 워크북에서 제공되는 키워드 혹은 강의에서 들은 디테일적인 부분에서 더 토의해봐도 좋을 것 같습니다.

✅ 실습 체크리스트


  • protocol을 선언했나요?

  • delegate를 활용하여 TextField에 입력된 문자열을 Label에 띄웠나요?

  • 구조체를 통해 DataModel을 선언하고 DataModel 값을 할당해주었나요?

  • UITableViewDelegate의 메소드를 선언하고 작성했나요?

  • 미션 참고 영상

    [iOS] #4. TableView - Practice

⚡ 트러블 슈팅


  • ⚡이슈 No.1 (예시입니다! 서식만 복사하시고 내용은 지워주세요.)

    이슈

    👉 앱 실행 중에 노래 다음 버튼을 누르니까 앱이 종료되었다.

    문제

    👉 노래클래스의 데이터리스트의 Size를 넘어서 NullPointException이 발생하여 앱이 종료된 것이었다.

    해결

    👉 노래 다음 버튼을 눌렀을 때 데이터리스트의 Size를 검사해 Size보다 넘어가려고 하면 다음으로 넘어가는 메서드를 실행시키지 않고, 첫 노래로 돌아가게끔 해결

    참고레퍼런스

    • 링크

🤔 이것도 한 번 생각해봐요!


  • TableViewCell을 작성하는 과정에서 TableView안에 끌어넣는 방법 말고 어떤게 있을까요?
  • TableView와 CollectionView의 Section에 대해서도 공부해 보세요!
  • TableView와 CollectionView의 Delegate 메소드는 어떤 것이 있는지 공부해 보세요!
  • TableView와 CollectionView의 Header, Footer는 어떻게 추가할까요?
  • CollectionViewFlowlayout 에 대해서 공부해 보세요!
  • 인스타그램, 페이스북 등을 보다 보면 스크롤을 내렸을 때 새로운 게시글이 생겨나죠! TableView의 Paging에 대해서도 공부해 보세요!
  • CollectionView의 Paging은 어떻게 적용해야 하는지 공부해 보세요!

standard mission

42

43

분명 처음 설정은 일기 형식의 메모장을 만들고 싶었으나…..생각보다 일기 형식이 시간이 많이 걸려서 보류하게 되었다. 나중에 반드시 만들어보일테다

44 45

여기가 조금 문제인데, UITableViewDelegate에서 cell을 선택했을때 무엇을 할지를 정하지 않아서 이렇게 공란으로 남겨두었다.

나중에 적절한 기능을 얼마든지 채워넣어서 활용해야겠다.

일종의 템플릿으로 활용하고 싶다.

🥲 이번에 마주친 오류들

Prototype table cells must have reuse identifiers

이 오류가 뜨길래…어? 분명히 설정했는데 라고 생각했지만

알고보니 Accessibility 영역의 identifier를 설정해준거였다.

다시 tableview Cell 영역의 identifier를 제대로 설정했다.

viewcontroller is unreachable because it has no entry points

이것도 엔트리를 분명히 설정했었는데…xcode를 껐다 켜보니 initial entry point가 감쪽같이 사라져있었다.

이…이게 무슨 일이여

다시 entry point를 부여하니 경고가 사라졌다.

😇 완성본

46 47

ThisisDiaryalsomemo.zip

태그: ,

카테고리:

업데이트:

댓글남기기