Sign in

iOS Developer #DobbyIsFree

Answering Interview Questions Related to Optional

  • What is Optional?
  • Explain how Optional is implemented in Swift.
  • How can we unwrap Optional to use its value?
  • Explain Optional Binding using guard statement.
  • What is Optional Chaining?
Photo by Jon Tyson on Unsplash

The Basics of Optional

public enum Optional<Wrapped>: ExpressibleByNilLiteral {
case none
case some(Wrapped)
}

One of the ways Swift guarantees its safety is by Optional. Optional is used when there may or may not be a value in a variable or a constant.

Optional is defined using enumeration in Swift that has 2 cases. Case ‘none’ to indicate that there is no value and ‘some’ to suggest an existence of a value although it’s wrapped…


부스트캠프에서 드디어 마지막! 5주차 프로젝트의 3주차를 바라보고 있다. 우리가 사용해야 하는 기술스택 중 필수사항에는 Core Data가 있었고 optional 하게 SwiftUI + Combine이 있었다. 하지만 많은 것을 경험해보고 습득할 수록 iOS 개발에 있어 보는 눈이 넓어질테니 다 해보기로 했다. 지금 생각해보면 후.회. 하지는 않는데 음… UIKit을 썼으면 더 깊은 고민을 할 수 있지 않을까? 라는 생각은 오고가고 있다 히히🤯 왜 때문에?

Web 팀에서 서버랑 디비 구축해서 API 명세서 뽑아주면 네트워킹을 해야할테니 Network layer를 가볍게 만들어봤다. 부캠을 하면서 난 비동기 처리를 항 …


#Comfortable / Photo by Julian Hochgesang on Unsplash

Some features go unnoticed until they cause discomforting experience. Name things like views without animation, scroll view that always returns to its top position, or even keyboards that doesn’t dismiss🤦. This article will cover 2 simple but necessary things.

  • Dismissing keyboard
  • Changing the view when keyboard appears.

멤버십 학습스프린트 마지막 마스터클래스가 끝나고 여느 때와 같이 채팅 창에는 ‘수고하셨습니다’와 ‘감사합니다’가 올라왔지만 여느 때와는 다르게 줌 창을 나가는 인원이 적었다. 평소에는 질문을 하기 위해 또는 다른 사람들은 어떤 질문을 하나 궁금해서 남아있었지만 5주간 달려온 스프린트의 마지막 마스터 클래스인 것이 모두들 아쉬웠겠지. 나 역시 아쉬워 나가지 못하고 서성였다. 캠퍼들은 그 공간에서 각자 어떤 감정을 느끼고 있었을까?

난 아직 모르는 것 투성인데…

많이 무서웠다. 챌린지는 멤버십에 가기 위해 고군분투하는 캠퍼들 속에 뒹굴어야 했던 진흙탕 분위기가 강했었다. 반면 멤버십에 들어왔을 땐 어떤 안전 울타리가 딱 …


Article with music: Irreplaceable — Beyoncé

“You must now know ‘bout me” — weak reference counting

One of the issues that I don’t enjoy dealing with is memory-related. Probably because the journey to find where the leak occurred is complicated. It often happens when dealing with closures because I tend to capture all `self`s as weak by rote. I noticed myself falling into some sort of error a few days ago. Turned out, I used [unowned self] and tried to use that closure after freeing the class instance. (What was I thinking? …


Article with music : Before You Go — Lewis Capaldi

Isn’t that a bit dangerous…?

The very first thing I learned about iOS development was HIG and some of the wonderful details the APPLE EMPIRE insists. (The details definitely were enough to persuade me to keep studying iOS.) After filling up the motivation gauge, the next thing I knew was that I was confronting View Controllers. After doing several projects I thought I totally understood what ViewControllers are and their roles. But do I?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store