I use two different Github accounts — one is for my work, and the other for my personal projects. However, as a real novice in this field, whenever I switch the account from one to another, I had this problem with private remote repositories:

Then…


While I was reading a review comment from one of the senior programmers, I started to wonder: is JavaScript pass a value to a function by copying it(Call by Value) or just passing the pointer of it(Call by Reference).

In fact, not even once I have read about this topic…


I have been trying to embed Youtube videos in my App, and I have wanted to avoid working with external Frameworks using Cocoapod. Additionally, at the moment Google only provides Objective-C codes for Youtube API, I had no choice but to use URL only to embed videos.

However, this method…


How are structures and classes different in Swift?

source: https://docs.swift.org/swift-book/LanguageGuide/ClassesAndStructures.html

  1. Comparison

They both have: properties, methods, subscript syntax, initialization, can be extended(using extension syntax), protocols to follow

But only classes have: inheritance, typecasting, deinitialization, and reference counting

So, it seems that classes have much more complex structures and functionalities, and…


Swift Review — Closures(2)

Source: https://docs.swift.org/swift-book/LanguageGuide/Closures.html

  1. Capturing Values

We have discussed how Swift distinguishes closures(function, nested function, and closure expression). In effect, they are different in that nested functions and closure expressions CAPTURE constants and variables from the surrounding contexts.

What exactly does it mean by CAPTURING values? Swift basically…


Source: https://docs.swift.org/swift-book/LanguageGuide/Closures.html

  1. What is a Closure?

We usually think of it as an inline code that succinctly expresses a function. However, according to what the official document of Swift says, closure is a block of codes that executes a certain functionality — which is called a function in other languages.


source: https://docs.swift.org/swift-book/LanguageGuide/ControlFlow.html

We try to summarize briefly aboutswitch and guard clauses

  1. switch
  • Switch clauses in Swift have two noticeable features: exhaustive cases(so it is common to add default case)and no implicit fallthrough(no need to use `break` for every case, but sometimes it is necessary -> when we need to ignore…

https://docs.swift.org/swift-book/LanguageGuide/AccessControl.html

  1. Modules and Source Files

A module is a “single unit of code distribution”: framework, application. In Xcode, each build target is considered as a single separate module.

In contrast, a source file is a “single Swift source code within a module”.

2. Access Levels

In Summary, Swift Access Levels…


https://docs.swift.org/swift-book/LanguageGuide/CollectionTypes.html

  1. Array

Creating, Accessing, Modifying Arrays in Swift

2. Dictionary

Creating, Accessing, Modifying Dictionaries in Swift


https://docs.swift.org/swift-book/LanguageGuide/StringsAndCharacters.html

  1. Basic Features:

Strings are Value Types, Iterables, + operation is appliable

2. Other Features

Extended Grapheme Cluster, Index, Substring, Comparison

kyrie-eleison

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