Blog

Showing 21 to 30 of 51 posts.

Split string to array SwiftUI / Swift 5.1

Posted on January 1st, 2020 in Swift by George

 

How to split a string into an array using Swift 5.1!

Using the .components String method.

Read more...

How to uppercase text SwiftUI TextField

Posted on December 16th, 2019 in Swift by George

How to uppercase/capitalize text inside TextField Swift 5 SwiftUI

Read more...

TextField text center SwiftUI

Posted on December 16th, 2019 in Swift by George

How to center text inside TextField SwiftUI

Read more...

Background image with Swift UI

Posted on December 15th, 2019 by George

Example of how to add a background image to a View using SwiftUI. ZStack?

Read more...

SwiftUI use RGB for text. How to add custom RGB colours UIColor/ Color / .foregroundColor

Posted on December 15th, 2019 in Swift by George

Here is a short tutorial on how to use generic/conventional RGB color values with SwiftUI Swift 5.1 RGB values for UIColor are between 0 and 1 (see the documentation "specified as a value from 0.0 to 1.0")

Read more...

Xcode 11 Swift UI available font names for your application

Posted on December 15th, 2019 in Swift by George

Here is an exhaustive list with the available font names to be used in your IOS development. as in IOS 12

Read more...

Linked list in JavaScript code example step by step

Posted on December 1st, 2019 in JavaScript by George

 

This is one way of implementing the Data Structure of type Linked List in JavaScript.

Follow the code example below and pay attention to the explicit comments.

I do focus on coding and not writing a descriptive article. I believe the best way to learn code is by reading code and writing code.

Thank you.

Read more...

How to open and parse JSON file/data in Swift 5.1

Posted on December 1st, 2019 in Swift by George

A short example of how to open a JSON file from the root folder of the project.

This example will use a fictional file named Addresses, "addressesAPI" of type txt.

 

Read more...

Defer Swift 5.1 / 5 with example

Posted on November 23rd, 2019 in Swift by George

 

Defer is used to executed code only after the rest of the function body has been executed but can be declared anywhere inside of the body of the function.

Below you can see an explicit example.

Read more...

Swift 5 / 5.1 Enumeration with enum and enum method example

Posted on November 23rd, 2019 in Swift by George

 

In this example, I will create an enumeration using "enum" and a method "compareVales".

The compare value method will return a text string to show which value has primacy based on a predefined Rank.

Read more...

Categories