본문 바로가기
300x250

분류 전체보기271

webView - 쿠키 네이티브에서 웹으로 쿠키를 전달웹뷰에 로그인 기능이 있고 이 로그인이 자동으로 되기를 원할때에도 응용 가능 일반적으로 웹 환경에서는 토큰 값을 전달할 때 쿠키를 사용한다.그 이유는 쿠키를 사용했을 때 Secure 또는 HttpOnly 속성을 설정하여 보안을 강화할 수 있기 때문쿠키를 사용하지 않으면 URL 파라미터로 전달하거나 evaluateJavaScript 를 사용하여 전달할 수 있지만 URL 파리미터로 전달하는 것은 토큰이 노출되고 evaluateJavaScript로 전달하는 것은 웹에서도 앱에서도 토큰을 처리하는 추가 로직의 구현이 필요하다.따라서 쿠키를 사용하면 앱에서는 단순히 토큰을 저장만 해주고 웹에서는 앱이 전달해주는 토큰이 포함된 쿠키가 자동으로 처리되어 보안의 강화와 편리함으로 일반적인.. 2025. 11. 14.
webView - 새 창 preferences.javaScriptCanOpenWindowsAutomaticallyJavaScript 코드에서 window.open() 같은 함수를 호출했을 때 Swift에서 자동으로 새 창을 열 것인지의 여부를 결정.기본적으로 false로 설정이 되어 있다.true 로 설정이 되어도 실제 새 창이 열리게 하려면 WKUIDelegate 의 webView(_:createWebViewWith:for:windowFeatures:) 메서드를 구현해야 한다. webView(_:createWebViewWith:for:windowFeatures:)새 창을 열려고 시도할 때 호출되는 델리게이트 메서드새 창을 열기 위해 이 메서드를 구현하지 않거나 nil 을 반환하면 새 창 열기 요청은 무시되고 차단된다.새 창 허.. 2025. 11. 12.
AI로 영상을 만들어 보자 회사에서 AI로 영상을 만드는 교육을 듣게 되어 정리해봄.아무것도 모르는 사람이 영상을 만드려면 영상을 편집하는 기술부터 영상에 필요한 자료와 이미지 등 시간과 비용이 많이 들기 마련이다. 하지만 지금은 대AI시대!!AI를 사용하면 하루만에 그럴듯한 영상을 만들어 낼 수가 있다. 먼저, 어떤 동영상을 만들 것인지 기획이 필요하다. 어떤 내용인지 어떤 컨셉인지 세세한 기획을 글로 정리해야한다.이 내용을 가지고 스토리보드를 만드는 것이 첫 단계. 스토리보드 만들기Chat GPT 또는 제미나이를 활용 것이 좋다.글로 정리한 기획---# 목표- 각장면을 묘사하여 작성 - 각 장면은 번호(Scene), 시간(Timecode), 시각적 요소(Visual), 내레이션/대사(Narration & Dialogue)를 포.. 2025. 9. 9.
LeetCode: 104. Maximum Depth of Binary Tree https://leetcode.com/problems/maximum-depth-of-binary-tree/description/ Maximum Depth of Binary Tree - LeetCodeCan you solve this real interview question? Maximum Depth of Binary Tree - Given the root of a binary tree, return its maximum depth. A binary tree's maximum depth is the number of nodes along the longest path from the root node down to the farthest leafleetcode.comGiven the root of a b.. 2025. 8. 27.
LeetCode: 100. Same Tree https://leetcode.com/problems/same-tree/description/ Given the roots of two binary trees p and q, write a function to check if they are the same or not.Two binary trees are considered the same if they are structurally identical, and the nodes have the same value. Example 1:Input: p = [1,2,3], q = [1,2,3]Output: trueExample 2:Input: p = [1,2], q = [1,null,2]Output: falseExample 3:Input: p = [1,2,.. 2025. 8. 22.
LeetCode: 1337. The K Weakest Rows in a Matrix https://leetcode.com/problems/the-k-weakest-rows-in-a-matrix/description/You are given an m x n binary matrix mat of 1's (representing soldiers) and 0's (representing civilians). The soldiers are positioned in front of the civilians. That is, all the 1's will appear to the left of all the 0's in each row.A row i is weaker than a row j if one of the following is true:The number of soldiers in row.. 2025. 8. 20.
LeetCode: 888. Fair Candy Swap https://leetcode.com/problems/fair-candy-swap/description/Alice and Bob have a different total number of candies. You are given two integer arrays aliceSizes and bobSizes where aliceSizes[i] is the number of candies of the ith box of candy that Alice has and bobSizes[j] is the number of candies of the jth box of candy that Bob has.Since they are friends, they would like to exchange one candy box.. 2025. 8. 19.
LeetCode: 704. Binary Search https://leetcode.com/problems/binary-search/description/Given an array of integers nums which is sorted in ascending order, and an integer target, write a function to search target in nums. If target exists, then return its index. Otherwise, return -1.You must write an algorithm with O(log n) runtime complexity. Example 1:Input: nums = [-1,0,3,5,9,12], target = 9Output: 4Explanation: 9 exists in.. 2025. 8. 17.
LeetCode: 441. Arranging Coins https://leetcode.com/problems/arranging-coins/description/You have n coins and you want to build a staircase with these coins. The staircase consists of k rows where the ith row has exactly i coins. The last row of the staircase may be incomplete.Given the integer n, return the number of complete rows of the staircase you will build. Example 1:Input: n = 5Output: 2Explanation: Because the 3rd ro.. 2025. 8. 14.
300x250