Using UI Table View

Related tags

Table View swift
Overview

News-App

Table View와 Table view controller

  • Table View : Table의 크기를 지정할 수 있다.
  • Table View Controller: 전체의 뷰가 하나의 테이블

Table View

  1. Table view 구성요소 결정하기
  • 어떤 데이터로 구성할 것인가.
  • 몇 개의 데이터로 이루어져 있는가.
  • 행 클릭시 발생할 이벤트 (옵션)
  1. Class 상송
  • UITableViewController, UITableViewDataSource 상속

  • 발생한 Error는 Fix 버튼을 눌러 해결할 수 있다.

  1. 결과

Table View (Dynamic)

  1. Table View Cell 추가

  1. Lable 추가 및 class와 연결

  • Lable은 cell 안에 추가한다.

  • Table View를 보면 Dynamic Prototypes가 설정된 것이 보일 것이다.
  1. 결과화면

추가) 타입캐스팅 as

  • 부모와 자식 간의 관계를 정하는데에 있어 친자를 확인하는 용도이다.

(1) as?

  • 안전한 추론 방법이다. (내가 자식이 맞니?)

(2) as!

  • 강제로 추론하는 방법이다. (내가 자식이 맞아!)

Cell Click Event

News App

  1. HTTP 통신
  • urlsession
  1. JSON 데이터 형태
  • 정의: Javascript 객체 문법으로 구조화된 데이터를 표현하기 위한 문자 기반의 표준 포맷
  • 간단히 말하자면, 네트워크에서 통신 내에서 데이터를 주고받을 때 JSON으로 주고받는 데이터 형태
  • 기본 형태: {"key":"value"} 또는 {["value","value","value"]}
  • 추가: {[{"key":"value"}, {"key":"value"}, {"key":"value"}]} 이러한 배열로 선언 가능
You might also like...
🎛 QGrid: The missing SwiftUI collection view.
🎛 QGrid: The missing SwiftUI collection view.

[NOTE] If you'd like to see QGrid in action, check out this demo of QDesigner (see video below). Install QDesigner: https://apps.apple.com/us/app/qdes

A flexible grid layout view for SwiftUI
A flexible grid layout view for SwiftUI

📱 GridStack A flexible grid layout view for SwiftUI. WWDC20 Update Apple  released LazyVGrid and LazyHGrid at WWDC20. If you are fine to only suppor

Display list of Marvel comic Characters and its detail view
Display list of Marvel comic Characters and its detail view

Marvel Universe Display list of Marvel comic Characters and its detail view Installation Dependencies in this project are provided via Xcodegen (proje

 Building An Interactive Grid View
Building An Interactive Grid View

Building An Interactive Grid View This demo shows a few techniques on how to build a re-ordable grid view based on stock UICollectionView API. Here ar

An easy-to-use UITableViewCell subclass that implements a swippable content view which exposes utility buttons (similar to iOS 7 Mail Application)
An easy-to-use UITableViewCell subclass that implements a swippable content view which exposes utility buttons (similar to iOS 7 Mail Application)

SWTableViewCell An easy-to-use UITableViewCell subclass that implements a swipeable content view which exposes utility buttons (similar to iOS 7 Mail

Objective-C library for drag-n-drop of UITableViewCells in a navigation hierarchy of view controllers.
Objective-C library for drag-n-drop of UITableViewCells in a navigation hierarchy of view controllers.

ios-dragable-table-cells Support for drag-n-drop of UITableViewCells in a navigation hierarchy of view controllers. You drag cells by tapping and hold

Simple timeline view implemented by UITableViewCell
Simple timeline view implemented by UITableViewCell

TimelineTableViewCell TimelineTableViewCell is a simple timeline view implemented by UITableViewCell. The UI design of TimelineTableViewCell is inspir

Networking layer implementation using CLEAN Architecture for iOS.

NetworkLayer-CLEANArchitecture Networking layer implementation using CLEAN Architecture for iOS. Features ✨ CLEAN Architecture ✨ No Storyboards No ext

ListViewSwiftUI - A project for creating a vertical list using the Swift UI.This project include topic,ListView to show list of movies,Tabbar
Owner
Jiwon
Jiwon
Typed, yet Flexible Table View Controller

ConfigurableTableViewController Simple view controller that provides a way to configure a table view with multiple types of cells while keeping type s

Arek Holko 270 Oct 15, 2022
Generic table view controller with external data processing

FlexibleTableViewController Swift library of generic table view controller with external data processing of functionality, like determine cell's reuse

Dmytro Pylypenko 9 May 20, 2018
A UITableView extension that enables cell insertion from the bottom of a table view.

ReverseExtension UITableView extension that enabled to insert cell from bottom of tableView. Concept It is difficult to fill a tableview content from

Taiki Suzuki 1.7k Dec 15, 2022
TableViews - Emoji Table View For iOS With Swift

TableViews Hello! This is EmojiTableView. Let me introduce you my first app when

null 0 Jan 2, 2022
This framework allows you to build Table views using UIKit with syntax similar to SwiftUI

This framework allows you to build Table views using UIKit with syntax similar to SwiftUI

Fun 60 Dec 17, 2022
Simple static table views for iOS in Swift.

Simple static table views for iOS in Swift. Static's goal is to separate model data from presentation. Rows and Sections are your “view models” for yo

Venmo 1.3k Nov 19, 2022
A Swift library for swipeable table cells

BWSwipeRevealCell Using the library **Note: Use version 1.0.1 for Swift 2.3 support and version 2.0.0 or higher for Swift 3 support ** There are two m

Kyle Newsome 67 May 11, 2022
Type-safe declarative table views.

TableKit TableKit is a super lightweight yet powerful generic library that allows you to build complex table views in a declarative type-safe manner.

Max Sokolov 694 Dec 13, 2022
A waterfall grid layout view for SwiftUI.

WaterfallGrid A waterfall grid layout view for SwiftUI. Features Irregular grid of content. Columns number different per device orientation. Spacing a

Paolo Leonardi 1.9k Jan 7, 2023