Tag: Classes

UIColor Class Extensions

A couple of weeks ago, I added  a column on converting hex colors to UIColor. That was a function you had to copy and paste into your code. I’ve also shown you how to use the assets to keep color names handy. What would…

A Swift Tutorial to Working with Classes Part 1:Basic Classes

I find a lot of confusion among beginners and a handful of intermediate developers about what is a class. Object oriented languages like Swift, Objective C or C++ use classes to organize everything in the language and the API’s. You might have heard words…

KinderSwift 7: Introduction to Functions

This session we will learn about functions by making colors with UIColor. Transcript Welcome to lesson 7 of KinderSwift. In our last lesson we used this to convert a Int into a Double and this to convert a Double into a Int. Both of…

From Apple to Raspberry Pi: Using Inheritance and Overrides

Object oriented languages have a  concept called inhertance. A class can give its methods and properties to another class, which then replaces or expands the inherited class. We call the new class a subclass. When we replace a function or method we override the…

From Apple to Raspberry Pi: Importing Classes and Disturbing Attributes.

I didn’t do as much As I thought I would today, as I was installing tightvnc on the Raspberry Pi. I then tried out acessing my RasPi on my Mac, Pc, and even my iPad mini. I wasn’t nuts enough t try it on…

from Apple to Raspberry Pi: Making Classes in Python

Objective-C and Python are similar when it comes to defining new classes, but be careful with their differences. In Objective-C we would define a class with two files: a header and an implementation file. In the header we would declare properties like this And…