Skip to content

Instantly share code, notes, and snippets.

View TuenTuenna's full-sized avatar
😍
Happy coding 👏

개발하는 정대리 TuenTuenna

😍
Happy coding 👏
View GitHub Profile
@TuenTuenna
TuenTuenna / urlSession-cheatSheet.md
Created October 31, 2022 15:01
URLSession CheatSheet
@TuenTuenna
TuenTuenna / dummy-html.md
Created September 28, 2022 02:57
dummy-html
<html>
<!-- Text between angle brackets is an HTML tag and is not displayed.
Most tags, such as the HTML and /HTML tags that surround the contents of
a page, come in pairs; some tags, like HR, for a horizontal rule, stand
alone. Comments, such as the text you're reading, are not displayed when
the Web page is shown. The information between the HEAD and /HEAD tags is
not displayed. The information between the BODY and /BODY tags is displayed.-->
<head>
<title>Enter a title, displayed at the top of the window.</title>
@TuenTuenna
TuenTuenna / uiview+preview+ext.md
Created September 21, 2022 06:16
ios uikit UIView preview Ext
import Foundation
import UIKit

#if DEBUG
import SwiftUI

extension UIView {
@TuenTuenna
TuenTuenna / calculateTwoTimeDifference.md
Created September 20, 2022 09:29
Swift 시간 비교하기
extension Date {

    static func -(recent: Date, previous: Date) -> (month: Int?, day: Int?, hour: Int?, minute: Int?, second: Int?) {
        let day = Calendar.current.dateComponents([.day], from: previous, to: recent).day
        let month = Calendar.current.dateComponents([.month], from: previous, to: recent).month
        let hour = Calendar.current.dateComponents([.hour], from: previous, to: recent).hour
        let minute = Calendar.current.dateComponents([.minute], from: previous, to: recent).minute
        let second = Calendar.current.dateComponents([.second], from: previous, to: recent).second
@TuenTuenna
TuenTuenna / scenePhase.md
Created August 29, 2022 13:14
SwiftUi 앱 라이프사이클
import SwiftUI

@main
struct ScenePhaseApp: App {
    
    @Environment(\.scenePhase) var scenePhase
 
@TuenTuenna
TuenTuenna / compose lazy staggered grid.md
Created July 26, 2022 08:04
compose lazy staggered grid

콤포즈 lazy staggered grid

@Composable
fun LazyStaggeredGrid(
    columnCount: Int,
    contentPadding: PaddingValues = PaddingValues(0.dp),
    content: @Composable LazyStaggeredGridScope.() -> Unit,
) {
@TuenTuenna
TuenTuenna / not lazy staggeredGrid.md
Last active July 26, 2022 04:53
compose staggeredGrid not lazy

콤포즈 staggered grid not lazy

@Composable
fun StaggeredVerticalGrid(
  modifier: Modifier = Modifier,
  columnCount: Int = 2,
  content: @Composable () -> Unit
) {
@TuenTuenna
TuenTuenna / getRandomText.md
Last active July 26, 2022 04:33
kotlin getRandomText

코틀린 랜덤 텍스트 가져오기

private fun getRandomString(length: Int): String {
    val allowedChars = ('A'..'Z') + ('a'..'z') + ('0'..'9')

    return (1..length)
        .map { allowedChars.random() }
 .joinToString("")
@TuenTuenna
TuenTuenna / swiftui-generic.md
Created July 9, 2022 12:20
SwiftUi Generic 뷰 만들기
//
//  ContentView.swift
//  ClosureExample
//
//  Created by Jeff Jeong on 2022/07/09.
//

import SwiftUI