Twise Random

A site about computer science .
Skip to content
  • apple
  • android
  • c
  • cpp
  • data structure and algorithms
  • macos
  • python
  • tutorials

Category: apple

Characters in swift a tutorial

Posted on August 2, 2021August 3, 2021 by mohamad wael

What is a character ?

Nowadays, what is accepted, is that a character has a code point, an encoding, and that it belongs, to a character set.

A character-set, can specify both the code points, and the encoding, or it … Read More

swift

Optionals in swift a tutorial

Posted on July 31, 2021August 3, 2021 by mohamad wael

 

In some languages other than swift, a variable or a constant, can or cannot have a value. So a variable or a constant, can be null, if no value was assigned to them, or if set to null.

What … Read More

swift optional, swift, what is an optional

What is core foundation?

Posted on July 27, 2021August 28, 2021 by mohamad wael

A little bit of history

To understand what core foundation is, let us get back in history a little bit. It was the year 2000, and there were two ways to develop applications, for macOS 10.

On one hand, … Read More

apple tutorial

What is NSObject ?

Posted on July 22, 2021July 22, 2021 by mohamad wael

 

Many object oriented programming languages, have a class, from which all other classes extends.

In general, a class has a set of methods, and variables, which it defines. The variables being the data, and the methods, being the … Read More

objective-c foundation, objective-c, oop, tutorial

How to generate random numbers in swift ?

Posted on September 19, 2019August 1, 2021 by mohamad wael

How to generate random number ins swift

We can generate random numbers in swift by one of these three methods :

  1. using the arc4random library
  2. using the default system random number generator SystemRandomNumberGenerator
  3. by using GamePlayKit classes that implement the
… Read More
swift