분류 전체보기 333

iOS swift) 검색화면에서 scrolling시 키보드 내리기

iOS swift) 검색화면에서 scrolling시 키보드 내리기 func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { self.navigationItem.searchController?.searchBar.resignFirstResponder() } func scrollViewWillBeginDragging(_ scrollView: UIScrollView) { searchController.searchBar.resignFirstResponder()//self.searchBar?.endEditing(true) } 출처: https://stackoverflow.com/questions/40548228/dismiss-keyboard-on-drag

iOS swift) SceneDelegate 처음 시작화면 지정(with navigation)

iOS swift) SceneDelegate 처음 시작화면 지정(with navigation) func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) { guard let scene = (scene as? UIWindowScene) else { return } window = UIWindow(windowScene: scene) let rootVC = MainViewController() let navVC = UINavigationController(rootViewController: rootVC) self.window?.rootViewContr..

2차 평가과제 중 알게된 것들 (테이블뷰 섹션 관련)

TableView Section뒤에 배경화면을 UIViewController의 배경화면으로 하고싶을 때 (비우고 싶은 경우) [self.tableView setBackgroundView:nil]; [self.tableView setBackgroundColor:[UIColor clearColor]]; https://stackoverflow.com/questions/18753411/uitableview-clear-background UITableView clear background I realize that iOS 7 has not officially been released and we should not discuss it BUT I am going crazy trying to figure out th..

[iOS swift] Tableview swipe 시 기능 추가

Tableview swipe 시 기능 추가 (leading, trailing 둘 다 가능) 방법 2가지 >> 1번 방법 func tableView(_ tableView: UITableView, trailingSwipeActionsConfigurationForRowAt indexPath: IndexPath) -> UISwipeActionsConfiguration? { let delete = UIContextualAction(style: .normal, title: "삭제") { [self] action, view, completionHandler in print("favorite Button Clicked") repository.delete(item: self.tasks[indexPath.row]) sel..